UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

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

UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

1,264 Views
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 Kudos
Reply
2 Replies

1,237 Views
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 Kudos
Reply

1,113 Views
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 Kudos
Reply