Hi,
I have K60 tower board. I have MQX 4.2 and Code Warrior 10.6.4.
I want to generate code for Cpu_OnHardFault ISR using PE, but it is disabled. I am not sure there is any way to enable it for generate code:
Solved! Go to Solution.
Hi David,
I think the reason that you cannot enable it the usual way is because you have MQX in your project: MQX takes ownership of all interrupts.
I hope this helps,
Erich
Hi David
This feature is automatically enabled when the hard fault property is set to "Enabled". see below screenshot.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jennie,
Thank you for your reply. In my PE, all the interrupts are disabled, and I cannot find a way to enable them. See the screen pasted below:
When I left-click the OnHardFault, there is a popup menu to toggle Enable/Disable, but it is GRAYED.
it must have another level of enabling it. I don't know the small green icon with a little cross on it. Enabled ones are blue with a check.
Thank you,
David
Hi David,
I agree that this might be confusing. But the it means that the *property' is disabled and cannot be changed, as the HardFault cannot be disabled. So it is turned on anyway by the hardware as it is a non-maskable interrupt.
I hope this helps,
Erich
Hi Erich, Jennie,
Thanks for explanation. But I still don't know how to enable it as Jennie's saved screen with ENABLE to generated code for the HardFault ISR. From my screen pasted, all those functions are disabled, AND I have a no way to ENABLE them. That results in preventing me from generating code for them. I understand they are non-maskable interrupts, currently are all tied into _int_kernel_isr. Do you mean non-maskable interrupts can not generated code from PE? But then why Jennie's screen shows enable and be able to generate code?
Thank you,
David
Hi David,
I think the reason that you cannot enable it the usual way is because you have MQX in your project: MQX takes ownership of all interrupts.
I hope this helps,
Erich
Erich,
Thank you for the answer. That explains. As I have said I have manually installed the ISR, it is not a problem for me.
Best Regards,
David
By the way, I have created a function CW_InstallIsrHardFault and manually installed ISR for the OnHardFault as follows:
uint32_t CW_InstallIsrHardFault(INT_ISR_FPTR isr) {
INT_ISR_FPTR fpISR;
fpISR = _int_install_isr(3, isr, (void *)NULL);
if ( fpISR == (INT_ISR_FPTR) NULL ) {
return 1;
}
return 0;
}
Thanks,
David