AnsweredAssumed Answered

KL02 NMI pin assign issue

Question asked by Kris Ke on Jan 15, 2017
Latest reply on Jan 17, 2017 by Kris Ke

When I use below code to assign NMI pin to GPIO, it can't assign successful.





But If I use below code, it can assign successful.

PORTB_PCR5 = (uint32_t)((PORTB_PCR5 & (uint32_t)~(uint32_t)

                            ( PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x06) ))

                            | (uint32_t)( PORT_PCR_MUX(0x01) ));






Why I must need to clear PORT PCR ISF and set it to MUX 6 first and only in this way can the assign to GPIO(MUX 1) succeed.