MPC5746R Hardware Interrupts

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5746R Hardware Interrupts

2,343 次查看
mgrabau_holley
Contributor I

Good Day,

We have been trying to get the hardware vectoring setup working as described in Chapter 17 of the subject processor's reference manual. Thus far, we have been enabling hardware vectoring but the processor is raising an exception (either 0 or 1) into VTABLE (the address set IPVR). Are there any code samples available for configuring the hardware vector mode? I have found the pseudo-code in section 17.8.2.2 of the reference manual, but I seem to be missing something.


Thank you,

Mathew

标记 (1)
0 项奖励
回复
3 回复数

2,118 次查看
martin_kovar
NXP Employee
NXP Employee

Hello Mathew,

I have created two examples, which shows, how to use Hardware Vector mode. You can use the one, which is created for MPC5744P (you have to edit interrupt vector table, but most of the example is usable for you). Please see the following link and let me know, if you have any other questions.

https://community.nxp.com/docs/DOC-332022 

Regards,

Martin

0 项奖励
回复

2,118 次查看
mgrabau_holley
Contributor I

Hi Martin,

Thank you for the very helpful example. It was enough for me to get the hardware vectoring working.

However, I am having a new problem now. After the handling of the interrupt, the CPRn value remains elevated (it seems the LIFO pop that is done after the branch to the C function is not working properly).

Do you have any suggestions for that? I reviewed the code against what is listed in other threads and it seems fine. It is the FlexCAN peripheral and I can see that the IFLAG for the mailbox is being cleared. 

I can successfully get the interrupt to trigger that one time, but after that it just sits in my main loop. I can see the frames being received into the MB structures, but the interrupt does not trigger again.

I have reviewed the contents of other threads to no avail. Any additional information would be greatly appreciated.

Any thoughts?

Best regards,

Mathew

0 项奖励
回复

2,118 次查看
mgrabau_holley
Contributor I

Hi Martin,

I discovered the change that was required at the top of handlers_vle.s:

# Original line: .equ INTC_EOIR, 0xFC040030

.equ INTC_EOIR, 0xFC040034

The code in specific was executing on Core 1 and not Core 0. Changing that definition fixed the priority issue that I was witnessing.

Thanks!
Mathew

0 项奖励
回复