cancel
Showing results for 
Search instead for 
Did you mean: 

platformTimer functions while start/stop Nfc scans

raj-muniraju
Associate II

Is there an alternative to platformTimer functions? I started with 6 timers and am currently at 32, Somehow eventually it uses up all the timers and stops working. It seems like the timers are not destroyed when the NFC is deactivated.

Below is my application, Please suggest to me if there is a better way to implement this

Environment:

  • MCU: PSOC6
  • RTOS: FreeRTOS
  • Transceiver: ST25R3916B
  • Communication: SPI
  • Timers: Timers are using FreeRTOS timers.

My application at a high level:

  • Wait for the trigger to start NFC discovery scans
  • On trigger, 
    • Poweron and Initialize ST25R3916B -  rfalNfcInitializ
    • Start NFC discovery scan for ~1sec - rfalNfcDiscover
    • if anything is discovered communicate using T4 commands - rfalNfcIsDevActivated, rfalNfcDataExchangeStart
    • wait for 100msec
    • Stop discovery and deinitialize - rfalNfcDeactivate, rfalDeinitialize
    • repeat these steps 5 times
  • Power off ST25R3916B
  • Go back to sleep to wait for next trigger

My current implementation is based on  /ST25NFC_Embedded_Lib_ST25R3916(B)_1.7.0/Projects/STM32L476RG-Nucleo/Applications/Common/Src/demo_edta.c.

1 REPLY 1
Brian TIDAL
ST Employee

Hi,

I would suggest to use FreeRTOS_polling demo from the ST25NFC_Embedded_Lib_ST25R3916(B)_1.7.0. The plf_adaptation.c file gives a implementation of the timer management for FreeRTOS for the platformTimerXxxx fucntions-like macros.

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.