Disable NMI_b pin/interrupt KL04Z?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Disable NMI_b pin/interrupt KL04Z?

ソリューションへジャンプ
4,144件の閲覧回数
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,680件の閲覧回数
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,680件の閲覧回数
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,680件の閲覧回数
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,681件の閲覧回数
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,680件の閲覧回数
rflmota
Contributor II

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

0 件の賞賛
返信