How can I disable NMI Interrupt at startup of μController MKL04Z32VFK4 using CodeWarrior but without Processor Expert? I've seen many threads here in the community regarding my problem and I came to the conclusion that to solve my problem I should disable NMI Interrupt at startup, because I'm using PTB5 as its alternate function of ADC channel through a pull-down network. I've searched the Reference Manual and found that for that I should change the Flash Configurations of the microcontroller that were then loaded at boot to Flash Option Register (FTFA_FOPT). The problem here is the only examples I came across all involves changing this Flash Configurations through PE interface, my question is how can this be accomplished using just plain code and none of Rapid Application Development features.
Thank you in advance for your help. :smileywink:
Solved! Go to Solution.
I had the same problem but the solution above didn't work
I use IAR to program and debug, can you advice what is the address of the byte to be changed to FB? Is it the only thing I must do?
I am using MKE04Z8VWJ4 uc
Thank you in advance for your help
Yes, is the only thing you need to do. Usually in IAR there is a section in the linker called m_flash_config and at some point in your code you should see something similar to this:
(In the project I am using now it's inside startup_MK64F12.s). When you find this section you only need to change the bits corresponding to the NMI pin (You can check that in the Reference Manual of the device).