CAN FD Interrupts on MPC5748G

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

CAN FD Interrupts on MPC5748G

ソリューションへジャンプ
2,698件の閲覧回数
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

タグ(3)
0 件の賞賛
返信
1 解決策
2,677件の閲覧回数
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

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,678件の閲覧回数
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

0 件の賞賛
返信
2,668件の閲覧回数
OwenH
Contributor II

That was it! Thank you for your help!

Owen

0 件の賞賛
返信
2,692件の閲覧回数
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 件の賞賛
返信
2,689件の閲覧回数
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 件の賞賛
返信
2,685件の閲覧回数
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 件の賞賛
返信