I would like to evaluate the EMVSIM2 module . There is a sample code for smartcard which use EMVSIM2 ?
Thanks
Hi Kerry
Thank you for replay.
I have already use the smartcard demo which configured to EMVSIM1
I swapped to EVMSIM2 but my problem is that I use TDA8035 also.
The smartcard demo include option for TDA8035 ,but when I have enabled the option I got problems that I could not resolve, for example:
#if defined(USING_PHY_TDA8035)
context.interfaceConfig.vsel0Port = BOARD_SMARTCARD_VSEL0_PORT;
context.interfaceConfig.vsel0Pin = BOARD_SMARTCARD_VSEL0_PIN;
context.interfaceConfig.vsel1Port = BOARD_SMARTCARD_VSEL1_PORT;
context.interfaceConfig.vsel1Pin = BOARD_SMARTCARD_VSEL1_PIN;
#endif
vsel0Port is expected to uint8_t but on MIMXRT1160 ports are typedef define .
Best Regards
Ronen
Hi @ronen
Thanks for your updated information.
Which board you are testing now? MIMXRT1160-EVK board or your own customer board?
Do you already test your TDA8035 with the SDK smartcard code for EMVSIM1, whether that works or not?
When you switch to the EVMSIM2 , you need to modify the pinmux.c for the EVMSIM2 at first, then the related interface in the main file to EVMSIM2 .
To vsel0Port , it is the structure define:
typedef struct _smartcard_interface_config
{
uint32_t smartCardClock; /*!< Smart card interface clock [Hz] */
uint32_t clockToResetDelay; /*!< Indicates clock to RST apply delay [smart card clock cycles] */
uint8_t clockModule; /*!< Smart card clock module number */
uint8_t clockModuleChannel; /*!< Smart card clock module channel number */
uint8_t clockModuleSourceClock; /*!< Smart card clock module source clock [e.g., BusClk] */
smartcard_card_voltage_class_t vcc; /*!< Smart card voltage class */
uint8_t controlPort; /*!< Smart card PHY control port instance */
uint8_t controlPin; /*!< Smart card PHY control pin instance */
uint8_t irqPort; /*!< Smart card PHY Interrupt port instance */
uint8_t irqPin; /*!< Smart card PHY Interrupt pin instance */
uint8_t resetPort; /*!< Smart card reset port instance */
uint8_t resetPin; /*!< Smart card reset pin instance */
uint8_t vsel0Port; /*!< Smart card PHY Vsel0 control port instance */
uint8_t vsel0Pin; /*!< Smart card PHY Vsel0 control pin instance */
uint8_t vsel1Port; /*!< Smart card PHY Vsel1 control port instance */
uint8_t vsel1Pin; /*!< Smart card PHY Vsel1 control pin instance */
uint8_t dataPort; /*!< Smart card PHY data port instance */
uint8_t dataPin; /*!< Smart card PHY data pin instance */
uint8_t dataPinMux; /*!< Smart card PHY data pin mux option */
uint8_t tsTimerId; /*!< Numerical identifier of the External HW timer for Initial character detection */
} smartcard_interface_config_t;
Seems the code still didn't fully support the TDA8035, although it contains the define, but I find when I open USING_PHY_TDA8035, a lot of code is lacked.
So the existing code for TDA8035 should not complete, as the defined data are not added, eg:
BOARD_SMARTCARD_VSEL0_PORT
I will help you to check it internally.
Any updated information, will let you know.
Best Regards,
Kerry
Hi @ronen ,
Our SDK already support the EMVSIM2, which is the smartcard demo:
SDK_2_11_0_MIMXRT1160-EVK\boards\evkmimxrt1160\driver_examples\smartcard\cm7
You can download SDK from this link:
Wish it helps you!
Best Regards,
Kerry
Hi Kerry
I have connected TDA8035 : Cake8035 board to Evaluation board from Embedded Artist iMX RT1166 Developer’s Kit .
My starting point is the SDK_2_11_0_MIMXRT1160-EVK\boards\evkmimxrt1160\driver_examples\smartcard\cm
my modified pins configuration are
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_07_EMVSIM2_CLK, /* GPIO_AD_07 is configured as EMVSIM2_CLK */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_08_EMVSIM2_RST, /* GPIO_AD_08 is configured as EMVSIM2_RST */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_06_EMVSIM2_IO, /* IOMUXC_GPIO_AD_06_EMVSIM2_IO is configured as EMVSIM2_IO option2*/
0U);
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_09_EMVSIM2_SVEN, /* GPIO_AD_09 is configured as EMVSIM2_SVEN */
0U);
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_10_EMVSIM2_PD, /* GPIO_AD_10 is configured as EMVSIM2_PD */
0U);
It seems that the EMVSIM module work trough TDA 8035 : The SIM card got VCC,Reset an clock . Also the SIM's response passed through I/O bidirectional pin from TDA8035 to the CPU .
But I couldn't get the SIM response on the EVMSIM module (I got that error : "initial character (TS) detection has expired" from the IRQ Handler) ,although I have tested my connections .
Best Regards
Ronen
Hi @ronen ,
About the SDK smartcard code support the TDA 8035 module, I am still checking it internally, as I find the code for the TDA8035 should not complete.
So, please keep patient, any updated information, I will let you know.
When you test the TDA8035, do you enable this define:USING_PHY_TDA8035?
Best Regards,
Kerry
Hi Kerry
I can't enable the define:USING_PHY_TDA8035 since it asked for GPIOs defines is not compatible (int instead of typedef) .
But I familiar with TDA8035, and I think the problem is with EMVSIM2 signal: IO ,Since I have successfully activate the SIM ,and according to the scope measurements, send clocks signals and got replay from the SIM (ATR) .but the CPU couldn't get the even the first ATR byte (T.S)
Best Regards
Ronen
Hi @ronen ,
From your description, the issue should in the ATR detection.
Could you please check the RM this part, whether it is matched or not?
Best Regards,
kerry
Hi Kerry
The configuration for ATR detect is done from SMARTCARD_EMVSIM_Init
It is called from smartcard_test
Best Regards,
Ronen
Hi @ronen ,
So, whether your TDA8035 ATR detect has the difference to the SDK default GSM sim card?
You can check it from the register level side, whether it matches your module. As I don't have your TDA8035 on my side, so I can't test it directly on my side.
Maybe we need to check the difference with the working GSM SIM CARD.
Best Regards,
Kerry