Request for interrupt based FlexCAN reception example code

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

Request for interrupt based FlexCAN reception example code

856 Views
sachin922185
Contributor II

Hello Team,

We are using s32k344evb-q172 evaluation board. We want to perform the interrupt  based CAN reception but unfortunately there is no example code available for same.

Request you to please share the interrupt based FlexCAN reception example code.

Thanks & Regards,

Sachin N

@ndd922478 

0 Kudos
Reply
3 Replies

821 Views
sachin922185
Contributor II

Hello Petr,

Thanks for the reply.

I tried this example, but event is triggering once reception is completed from Mailbox to CPU.

Our use case is that there should be interrupt when message is just come into Mailbox.

Please guide on this, how we can achieve our use case?

 

Thanks & Regards,

Sachin N

0 Kudos
Reply

809 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if using RTD driver, this is done that way, using callbacks. If you have e.g baremetal code then generally, the MB flag in IFLAG register is set when message is received/transmitted without error. If also MB mask bit is set in the IMASK register and interrupts are enabled in the core, the MB interrupt is called.

BR, Petr

0 Kudos
Reply

844 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

I placed some RTD based example on https://community.nxp.com/t5/S32K/FlexCAN-IP-example-not-running-in-normal-mode-on-S32K344-EVB/td-p/...
If you are using s32k344evb-q172 with TJA1043 you can skip transceiver init within code.
In the code a callback is used to indicate MB interrupt.
Hope it helps 

BR, Petr

0 Kudos
Reply