CANNY 7.2 Duo. CAN Scheduled Asynchronous Transmitter Driver

General Description

Using the CAN Scheduled Asynchronous Transmitter Driver you can implement asynchronous transmission of CAN messages to hardware interfaces with individual combination of the user-defined (scheduled) properties. The driver can be used for either of the CAN interfaces (CAN0 and CAN1). This driver work asynchronous to function diagram, which allows for maximum stability of generated signal timing parameters. This driver works asynchronously with the function diagram, which ensures more stability of the CAN message sending period than when sending messages using the function diagram.

The CAN Scheduled Asynchronous Transmitter Driver allows you to set up individual properties of transmissed CAN messages, as number of CAN interface, identififer, data, sending period (with resolution 1ms), by configuring up to 32 buffers.

To activate the Scheduled Asynchronous Transmitter Driver of the required CAN interface, you need:

  • set the configuration of the required CAN interface;
  • activate the Scheduled Asynchronous Transmitter Driver of the required CAN interface by the appropriate driver register.

The CAN Scheduled Asynchronous Transmitter Driver can be used in conjunction with CAN driver.

Drivers registers

Below is a description of The CAN Scheduled Asynchronous Transmitter Driver control registers. These registers set the controller operation parameters for asynchronous messages transmission to the CAN hardware interfaces.

The CAN Scheduled Asynchronous Transmitter Driver Common registers.

The CAN Scheduled Asynchronous Transmitter Driver Common registers.
Register Expected values
CANSATX CAN0 Scheduled Asynchronous Transmitter Enable Register
CANSATX CAN1 Scheduled Asynchronous Transmitter Enable Register
≥ 1 = enable the CAN Scheduled Asynchronous Transmitter Driver;
0 = disable the CAN Scheduled Asynchronous Transmitter Driver.
CANSATX CAN0 Scheduled Asynchronous Transmitter Update Register
CANSATX CAN1 Scheduled Asynchronous Transmitter Update Register
≥ 1 = apply new settings of the CAN Scheduled Asynchronous Transmitter Driver; Must be set momentarily when the CAN Scheduled Asynchronous Transmitter Driver parameters need be changed during function diagram execution
0 = do not update the settings of the CAN Scheduled Asynchronous Transmitter Driver.

Note: New asynchronous transmitter driver settings will be applied on the diagram loop that follows the loop during which a non-zero value was written to the CANSATX CANx Scheduled Asynchronous Transmitter Update Register.

The CAN Scheduled Asynchronous Transmitter Driver buffers registers are used to place data in the corresponding driver buffer for asynchronous transmission.

The buffers registers.
Register Expected values
CANSATX Buffer X Linked CAN Interface Number Register 0 = apply the appropriate buffer to send messages to the controller via the CAN0;
1 = apply the appropriate buffer to send messages to the controller via the CAN1.
CANSATX Period Register Buffer X CAN, ms 1…65535 = value of the message sending period of the corresponding buffer, ms;
0 = no send messages of the corresponding buffer.
CANSATX Transmit Data Register Buffer X CAN IDL 0…0xFFFF = value of the lower part of the CAN message identifier of the corresponding buffer.
CANSATX Transmit Data Register Buffer X CAN IDH 0…0x1FFF = value of the upper part of the CAN message identifier of the corresponding buffer.
CANSATX Transmit Data Register Buffer X CAN ERL 0…0xXX08 = value equal to the number of data bytes in the transmitted CAN message on the specified interface, where 0xXX is:
0x00 (with the standard format),
0x40 (with the standard format with RTR),
0x80 (with the extended format) or
0xС0 (with the extended format with RTR) (See note).
CANSATX Transmit Data Register Buffer X CAN D1:D0

CANSATX Transmit Data Register Buffer X CAN D7:D6
0…0xFFFF = values of the corresponding data bytes of the CAN message of the corresponding buffer, two bytes per register.

Note: CANSATX Transmit Data Register Buffer X CAN ERL denotes the number of bytes in the received message in its least significant bits (bits 0..8). It also contains information about special message attributes in its most significant bits : bit 15 - EXT flag, bit 14 - RTR flag. EXT = 1, when a message is received in the extended format, EXT = 0 for the standard message format; RTR = 1 when a remote data request is received, RTR = 0 when a normal message is received.

Examples

An example of a functional diagram for asynchronous sending of static data to the CAN0 bus.

An example of a functional diagram for asynchronous sending of static data to the CAN0 bus.

While executing the diagram the controller, with use CAN Scheduled Asynchronous Transmitter Driver, sending to CAN0 two messeges with static data. Sending period of Buffer 1 message (ID=0x010) is 10ms, sending period of Buffer 2 message (ID=0x050) is 50ms.

An example of a functional diagram of asynchronous sending of dynamically changed data to the CAN0 bus.

An example of a functional diagram of asynchronous sending of dynamically changed data to the CAN0 bus.

When the diagram is executed, the controller, using the CAN Scheduled Asynchronous Transmitter Driver, sends messages to the CAN0 interface with a period of 10 ms, the data in which (bytes D6: D7) changes every 250 ms.

An example of a functional diagram of the joint operation of a CAN Driver and a CAN Scheduled Asynchronous Transmitter Driver.

An example of a functional diagram of the joint operation of a CAN Driver and a CAN Scheduled Asynchronous Transmitter Driver.

When the diagram is executed, the controller, receiving a message with ID = 0x020 via the CAN0 interface, the D0 byte of which is 0x01, activates the transmission of a message with ID = 0x050 using the CAN Scheduled Asynchronous Transmitter Driver.

SEE ALSO