2024-01-19 01:45 AM - last edited on 2024-01-19 02:12 AM by Brian TIDAL
Now I want to make a poller using ST25R3920B.
Main mcu is communicating with spi.
I tried to turn it to task after initialize, but there was an error in rfalFieldOnAndStartGT() and I followed the code
ret = st25r3916PerformCollisionAvoidance( ST25R3916_CMD_INITIAL_RF_COLLISION, ST25R3916_THRESHOLD_DO_NOT_SET, ST25R3916_THRESHOLD_DO_NOT_SET, (ST25R3916_REG_AUX_nfc_n_mask & gRFAL.timings.nTRFW) );
st25r3916ExecuteCommand( FieldONCmd );
There is an error in the upper part.
When I checked using printf(), the previous line of that line was printed, but the software continues to restart.
I think ST25R3916_CMD_INITIAL_RF_COLLISION Direct Command seems to be a problem. But I don't know why this is related to reset (reboot)...
Has anyone experienced any of these or similar issues?
Solved! Go to Solution.
2024-01-24 01:48 AM
Hi,
for being able to provide you an efficient support, do not hesitate to answer to the questions from my previous post (if you prefer not to disclose information on the forum, you can send me your answer in a private message).
It looks like the interrupt is not received:
Rgds
BT
2024-01-19 02:22 AM
Hi,
can you share more information about your HW and SW environment:
This issue looks like a power drop when setting the field on and causing CPU reset. Can you monitor the voltage on the supply pin of your MCU?
Rgds
BT
2024-01-24 12:38 AM
Hi,
I'm sorry for the late confirmation. I thought it was my mistake of not setting interrupt part to platform.h file.
Actually, now I have defined all mandatory part of platform.h and rfal_defConfig.h file.
(followed guideline of pdf file - um2890-rfnfc-abstraction-layer-rfal-stmicroelectronics.pdf)
And also I enabled the flags ST25R_SELFTEST, ST25R_SELFTEST_TIMER to find out issues of initializing.
but for the ST25R_SELFTEST it fails in st25r3916WaitForInterruptsTimed() function ;
/*
* Check IRQ Handling:
* - use the Wake-up timer to trigger an IRQ
* - wait the Wake-up timer interrupt
* - return RFAL_ERR_TIMEOUT when the Wake-up timer interrupt is not received
*/
st25r3916WriteRegister( ST25R3916_REG_WUP_TIMER_CONTROL, ST25R3916_REG_WUP_TIMER_CONTROL_wur|ST25R3916_REG_WUP_TIMER_CONTROL_wto);
st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_WT );
st25r3916ExecuteCommand( ST25R3916_CMD_START_WUP_TIMER );
if(st25r3916WaitForInterruptsTimed(ST25R3916_IRQ_MASK_WT, ST25R3916_TEST_WU_TOUT) == 0U )
{
platformErrorHandle();
return RFAL_ERR_TIMEOUT;
}
In st25r3916WaitForInterruptsTimed() function, any interrupt did not occured so the return value was always 0.
Could you help me to find out reason and solve this error? It's hard to solve by myself.
Thank you very much
2024-01-24 01:48 AM
Hi,
for being able to provide you an efficient support, do not hesitate to answer to the questions from my previous post (if you prefer not to disclose information on the forum, you can send me your answer in a private message).
It looks like the interrupt is not received:
Rgds
BT