platformTimer functions while start/stop Nfc scans
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.
