Neculai Agavriloaei

Comments related to the PN7150 NFC library

Discussion created by Neculai Agavriloaei on Jan 12, 2020
Latest reply on Jan 21, 2020 by Neculai Agavriloaei



I just managed to adapt the source code example for PN7150 for the EVK-RT1064 board and for the Arduino PN7150 board (source code: evkmimxrt1060_PN7150).


I used the latest versions of MCUxpresso IDE and FreeRTOS.

It was a lot of work but I would like to show you a simple example of the problem solved.


It's about the Sleep () function. This function is wrong and had to be adapted as in the example below:


void Sleep(unsigned int   ms)
   // SemaphoreHandle_t xSemaphore = NULL;

   // xSemaphore = xSemaphoreCreateBinary();
   // xSemaphoreTake( xSemaphore, portTICK_PERIOD_MS * ms);
   // vSemaphoreDelete(xSemaphore);


vTaskDelay ((ms * configTICK_RATE_HZ) / 1000);


What I do not like about this function is that a multiplication and division operation is required.

I will think of an optimization of it !!


Another simpler example is this:

vTaskDelay (ms / portTICK_PERIOD_MS );