cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read the ISO14443-4 card using st25r3917 with stm32L4A6VG?

KLAM.1
Associate III

Hi there,

I am a beginner of using customize board to build a project for reading a ISO 144443-4 card . The project demo(polling) that I search in previous post is using a different MCU. Also, I read the rfal_platform header file. It is using the SPI communication. Is it possible to configurate it using I2C communication?

First question, Am I supposed to use the ISO_DEP feature to read the card? 

Second question , I know that I need to configure the GPIO , interrupt pin and the serial communication interface (SPI,I2C....). how can I initialize the St25r3917? What steps or functions must include in initialize process?

Third question, If I am only reading the card UID ,which project or example I should take it as a reference and what command I should use for reading the card or how can I adjust from the existing project to build the Functionality? Based on my understanding of the RFAL document ,I think I only need to achieve the polling to screen the card UID.

Thanks a lot

Regards, Kin Hong

24 REPLIES 24
KLAM.1
Associate III

Hi

I now realize that the BSP_I2C1_IRQHandler wasn't call and i check it the program never go to the st25r3916isr() function.Now I have modified the EXIT_IRQHandler function and now the problem get stuck.I follow the polling example. I would like to ask do I have something missing?

Also,I wonder in the rfal_platform.h the platformIrqST25RSetCallback(cb) , platformIrqST25RPinItialize(). What function should I link it to? I will provide the picture below.

Thanks alot

Best regards,

Kin Hong


_legacyfs_online_stmicro_images_0693W00000bkLCiQAM.png
_legacyfs_online_stmicro_images_0693W00000bkLMSQA2.png
_legacyfs_online_stmicro_images_0693W00000bkLN1QAM.png
_legacyfs_online_stmicro_images_0693W00000bkLLBQA2.png
_legacyfs_online_stmicro_images_0693W00000bkL7SQAU.png
_legacyfs_online_stmicro_images_0693W00000bkL7NQAU.png

KLAM.1
Associate III

Hi

For the new update ,I have run the st25r3916initalize() again and now I found the error in the st25r3916.c line 181 about the st25r3916WaitForInterruptsTimed(),it seems the irq handling is not properly configurate.Do you have any idea about it? thanks a lot.

Best regards,

Kin Hong

 
_legacyfs_online_stmicro_images_0693W00000bkMhMQAU.png
_legacyfs_online_stmicro_images_0693W00000bkMcgQAE.png 

KLAM.1
Associate III

Hi

  • I have some updated .I retry the SELF TEST again and found some ERROR in the SELF TEST .There is a problem with the st25r3916EnableInterrupts the function do not write any value into the 4 interrupt register from address 16h to 19h when calling st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_WT ); .Therefore I read the value in those four register it turn out all 0 so the interrupt so I am not sure the register is masked properly. What is the proper st25r3916interrupt.mask when calling st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_WT ); ?because it seems that the function is doing anything when calling st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_WT ); Finally,it return RFAL_ERR_TIMEOUT when the Wake-st25up timer interrupt is not received

  • Furthermore , I want to ask which register should I read to see the status is really masked as you have mentioned "st25r3916WaitForInterruptsTimed() will wait for the values inside st25r3916interrupt.status" ? The last two pictures show the error in the log and the code when I am doing the SELF TEST .Also I want to ask about st25r3916interrupt.mask . What is the normal mask value when calling the st25r3916ModifyInterrupts function ? thanks a lot

Best regards,

Kin Hong


_legacyfs_online_stmicro_images_0693W00000bkQLFQA2.png
_legacyfs_online_stmicro_images_0693W00000bkMp7QAE.png
_legacyfs_online_stmicro_images_0693W00000bkPZLQA2.png
_legacyfs_online_stmicro_images_0693W00000bkPdNQAU.png
_legacyfs_online_stmicro_images_0693W00000bkPdSQAU.png

KLAM.1
Associate III

Hi

  • I have some updated .I retry the selftest again and found some bug in the self test .I have passed the selftest part and move forward to the ST25R3916B test .There is a problem with st25r3916ExecuteCommandAndGetResult(),the program get stuck after sending out st25r3916ExecuteCommand( 0xEA ) ,the interrupt get triggered after sending out the command but then the program get stuck. Thanks a lot

Best regards,

Kin Hong


_legacyfs_online_stmicro_images_0693W00000bkR82QAE.png
_legacyfs_online_stmicro_images_0693W00000bkR6fQAE.pngI2C send out 0xEA data


_legacyfs_online_stmicro_images_0693W00000bkR6kQAE.pnginterrupt get triggered after the i2c send out data finished


_legacyfs_online_stmicro_images_0693W00000bkR70QAE.pngsend out the command 0xea


_legacyfs_online_stmicro_images_0693W00000bkR8RQAU.pngAfter sending out the command


_legacyfs_online_stmicro_images_0693W00000bkR8lQAE.pngprogram get stucked

Ulysses HERNIOSUS
ST Employee

Hi,

not clear what you mean by "get stucked"... Which loop? Waiting for which signal? You say the ISR gets executed, what is the read-out of interrupt mask registers inside there?

Regards, Ulysses