Need to use pin PTA4 but not as NMI_b/EZP_CS_b (K21)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need to use pin PTA4 but not as NMI_b/EZP_CS_b (K21)

806 Views
idtericchen
Contributor II

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.

Thanks.

Best regards.

Eric Chen

0 Kudos
3 Replies

513 Views
mjbcswitzerland
Specialist V

Hi

EzPort option is only enabled when the chip starts in EzPort mode - normally it never will.

pastedImage_1.png

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.

Regards

Mark

0 Kudos

513 Views
idtericchen
Contributor II

Hi Mark:

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.

Thanks.

Best regards.

Eric Chen

0 Kudos

513 Views
mjbcswitzerland
Specialist V

Eric

An image was lost in the first post concerning the FOPT configuration on the pin:

pastedImage_0.png

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

Regards

Mark

0 Kudos