How to initialize ST25R3911B and problem with antenna tuning?
Hello,
I'm using Nucleo 32f070RB and X-Nucleo 05a1 (st25r3911b).
At first, I started to itialize chip. I'm doing this with following the steps of "Power-up sequence" section in datasheet of st25r3911b, page 36.
There is my code
spiDirectComand(0xC1); // set chip to default
spiWrite(IO_CONFIGURATION_REG_1, 0x08); // just in case set 0x00h register to default 0x08
spiWrite(IO_CONFIGURATION_REG_2, 0x00); // just in case set 0x01h register to default 0x00
spiWrite(OPERATION_CONTROL_REG, 0x80); // Enable odcilator and regulator
HAL_Delay(100);
spiDirectComand(0xD6); // Direct command "Adjust Regulator"
HAL_Delay(100);
spiDirectComand(0xD8); // Direct command "Calibrate Antenna"
HAL_Delay(100);
test2 = spiRead(ANTENNA_CALIBRATION_TARGET_REG); // Just to check the value in the reg.
spiDirectComand(0xD9); // Direct command "Measure phase"
HAL_Delay(100);Now I have one proglem and one question:
- Befor AND after execution of Direct command "Calibrate Antenna", the Antenna Calibration Target Rregister is the same all the time. I think this is not right? (In data sheet is written that Antenna tuning Direct command insert the changes in the Antenna Calibration Target Rregister)?
- Is there some other steps I need to include into my "Chip Initialize" code?
I'm new user of STM MCU devBoard and NFC technology, so I hope this is not stupid questions :)
Thank you for all the time spend for me,
Domen
