Can't turn off NMI using Processor Expert and KE06

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

Can't turn off NMI using Processor Expert and KE06

ソリューションへジャンプ
1,059件の閲覧回数
davidsherman
Senior Contributor I

Having a bit of a problem, for which I've logged a service request.  Thought I'd share so if anybody else is trying to use SPI0 module with the default PORTB pins, they'll know whats wrong.  Stumbled onto the fact that trying to use the SPI0 module creates a problem if the NMI is still enabled in SIM SOPT0.  It defaults to on, and it does not automatically turn off if the SPI module is enabled.  NMI shares the PORTB4 pin with SPI0_MISO.  Since I'm using MQX, Processor Expert has the NMI enabled by default.  Trouble is, it's a write once bit.  It turns out if I uncheck the NMI checkbox in the CPU configuration, it is still defined, so I've had to modify cpu_init.c to make sure it disables NMI.

ラベル(1)
0 件の賞賛
返信
1 解決策
777件の閲覧回数
davidsherman
Senior Contributor I

Hi Erich, I was able to fix it. I didn't know there were two different checkboxes for disabling the NMI.  One under Common Settings, and one under CPU interrupts/resets.  Now it seems to be working without my modification.  I had just added #undef CPU_NMI_PIN before the statement that checks for it.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
777件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi David,

can you share your modification in CPU_Init.c?

For me, it disables the NMI pin in PE_low_level_init() with the CPU_NMI_PIN set to 0x00U in CPU_config.h:

  #if CPU_NMI_PIN

  SIM_SOPT0 |= (uint32_t)SIM_SOPT0_NMIE_MASK; /* Enable NMI pin */

  #else

  SIM_SOPT0 &= (uint32_t)~(uint32_t)SIM_SOPT0_NMIE_MASK; /* Disable NMI pin */

  #endif /* CPU_NMI_PIN */

Regards,

Erich

0 件の賞賛
返信
778件の閲覧回数
davidsherman
Senior Contributor I

Hi Erich, I was able to fix it. I didn't know there were two different checkboxes for disabling the NMI.  One under Common Settings, and one under CPU interrupts/resets.  Now it seems to be working without my modification.  I had just added #undef CPU_NMI_PIN before the statement that checks for it.

0 件の賞賛
返信