K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

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

K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

1,392 Views
yklee1
Contributor II

Dear Team,

 

My customer found something strange at SmartCard interface like below.

At below point SmartCard is off with the response for example 0x6A(Application errors).

If you have, could you please share your experience with below codes?

 

@smart_card.c

/* Parse the ccid command */

static usb_status_t USB_DeviceCcidSmartCardCommandParse(usb_device_ccid_command_struct_t *command)

{

uint8_t EMVL1_SendApduCommand(uint8_t *commandApdu,

                              uint32_t commandApduLength,

                              uint8_t *ResponseApdu,

                              uint32_t *ResponseApduLength)

{

 

 if (error != kStatus_CCID_EMV_Success)

        {

            ccidResponse->bStatus =

                (USB_DEVICE_CCID_SLOT_STATUS_COMMAND_STATUS_FAILED) | (USB_DEVICE_CCID_SLOT_STATUS_ICC_PRESENT_ACTIVE);

            ccidResponse->bError = USB_DEVICE_CCID_SLOT_ERROR_HW_ERROR;

            EMVL1_SmartCardPowerOff();

            usb_device_ccid_data_block_response_t *ccid_datablock =

                (usb_device_ccid_data_block_response_t *)&g_UsbDeviceCcidSmartCard

                    .slotsAtrBuffer[usbDeviceCcidCommand->bSlot][0];

            receiveLength = USB_DEVICE_CCID_ATR_BUFFER_LENGTH - USB_DEVICE_CCID_RESPONSE_HEADER_LENGTH;

            EMVL1_SmartCardPowerOn(ccid_datablock->abData, &receiveLength);

        }

 

Best Regards,

YK Lee

Labels (1)
0 Kudos
3 Replies

1,241 Views
yklee1
Contributor II

Hi Iva,

Thanks a lot for your help.

Actually customer is using UART IF for Smartcard IF.

Best Regards,

YK Lee

0 Kudos

1,240 Views
ivadorazinova
NXP Employee
NXP Employee

Hello YK Lee,

Please, are you using USB IF to Smartcard IF?

Thank you.

Best Regards,

0 Kudos

1,241 Views
ivadorazinova
NXP Employee
NXP Employee

Hi YK Lee,

thank you for your question.

We will let you know as soon as possible.

Best Regards,

Iva

0 Kudos