isCANTx_Idle

Top  Next

isCANTx_Idle


Is CAN bus transmission Channel in Idle?

Since R2019b

 

Library: embeddedCreatorLib ( Dafulai Electronics) / Embedded CAN Bus / isCANTx_Idle

 

 

isCANTx_Idle

 

 


 

Description


 

Judge whether embedded CAN Bus transmission Channel is in "Idle" State.

One CAN bus peripheral has 3 Channels ( Channel A, B, C ) for transmitting.

Every channels has as many as 31 Sequences (Seq0 to Seq30).  Seq0 has higher priority than Seq30.   Sequences run step by step from Seq0 to Seq30.

3 Channels can transmit at the same time.

Usually we assign different channel into different sample time.   So we can transmit 3 groups of CAN Packets in different periods.

 

We do any "CAN BusTransmit " in One Channel must be under condition : Transmission Channel is in "Idle" State.

When embedded CAN bus transmission channel is in "Idle" state, You can set up all sequences of transmission operations, and then this transmission channel will exit "Idle" state and  operate in sequences automatically.  We provide block to check if all sequences finish.  In order to start new transmission  operations, you must set  transmission channel into "Idle" state when all sequences done.

 

 

Notes: You 'd better set up 3 CAN bus transmitting buffers if you use 3 transmission Channels in MCU Configuration software such as MPLABX IDE MCC for Microchip technology MCUs. Of cause, if you only use one or two Channels, you can setup only one or two  CAN bus transmitting buffers.

 

Parameters


 

Please double click this block to open parameters dialog below:

 

isCANTx_Idle_param

 

 

 

 

Let us explain parameters.

 

 

Peripheral CAN bus  Number — tell system this block is which CAN controller peripheral used. You just choose from drop list items: 1 or 2.

 

Transmit Channel:  — drop list to select transmission Channel A or Channel B or Channel C.

 

Sample time in sec (-1 for inherited): — Sample time for this block. It is the same meaning as general Simulink block .

 

 

 

Ports


 

Input

 

None

 

 

Outport


 

 

Yes — "logical" data type's scalar. True means "CAN bus transmission Channel is in Idle state, you can start any transmission operation by this channel". False means "CAN bus transmission Channel is in busy state, you can not start any transmission operation by this channel"

 

 

Examples