This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
    This widget could not be displayed.
This widget could not be displayed.

Transmit data from SMARTCARD0 interface, I/O in open-drain?

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

Transmit data from SMARTCARD0 interface, I/O in open-drain?

2,907 Views
kovalenkoi
Contributor I

I am realising ISO7816-3 SmartCard interface with level translator. I am using MCU LPC54608 and TXB0104 as level translator. Power level on smart card - 3.0V (Class B), voltage level on MCU - 3.3V. In future also need support Class A (5.0V) and Class C (1.8V). In MCU side I/O pin have pull-up resistor 100k, in SmartCard side pull-up 100k too.

I correct receive ATR, oscillograme of it (clock frequency 2MHz):

Receive_ATR_First_Byte.png

But, if I try to send data to interface, I see this (data byte 0xAA):

Transmit_With_SC_Enable_Bit.png

I see, that data transmited, but translator switch from 1 to 0 and locked in this state.

If I didn't setup "Smart Card Interface Enable" bit in SCICTRL register, I have this oscillograme:

Transmit_Without_SC_Enable_Bit.png

Thus levels sets ok.

Also, in experiments with SC0IO pin (P0.20) in GPIO-mode, I made a state transition table:

  1. Switch Pin State L to Pin State H, then real bus level H.
  2. Switch Pin State H to Pin State L, then real bus level L.
  3. Switch Pin State Z to Pin State L, then real bus level L.
  4. Switch Pin State Z to Pin State H, then real bus level H.
  5. Switch Pin State L to Pin State Z, then real bus level L. No switching! Because translator so work.
  6. Switch Pin State H to Pin State Z, then real bus level H.

So I conclude, that SC0IO in SmartCard mode work as Open-Drain. But open-drain pins (and L-Z pin-switching) - features of I2C or iButton interfaces, in ISO7816-3 this did not use!

Without TXB0104 and speed setup TA=0x96 (clock frequency 5MHz, etu value is 16) and pull up 100k, I have this oscillograme on transmit:

WorkSpeedPullUp100k.png

This confirms, that IO pin work in Open-Drain mode.

Questions:

  1. How I can use SMARTCARD interface in push-pull mode?
  2. Chapter 31.5.11 of UM10912 recommended push-up resistor on I/O pin. What value should be this resistor for big baudrates (TA=0x96 or TA=0x97, i.e. ~300bps and 600bsp) on smartcard bus?
  3. What the level translator recommended by NXP?

SmartCard interface initialization example in attach.

Labels (2)
0 Kudos
Reply
3 Replies

2,743 Views
kovalenkoi
Contributor I

If compare documentation on LPC11U and LPC54xxx familys, then we can see:Compare docs.png

We see, that in LPC11Uxx SCIO pin (USART TXD) work as open-drain. In LPC54xxx this information didn't present. But my issue show that in LPC54xxx SCIO work as open-drain too.

It fact very important for choosing level translator.

0 Kudos
Reply

2,743 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello,

 

Please check below image, 20 Kohm resistors are recommended. For push-pull output you can change OD bit in IOCON registers. Here you will change pen-drain output or push-pull output.

pastedImage_2.png

Regarding the level translator, I am not expert in this matter so I recommend you to create a different question with a detail description in the community space below.

Other NXP Products 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,743 Views
kovalenkoi
Contributor I

This code:
// Program IOCON register to select the SCIn_IO function.
IOCON_PinMuxSet(IOCON, PORT_NUM__SMART_CARD_IO, PIN_NUM__SMART_CARD_IO,
    IOCON_FUNC5 | /* Pin is configured as SCI0_IO */
    IOCON_MODE_INACT | /* No addition pin function */
    IOCON_DIGITAL_EN | /* Enables digital function */
    IOCON_INPFILT_OFF | /* Input filter disabled */
    IOCON_OPENDRAIN_EN /* TEST TEST TEST */
    ); /* I/O as SCIO */

and this:
// Program IOCON register to select the SCIn_IO function.
IOCON_PinMuxSet(IOCON, PORT_NUM__SMART_CARD_IO, PIN_NUM__SMART_CARD_IO,
    IOCON_FUNC5 | /* Pin is configured as SCI0_IO */
    IOCON_MODE_INACT | /* No addition pin function */
    IOCON_DIGITAL_EN | /* Enables digital function */
    IOCON_INPFILT_OFF | /* Input filter disabled */
    ); /* I/O as SCIO */
no effect, in SC-interface mode always Open-Drain mode! As I understand, in IOCON-mode FUNC5, OD-bit didn't actual .

In You picture 20k pull-up sets on SCLK. My question about SCIO-line.

0 Kudos
Reply