Using multiple CAN channels to receive messages at the same time on S32K3 using the MBDT

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using multiple CAN channels to receive messages at the same time on S32K3 using the MBDT

跳至解决方案
1,054 次查看
nikhillemos1
Contributor II

Hello NXP team, 

I've been using the NXP S32k344 processor for a VCU application and I've come across an issue of being limited to using only one CANRx block (CanIf_RxIndication IRQ block). My application is running at step time of 5ms and I am expecting messages to be sent from 4 different components per CAN bus, some transmitting at a rate of 10ms. 

But, since all the messages from the CAN busses is coming through the same RX block, I cannot access all the CAN messages being received simultaneously. Is there any way we can create more Rx Indication blocks so that I can at least access the messages coming from individual CAN modules separately or even access the messages in some other way like accessing the MailBoxes like was possible on the S32k1 series. 

If anyone knows of any solutions that would be very helpful.

 

Thanks,

Nikhil

0 项奖励
回复
1 解答
958 次查看
nikhillemos1
Contributor II

For anyone else who may have faced this issue, the key point is that the block is an IRQ handler. I had missed this point and thus tried to use the block as a normal receive block. IRQs are handled in realtime regardless of the step time. So if there is a message, the block will call any function block you set it to call. The block will act as an ISR and take priority over other tasks. You can set up your sorting logic within this ISR and you will be good to go. Hope this helps someone.

在原帖中查看解决方案

0 项奖励
回复
1 回复
959 次查看
nikhillemos1
Contributor II

For anyone else who may have faced this issue, the key point is that the block is an IRQ handler. I had missed this point and thus tried to use the block as a normal receive block. IRQs are handled in realtime regardless of the step time. So if there is a message, the block will call any function block you set it to call. The block will act as an ISR and take priority over other tasks. You can set up your sorting logic within this ISR and you will be good to go. Hope this helps someone.

0 项奖励
回复