K60 Interrupt Issue

cancel
Showing results for 
Search instead for 
Did you mean: 

K60 Interrupt Issue

1,034 Views
Contributor I

Hi all,

 

I am working with the TWR-K60N512 and running Codewarrior 10 with Processor Expert. I am trying to do basic SPI initialization using the Init_SPI feature of Processor Expert, but at runtime the code enters the PE_ISR() interrupt service routine immediately after running this line within the generated SPI3.c:

 

SPI0_MCR = (uint32_t)0x0C01UL;

 

I'm having a hard time finding relevant documentation that explains why this interrupt service routine is being called and what specifically about the generated SPI code (that I haven't modified) is causing this to happen.

 

Thanks for any help and I apologize if I am missing something obvious.

0 Kudos
3 Replies

60 Views
Senior Contributor III

Hello,

 

could you please post here the project that leads you to getting the problem? Please also provide CHIP mask of your MCU.

 

best regards
Vojtech Filip
Processor Expert Support Team

 

 

0 Kudos

60 Views
Senior Contributor III

 

Hello,

 

the problem also might be that you have not enabled clock gate. For more details please see enclosed screen-shot.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos

60 Views
Contributor I

It was indeed the clock gate not being enabled. I am now able to run through the entirety of the SPI initialization code. Thanks very much for your response.

0 Kudos