2018-08-17 03:51 AM
I'm trying to use the X-CUBE-NFC5 Code in an freeRTOS Project. With only one Task it works well, but when i try to add an other Task it does not. Depending on Task priorities the demo cycle is still working but all other tasks are starving or it even does not work at all.
What am i doing wrong?
Solved! Go to Solution.
2018-08-20 01:37 AM
Hi Philip,
the code is built for non-OS. If you want to use it with an OS you need to adapt it:
I would see two different general concepts:
Either put the rfalWorker() into its own task and make sure gets called as needed. Or have the caller the caller of rfal call it.
Depending on your requirements you don't need to call rfalWorker() in dense loop but only call it periodically. E.g. put some "OS_Delay()" between these calls. The time you can delay there depends on what you want to achieve. I you need to guarantee EMD suppression according to EMVCo/ISO10373 the delay cannot be more than a few micros. If you have longer frames (>96 bytes) rfalWorker needs to refill the FIFO. Here it then depends on the used bitrate. Probably 1ms delay should work for guaranteeing proper FIFO operation.
Regards, Ulysses
2018-08-20 01:37 AM
Hi Philip,
the code is built for non-OS. If you want to use it with an OS you need to adapt it:
I would see two different general concepts:
Either put the rfalWorker() into its own task and make sure gets called as needed. Or have the caller the caller of rfal call it.
Depending on your requirements you don't need to call rfalWorker() in dense loop but only call it periodically. E.g. put some "OS_Delay()" between these calls. The time you can delay there depends on what you want to achieve. I you need to guarantee EMD suppression according to EMVCo/ISO10373 the delay cannot be more than a few micros. If you have longer frames (>96 bytes) rfalWorker needs to refill the FIFO. Here it then depends on the used bitrate. Probably 1ms delay should work for guaranteeing proper FIFO operation.
Regards, Ulysses