Hello,
I am working on the firmware for stm32f103. I am using SPI with SS to connect with TRF7970a chip. SPI speed is 2 MHz. My goal is to read UID of Mifare Ultralight tag.
I successfully managed to read(+continiuos read) and write(+raw write) registers of TRF and sending commands.
I was working on porting your "TRF7970 Reader Demo" (sloc297c) example project to make it work with STM32F103 MCU, but unfortunately it doesn't work correctly for me.
Now I am trying to follow the sequence to get the UID of Mifare Ultralight 512 Tag, but I have stucked, reading "IRQ Status" register after sending "REQA" command to TRF.
Here is my sequence to initialize TRF for reading ISO14443A type tag:
1) TRF_sendDirectCommand(TRF7970A_CMD_SOFT_INIT);
2) TRF_write(TRF7970A_MODULATOR_SYS_CLK_CTRL, 0x21); // VDD = 5V, Vio = 3.3V
3) TRF_write(TRF7970A_ISO_CTRL, 0x88); // ISO14443A no CRC
4) TRF_write(TRF7970A_CHIP_STATUS_CTRL, 0x21); // turn RF on -> current from power supply increases (12V, 0.05A)
5) Send raw "REQA" command. -> rawWrite ([0x8F 0x90 0x3D 0x00 0x0F 0x26])
6) Delay 10 ms
7) Read "IRQ Status" + dummy read. -> I get [0xFF, 0xFF] from "IRQ status (expect to get [0xC0, 0x3E])
8) Read "FIFO Status" -> I get [0xFF] (expect to get [0x02])
9) ...
So, after step 5 (REQA raw write) IRQ Pin of TRF7970 goes HIGH and doesn't come LOW, even after "IRQ Status" register reading.
The values I get from "IRQ Status" and "FIFO Status" are not expected. I can't continue to next steps (getting UID by raw writing "AntiColl" command).
Can you please tell me what are my mistakes, why I can't get correct IRQ status and why does IRQ pin not goes LOW after interrupt. It might I have missed something, but I couldn't deal with it yet.
Regards,
Demian Z
