cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3920B_Restart Error

BAkeryy
Associate II

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?

 

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions

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:

  • check that the ST25R3920B IRQ pin is properly connected in case you have a custom board. Probe the pin on MCU side and check that the interrupt is signaled (low to high transition)
  • check that the MCU GPIO connected to the IRQ is configured in interrupt mode and that the interrupt is enabled
  • check that the Interrupt Service Routine is then called when the interrupt transitions from low to high
  • check that the  st25r3916Isr() is then called 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Brian TIDAL
ST Employee

Hi,

can you share more information about your HW and SW environment:

  • is your application based on ST X-NUCLEO-NFC08A1 + NUCLEO-64 board or on a custom board?
  • which MCU is being used?
  • is your application bare metal or based on an RTOS?
  • do you run your own application or one of the demo code provided in ST FW packages (e.g. demo_polling demo)?
  • how is powered your application? (USB?)

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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

 

 

 

 

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:

  • check that the ST25R3920B IRQ pin is properly connected in case you have a custom board. Probe the pin on MCU side and check that the interrupt is signaled (low to high transition)
  • check that the MCU GPIO connected to the IRQ is configured in interrupt mode and that the interrupt is enabled
  • check that the Interrupt Service Routine is then called when the interrupt transitions from low to high
  • check that the  st25r3916Isr() is then called 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.