I need to use PTA4 as an GPIO input pin on K21 device. The pin can also be used for NMI_b/EZP_CS_b.
But I don't want to use the NMI_b/EZP_CS_b signal (but it is the default setting, ALT7/EzPort).
Do I just need to configure PORTA_PCR4[MUX] = 1 (ALT1) and then also clear set FTFA_FOPT[NMI_DIS] / FTFA_FOPT[EZPORT_DIS] = 0?
Please let me know how I should do.
EzPort option is only enabled when the chip starts in EzPort mode - normally it never will.
NMI is default but can be configured in the flash configuration to be disabled:
Once the processor is running you can switch the pin to whatever configuration you like.
I meet the situation that I use PTA4 to connect a smartcard driver IC.
But it seem to have internal pull-down, I can't finish boot sequence when I supply power to K21 device.
If I remove PTA4 from smart card driver IC, then I can finish boot sequence and enter normal mode.
So I want to know whether I can modify firmware to enter normal mode if PTA4 still be pull-down.
Please let me know your comment.
An image was lost in the first post concerning the FOPT configuration on the pin:
PTA4 has an internal pull-up enabled (whether the NMI function is blocked or not).
Therefore I wouldn't expect the pin connection to make any difference (it should always be logical '1').
The advantage of disabling the NMI function is so that the processor doesn't get interrupted in case something is pulling the input to '0'.