cancel
Showing results for 
Search instead for 
Did you mean: 

RFAL_ERR_WRONG_STATE returned by rfalNfcvPollerExtendedReadMultipleBlocks

Jack5
Associate

Hi, 
I rarely see that the api rfalNfcvPollerExtendedReadMultipleBlocks() returns RFAL_ERR_WRONG_STATE .

When will this api return this error code ?

My state machine is as follows:

 

while(1)
{

rfalNfcDiscover();
rfalNfcGetActiveDevice()
rfalNfcDeactivate(RFAL_NFC_DEACTIVATE_IDLE)
rfalFieldOnAndStartGT()
rfalNfcvPollerExtendedReadMultipleBlocks()
rfalFieldOff()
}

 

All apis return RFAL_ERR_NONE when the issue happens, other than "read extended multiple blocks" api ..

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hello Jack5,

in your user code you should not be calling rfalFieldOnAndStartGT() and rfalFieldOff(), these two functions are handled inside rfalNfc layer. When being notified about found tags your code should get the rfalNfcGetDevicesFound(), then rfalNfcSelect() one and then you can start data exchange (either through rfal_nfc layer but it is also o.k in this state to bypass by using rfalNfcvPoller*() functions.

BR, Ulysses

View solution in original post

1 REPLY 1
Ulysses HERNIOSUS
ST Employee

Hello Jack5,

in your user code you should not be calling rfalFieldOnAndStartGT() and rfalFieldOff(), these two functions are handled inside rfalNfc layer. When being notified about found tags your code should get the rfalNfcGetDevicesFound(), then rfalNfcSelect() one and then you can start data exchange (either through rfal_nfc layer but it is also o.k in this state to bypass by using rfalNfcvPoller*() functions.

BR, Ulysses