UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

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

UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

1,390 次查看
Shubha_Ravi
Contributor I

Hello Team,

Iam trying to receive CAN frames using RX FIFO instead of buffer method. I looked through your website and couldn't find any useful information on the same and I tried few configurations to implement Rx FIFO and couldn't succeed. It would be really helpful if you could provide me with some example codes and configuration using Rx FIFO for S32K146 controller.

 

0 项奖励
回复
2 回复数

1,363 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Shubha_Ravi

you can refer to this artice to configure the flexcan for RX FIFO reception.(demo you can find in the attachment)

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K1xx-FlexCAN-Mask-Setting-Demo/ta-p/1519753 

0 项奖励
回复

1,239 次查看
Shubha_Ravi
Contributor I

Hello Team,

Thanks for the input, I tried to execute your demo code and it worked.

I need to introduce the logic for cycle time so i have used the following logic, but instead of 50ms Iam getting 5sec, what needs to be corrected to get the values in ms. I assumed 1 tick is 1msec but Iam getting 1tick =100ms so Iam unable to get a proper logic for cycle time. Could you please let me know what could be the problem?

void Init(void)
{
ComObjCAN.systick = OSIF_GetMilliseconds();
}
void main()
{

 value = OSIF_GetMilliseconds();
if ((value-ComObjCAN.systick) == 50) {
ComObjCAN.systick = value;
 ComCAN_Transmit();
 }

0 项奖励
回复