The reception of FlexCAN triggered by an interrupt

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

The reception of FlexCAN triggered by an interrupt

1,270 次查看
A-Jay
Contributor III

I am now receiving CAN data through FreeRTOS implementation and printing data through Uart. The priority of the task receiving CAN data is higher than that of the task printed by the Uart. However, the vTaskDelay() function must be called to release the CPU for the task with a higher priority. However, some CAN data cannot be received during the suspended time of the task. So I'm going to use CAN to receive data, trigger interrupts, release binary semaphores in interrupt call-back functions, and get semaphores in data processing tasks.

But I don't know how interrupts are implemented?

CAN the callback function that fires first when the register receives CAN data be overwrite?

I hope you can help me!

标签 (1)
0 项奖励
回复
3 回复数

1,257 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @A-Jay 

Which MCU and SDK are you using?

0 项奖励
回复

1,245 次查看
A-Jay
Contributor III
S32DS, S32R45's M7 core
0 项奖励
回复

1,191 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

unfortunately I do not have example for your device directly. I can point to below example for MPC5748g, so maybe can be useful little bit.
https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-FlexCAN-TX-RX-FreeRTOS-S32DS2-1...
If you are loosing some data you can try to enable and use legacy or enhanced RXFIFO. Legacy RXFIFO can hold up to 6 CAN2.0 messages without reading it. Legacy RXFIFO can be used if CAN FD is not enabled. With CANFD enabled you have option to use enhanced RXFIFO which can hold up to 32 CANFD messages.

BR, Petr

0 项奖励
回复