UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UCANS32K1SIC: S32K146 CAN Rx FIFO Examples

1,392件の閲覧回数
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,365件の閲覧回数
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,241件の閲覧回数
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 件の賞賛
返信