CAN FD Interrupts on MPC5748G

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN FD Interrupts on MPC5748G

Jump to solution
196 Views
OwenH
Contributor II

Hello,

I'm implementing CAN FD on the MPC5748G and I don't seem to be getting an interrupt when a message is sent or received. I can successfully send messages as well as receive them from checking the memory and CANAlyser and I can see that the corresponding bits are set in the IFLAG registers. Whether I set or clear the corresponding bits in the IMASK registers for that buffer however the ISR doesn't seem to fire.

I'm calling xcptn_xmpl() so the ISRs should be enabled and have my routines in the vector table for the buffers on that CAN port. Is there anything else I should check as to why the interrupts might not be happening? Other interrupts are working so it seems to just be something with my CAN FD code.

Many thanks,

Owen

0 Kudos
1 Solution
175 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set also interrupt core and priority for each vector using INTC PSR register e.g.

INTC.PSR[604].R = 0x8001; 

BR, Petr

View solution in original post

0 Kudos
5 Replies
176 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set also interrupt core and priority for each vector using INTC PSR register e.g.

INTC.PSR[604].R = 0x8001; 

BR, Petr

View solution in original post

0 Kudos
166 Views
OwenH
Contributor II

That was it! Thank you for your help!

Owen

0 Kudos
190 Views
BenMW
Contributor I

Do you enable the interrupts and assign the callback function?

void FLEXCAN_DRV_InstallEventCallback(uint8_t instance, flexcan_callback_t callback, void *callbackParam)

and (if needed)

void FLEXCAN_DRV_InstallErrorCallback(uint8_t instance, flexcan_error_callback_t callback, void *callbackParam)

0 Kudos
187 Views
OwenH
Contributor II

I enable the interrupts by setting the bits in the IMASK registers for the CAN Port and I've referenced the callback directly in the vector table. Do I also need to set them up using those function calls? If so where is that function defined?

0 Kudos
183 Views
BenMW
Contributor I

You can find the functions in flexcan_driver.c/.h files. I'm new to NXP so I cannot give you information if your vector table is correct. But you can compare your settings with the implementation of the driver functions.

0 Kudos