2021-03-01 11:32 PM
STM32L476VG is the MCU we are interfacing with ST25R3911B using SPI.
what we have understood from some search is that we need RFAL (abstraction layer) to interface with RF HAL.
Then once we integrate RFAL and RF HAL in our system workbench(ac6) project we need to build the integration then use SPI calls to read the register from RFID reader ST25R3911B
we wanted to use ISO-14443A standard to be configured and read the values.
where do we get the basic RFAL work space or code flow so that we shall use in our current project?
Kindly guide us and let us know are we in right path?
Solved! Go to Solution.
2021-03-08 09:58 AM
Hi Ravi
for testing the SPI, just add the following code in main.c line 127 before the call to demoIni()
st25r3911WriteRegister( ST25R3911_REG_BIT_RATE, ST25R3911_TEST_REG_PATTERN );
if( !st25r3911CheckReg( ST25R3911_REG_BIT_RATE, (ST25R3911_REG_BIT_RATE_mask_rxrate | ST25R3911_REG_BIT_RATE_mask_txrate), ST25R3911_TEST_REG_PATTERN ) )
{
platformLog("SPI test failed...\r\n");
while (1);
}
platformLog("SPI communication OK...\r\n");
make sure to remove st25r3911WriteRegister( ST25R3911_REG_BIT_RATE, ST25R3911_TEST_REG_PATTERN ); in line 196 (after demoCycle)
Connect a serial terminal on virtual com port and check the output log.
Once the SPI communication is OK, make sure to st25r3911Isr(); being called in the EXTIxxxxx_IRQHandler interrupt call back as explained in one of the previous posts.
Rgds
BT
2021-03-09 12:51 AM
2021-03-09 01:30 AM
Hi BT,
I tried doing
st25r3911WriteRegister( ST25R3911_REG_BIT_RATE, ST25R3911_TEST_REG_PATTERN );
and then st25r3911ReadTestRegister(buf2,val); I have attached the code ..kindly let me know where the problem is ..I am not getting value 0xx33 when I read...
also SPI is failing...kindly guide me
regards
Ravi
2021-03-09 02:21 AM
Hi Ravi,
the SPI configuration is not correct. In STM32CubeMX, the SPI configuration should be:
(make sure to adjust the prescaler value according to your clock frequency to keep the SPI speed under or equal to 6 Mbps)
See also MX_SPI1_Init in the reference project for proper value if you want then to check the generated code.
Rgds
BT
2021-03-09 02:50 AM
Hi BT,
I tried changing the parameters..but I am getting following warning
These IPs still have some not configured or wrong parameter values:
[STMicroelectronics.X-CUBE-NFC4.2.0.2, Verify the Platform Settings Tab ]
where will I get platform setting tab for this??
regards
Ravi
2021-03-09 03:16 AM
Hi BT,
I tried going forward with warning but STMcubeMx generated folder called as NFC which has custom_nfc04a1.c ,should we need this
In file included from ../NFC/custom_nfc04a1.c:57:0:
../NFC/custom_nfc04a1.h:49:10: fatal error: st25dv_conf.h: No such file or directory
and I am seeing following error message.Kindly let me know.
regards
Ravi
2021-03-09 03:20 AM
Hi BT,
Under software pack -> manage software packages ->x-cube-NFC4 2.02 and 2.0.1 is showing as green ..whereas in select componens ..it says unreolvable dependencies.is there any issue which is causing this problem??..Thanks for all your support..we just want SPI functionality to be up..kindly guide us.
regards
Ravi
2021-03-09 03:44 AM
Hi BT,
I need to undo NFC packages in cubeMx which is for dynamic tags ...how shall I undo this so that I shall move on??
regards
Ravi
2021-03-09 05:00 AM
2021-03-09 05:03 AM
Hi Ravi,
I would personally restart from scratch.
Rgds
BT