MKW30Z; SDK1.3; IAR 7.50; C NMI_Handler implementation

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

MKW30Z; SDK1.3; IAR 7.50; C NMI_Handler implementation

Jump to solution
607 Views
lucianfiran
Contributor V

I think my MKW30Z got stuck in NMI interrupt after power on, because on debug session with J-Link Lite FSL it works ok.

How can I implement (declare) and disable the NMI interrupt at startup ?

(should I modify the startup_MKW30Z4.s file ?)

Labels (1)
Tags (1)
0 Kudos
1 Solution
444 Views
cutworth
NXP Employee
NXP Employee

Hi Lucian,

You can disable NMI pin function by changing the startup file. Find the following code. So you just need to change the flash configuration byte at 0x40D to 0xFB.

SECTION FlashConfig:CODE
__FlashConfig
DCD 0xFFFFFFFF
DCD 0xFFFFFFFF
DCD 0xFFFFFFFF
DCD 0xFFFFFBFE
__FlashConfig_End

You can find the definition for FOPT which configures this function in Table 6-2. Flash Option Register (FTFA_FOPT) bit definitions.

pastedImage_1.png

View solution in original post

0 Kudos
2 Replies
444 Views
lucianfiran
Contributor V

Works, I unchecked also Project Options Debugger Download Use flash loader(s)

Thank you !

0 Kudos
445 Views
cutworth
NXP Employee
NXP Employee

Hi Lucian,

You can disable NMI pin function by changing the startup file. Find the following code. So you just need to change the flash configuration byte at 0x40D to 0xFB.

SECTION FlashConfig:CODE
__FlashConfig
DCD 0xFFFFFFFF
DCD 0xFFFFFFFF
DCD 0xFFFFFFFF
DCD 0xFFFFFBFE
__FlashConfig_End

You can find the definition for FOPT which configures this function in Table 6-2. Flash Option Register (FTFA_FOPT) bit definitions.

pastedImage_1.png

0 Kudos