io

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

io

1,732 Views
syedhashmiraza
Contributor III

hello iam using lpc55s16 "How can I use the USART RX pin as an IO pin?"

 

Tags (1)
0 Kudos
Reply
5 Replies

1,709 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

If your USART RX pin is PIO0_29.

You can refer to the LPC55S1x/LPC551x Product data sheet.

Harry_Zhang_0-1733899348345.png

You can change function of PIO0_29 to 0 function.

BR

Harry

0 Kudos
Reply

1,706 Views
syedhashmiraza
Contributor III

how can i use this pin as io pin

0 Kudos
Reply

1,687 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

As I mentioned in my previous post, you need to change function of PIO0_29 to 0 function.

0 function is the IO function.

You can import the USRAT example form LPC55s16 SDK.

In pin_mux.c, you can change the code

Harry_Zhang_0-1733983859555.png

BR

Harry

0 Kudos
Reply

1,675 Views
syedhashmiraza
Contributor III

iam asking you ISO7816 IO pin how i can  use in this ? i know lpc55s16 is not support iso7816 but in this how i can use io pin ?

0 Kudos
Reply

1,612 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

The LPC55S16 does not natively support ISO/IEC 7816 as it lacks a dedicated hardware module for this protocol. But you can implement ISO7816 functionality using general-purpose IO pins and peripherals like UART with additional software logic to comply with the protocol’s requirements.

I checked and it requires the following steps.

1. IO Pin Setup:
• Assign a GPIO or UART TX/RX pin for the IO line.
• Control direction using software logic.
2. UART Configuration:
• Set up UART for 8 data bits, even parity, and 1 stop bit (8E1).
• Configure the baud rate to match the required ETU.
3. GPIO for RST and CLK:
• Use GPIO pins to toggle the reset and clock lines as per the smart card’s ATR (Answer to Reset) process.
4. Transmit/Receive Logic:
• Implement logic to send and receive data frames, ensuring the proper protocol format (start bit, data bits, parity, stop bit).
5. Clock and Timing Management:
• Use a timer peripheral to generate accurate delays and ensure timing compliance with ISO7816.

BR

Harry

0 Kudos
Reply