Hello, I'm using CW MCU v10.7 and trying to configure Processor Expert for SKEAZN8MFK4 MCU.
I'm configuring FTM0 to test timer interrupt. When the code executes void FTM0_Init(void), the OpenSDA debugger stops and triggers PE_ISR(Cpu_Interrupt) -> Unhandled Interrupt Code.
PE_ISR(Cpu_Interrupt)
{
/* This code can be changed using the CPU component property "Build Options / Unhandled int code" */
PE_DEBUGHALT();
}
Additional details:
Evaluation Kit used is TRK_KEA128.
All I have is PE generated code, so I assume everything should be working.
Any idea why Unhandled Interrupt is executed with the above conditions?
Original Attachment has been moved to: TestSKEAZN8.zip
Solved! Go to Solution.
Hello Julius,
Yes, I use the demo board "TRK-KEA8"(SKEAZN8MFK4), it can work well.
The address of SIM_SCGC is different between KEA8 ank KEA128( you can checked it on Reference manual ),
For KEA8:
For KEA128:
so when you download the KEA8 project into TRK-KEA128, this enable FTM0 clock gate code can't enable the FTM0 clock.
/* SIM_SCGC: FTM0=1 */
SIM_SCGC |= SIM_SCGC_FTM0_MASK;
then when you operate FTM0 registers, it will run into Hard_Fault interrupt .
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Julius,
Please share your project , thanks!
BR
Alice
Hello Alice,
I have attached the project in my original message above.
Thanks for the help.
Julius
Hi Julius,
I tested your project on my side, it can work well .
Please check whether you choose the right chip when debug , have a alook bout my attachment video .
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Alice,
I followed exactly your video and I can confirm I'm setting the right MCU that is KEAZN8M4.
By the way, are you also using TRK_KEA128 for demo board?
Thanks.
Julius
Hello Julius,
I'm really not sue why you create a KEAZN8M4 project on TRK-KEA128 board ,
if you use TRK-KEA128, you can create the KEA128 board, and when debug , please choose the
target KEAZ128M4, not the KEAZN8M4.
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Alice,
My final hardware design will be using KEAZN8 that's why I would like to create a KEAZN8 project.
Currently, I only have TRK-KEA128 evaluation kit.
So, can you please confirm if you are using a KEAZN8 evaluation kit when you tested my project?
At least I can narrow down the issue, and maybe I don't have to continue investigating why KEAZN8 is not working with TRK-KEA128 evaluation kit.
Thank you.
Julius
Hello Julius,
Yes, I use the demo board "TRK-KEA8"(SKEAZN8MFK4), it can work well.
The address of SIM_SCGC is different between KEA8 ank KEA128( you can checked it on Reference manual ),
For KEA8:
For KEA128:
so when you download the KEA8 project into TRK-KEA128, this enable FTM0 clock gate code can't enable the FTM0 clock.
/* SIM_SCGC: FTM0=1 */
SIM_SCGC |= SIM_SCGC_FTM0_MASK;
then when you operate FTM0 registers, it will run into Hard_Fault interrupt .
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------