Send more CAN messages with fewer available MBs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Send more CAN messages with fewer available MBs

790 Views
jingwen_shi
Contributor I

I am using S32K146 MCU which has 3 CAN instances. Now my ECU will use one of them access to vehicle CAN network.

According to my dbc file, my ECU will have about 38 messages for reception and about 25 messages for transmission.

According to S32K146 RM, I have to enable the CAN Rx FIFO for reception, and with this way, MB 0-5 will not be used by me, then I can use MB 6-15 for fifo reception(I can configure 40 messages for received, this is OK). MBs remaining for CAN Tx(25 Tx messages) only have 16 (MB 16-31). 

Now, I initialize one CAN message for every Tx MB during initialization. Actually, it is not enough. Other 9 messages beyond 16 messages cannot be sent.

Is there any way to solve my problem? Or which article I can take for reference.

Thank you very much~~

Labels (1)
Tags (2)
0 Kudos
Reply
1 Reply

694 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

with the single CAN module you can only create some SW TX queue to manage message to be sent. The MB is selected for transmission based on internal arbitration and after successful transmission the MB can be again prepared for another transmission.

Anyway two CAN modules can be connected to the same transceiver. This allows more RX buffers to be available for a node. But in this case, only one module is used for transmit and the other CAN module’s transmit is not connected. Just RX pins are connected.

 

The receiving module should be set in Listen-only mode (CTRL1[LOM] bit set). Transmission is disabled, all error counters are frozen and the module operates in a CAN Error Passive mode. Only messages acknowledged by another CAN station will be received. If FlexCAN detects a message that has not been acknowledged, it will flag a BIT0 error, as if it was trying to acknowledge the message. RX interrupt are functional in LOM mode normally.

BR, Petr

0 Kudos
Reply