Skip to main content
Visitor II
March 3, 2025
Solved

platformTimer functions while start/stop Nfc scans

  • March 3, 2025
  • 1 reply
  • 305 views

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.

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    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

    1 reply

    Technical Moderator
    March 3, 2025

    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