2021-12-23 09:01 AM
Hello all,
I am developing a small reader with ST25R3912 and I can't use the RFAL library because I want to control it in the final application MCU STM8L. I was inspired by this discussion (https://community.st.com/s/question/0D50X00009XkWIfSAN/register-settings-for-st25r3911b-for-iso-15693) and based on it I wrote a short test program that will try to read the UID from Tag (I only use tag 15693 - inside the ICODE SLIX chip). RF IC using 3.3V power supply and antenna is single sided (components recommended by STM25 Antenna Matching Tools)
My ST25R3912 initialization looks like:
WriteToSPI (0x00,0x8B); //IO configuration register 1 - address 0x00
// single side antenna, use RFO1, RFI1, 64 water level for recieve, 32 water level for transmit, 27.12 MHz Xtal, MCU CLK set 6.78MHz, no MCU CLK if Xtal not running
WriteToSPI (0x01,80); //IO configuration register 2 - address 0x01
//3.3V supply in range: 2.4 V to 3.6 V, Enable VSP_D regulator, MISO pull down disabled when SS low, MISO pull down disabled when SS high, Increase MISO driving disabled, slow ramp at Tx on disabled
WriteToSPI (0x02,0xC8); //Operation control register - address 0x02
// Enables oscilator and regulator (ready mode), Enables Rx operation, Both AM and PM channels enabled, Automatic channel selection, Enable Tx operation, Wake-up mode disable
WriteDirectCmdToSPI (DCMDAdjustRegulators); //direct command Adjust Regulators 0xD6
WriteToSPI (0x03,0x70); //Mode definition register - address 0x03
// target: initiator, 1110 means Sub-carrier stream mode, no automatic start response RF collision
WriteToSPI (0x04,0x22); //Bit rate definition register - address 0x04
// 0010 means Tx bit rate fc/32, 0010 means Rx bit rate fc/32
WriteToSPI (0x08,0x30); //Stream mode definition register - address 0x08
// 01 means subcarier frequency fc/32 (424kHz), 10 means sub carrier pulses 4, 000 means time period fc/128
WiteToSPI (0x09,0x10); //Auxillary definition register - address 0x09
// recieve without CRC, make CRC check, OOK, Enable external field detector, RFO driver tristate disable, BPSK more tolerant disable
WriteToSPI (0x24,0x2C); //AM modulation depth control register - address 0x24
//AM modulated level is defined by bits mod5 to mod0, 010110 means 14.7% (also tested with 01110000 30%)
WriteDirectCmdToSPI (DCMDAnalogPreset); // 0xCC
//direct command Analog preset based on Mode definition register and Bit rate definition register
WriteDirectCmdToSPI (DCMDCalModulationDepth); //direct command RFID calibrate modulation depth 0xD7
When I try read some register it looks that my configuration is inside cerrectly.
I'm not entirely sure which registries need to be configured and which don't. is this configuration correct for the 15693 chip and ICODE SLIX inside the label?
Solved! Go to Solution.
2023-01-12 01:41 AM
Hi,
if a tag doesn't feel addressed then it will not answer. I think in this case you are setting the Selected flag but you haven't sent a Select command before.
I would start with a broadcasted read first (and one tag in the field): Clear both Select Addressed flag. When you have that working move to using Adressed mode and a potential opimization on your side could be to send an addressed Select and afterwards selected Read commands.
Best Regards, Ulysses
2023-01-12 03:01 AM
Dear Ulysses,
I have tested deleting both address flags and it looks good. So far I'm only getting RAW data, but I can see SOF and the rest of the data looks good too, as does the FIFO register. I will test decoding similar to the UID raw data....
I thought if I don't use addressed mode, it's automatically selected mode. My assumption was wrong (life is about continuous learning)!
In principle, I'll stick with this mode. I won't use address mod in me application because the miniature tag is 2x2mm and the antenna is similarly sized and it is mechanically impossible to have 2 tags near the antenna at the same time.
Thank you for the amazing help that one does not get from other manufacturers. I am glad that both chips (RFID and MCU) are from ST and hope that the solution will be approved by the customer and go into production.