ZacckOsiemo
ZacckOsiemo
DIIDevHeads IoT Integration Server
Created by Marvee Amasi on 6/24/2024 in #middleware-and-os
How to Handle Time-Critical Sensor Data Interrupts Efficiently in FreeRTOS on STM32F4?
Hmmm, I wouldn't be able to help you with your specific issue, as that would amount to doing it. Here is the thing, you don't want to do anything lengthy, or expensive in an ISR. Basically you want to do stuff, like RX data, Indicate RX, Ack RX. This is for ISRs in general RTOS or not. Ok thats the first part. The next thing is since you have this awareness, whenever you have some task arriving by ISR or Event you should be ready to handle it. So in your case you know some sensor data is going to come in by ISR, and you should be ready to handle it. Outside of the ISR remember. In freeRTOS this would amount to roughly the following steps 1. Define a function that creates your processing task 2. Schedule the above Function from the ISR this is called pending in freeRTOS 3. Define your task that will be created by the function above 4. Any configuration you need so that your RTOS daemon can get the scheduled function and at some point invoke it. take time and care to make sure your logic, or thinking is RTOS aware. Most of the time it's not a code issue. Its a logic issue. I hope this helps somewhat.
9 replies