Disable NMI_b pin/interrupt KL04Z?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Disable NMI_b pin/interrupt KL04Z?

跳至解决方案
4,373 次查看
rflmota
Contributor II

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:

标签 (1)
1 解答
2,909 次查看
jcottier
Contributor II

Hi Ricardo, I had a similar issue with the KL02. The solution from Freescale is attached. Probably the same or very similar on the KL04 if you research the reference manual. Its all in there but quite hard to find and piece together without an example.

Regards

John Cottier.

在原帖中查看解决方案

4 回复数
2,909 次查看
mohamedabdelmag
Contributor II

Hi,

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

0 项奖励
回复
2,909 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hello,

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).

        SECTION FlashConfig:CODE

__FlashConfig

        DCD 0xFFFFFFFF

        DCD 0xFFFFFFFF

        DCD 0xFFFFFFFF

        DCD 0xFFFFFFFE

__FlashConfig_End

Regards,

Santiago

0 项奖励
回复
2,910 次查看
jcottier
Contributor II

Hi Ricardo, I had a similar issue with the KL02. The solution from Freescale is attached. Probably the same or very similar on the KL04 if you research the reference manual. Its all in there but quite hard to find and piece together without an example.

Regards

John Cottier.

2,909 次查看
rflmota
Contributor II

Many thanks jcottier your tips helped me with solving exactly the problem! :smileywink:

0 项奖励
回复