cancel
Showing results for 
Search instead for 
Did you mean: 

(ST25R3920B) RFAL_ERR_SYSTEM error in ST25R_SELFTEST_TIMER macro

BAkeryy
Associate II

Hi,

Now I am trying to port the rfal library for an ST25R3920B.

I have defined all mandatory part of platform.h and rfal_defConfig.h file.

 

And I enabled the flags ST25R_SELFTEST, ST25R_SELFTEST_TIMER to find out issues of initializing.

The ST25R_SELFTEST is passed without any error, but for ST25R_SELFTEST_TIMER it fails in st25r3916WaitForInterruptsTimed function

 

    st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_GPE );
    st25r3916SetStartGPTimer( (uint16_t)ST25R3916_TEST_TMR_TOUT_8FC, ST25R3916_REG_TIMER_EMV_CONTROL_gptc_no_trigger);
    if( st25r3916WaitForInterruptsTimed( ST25R3916_IRQ_MASK_GPE, (ST25R3916_TEST_TMR_TOUT - ST25R3916_TEST_TMR_TOUT_DELTA)) != 0U )
    {
        platformErrorHandle();
        return RFAL_ERR_SYSTEM;
    }

 

 

And then, I looked closely at the if conditional sentence, and I don't understand it.

The return value of st25r3916WaitForInterruptsTimed() function is not 0 when an interrupt occured without a timeout. right?

So it means when it's an abnormal state, return is zero...

I don't understand why it's an error when the st25r3916WaitForInterruptsTimed() output value is not zero.

 

Is there something wrong with my understanding? If so, please let me know

 

best regards,

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi, 

the ST25R_SELFTEST_TIMER is testing two conditions:

  1. Make sure MCU timer is not expiring too early
  2. Make sure MCU timer is not expiring too late

I think you are looking at the second case: In this case no interrupt should yet be received.

 

BR, Ulysses

View solution in original post

1 REPLY 1
Ulysses HERNIOSUS
ST Employee

Hi, 

the ST25R_SELFTEST_TIMER is testing two conditions:

  1. Make sure MCU timer is not expiring too early
  2. Make sure MCU timer is not expiring too late

I think you are looking at the second case: In this case no interrupt should yet be received.

 

BR, Ulysses