Unhandled Interrupt code is executed for SKEAZN8MFK4 MCU when using Processor Expert to configure FTM0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unhandled Interrupt code is executed for SKEAZN8MFK4 MCU when using Processor Expert to configure FTM0

Jump to solution
1,431 Views
juliusjai
Contributor II

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

0 Kudos
1 Solution
977 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

For KEA128:

pastedImage_2.png

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

7 Replies
977 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Julius,

Please share your project , thanks!

BR

Alice

0 Kudos
977 Views
juliusjai
Contributor II

Hello Alice,

I have attached the project in my original message above.

Thanks for the help.

Julius

0 Kudos
977 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
977 Views
juliusjai
Contributor II

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

0 Kudos
977 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
977 Views
juliusjai
Contributor II

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

0 Kudos
978 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

For KEA128:

pastedImage_2.png

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!
-----------------------------------------------------------------------------------------------------------------------