How to run two tasks simultaneously with stm32f750n8h6

and this is debugging console

We had a call to debug and the issue turned out to be stack overflow which was caught after we enabled FreeRTOS stack overflow checking. The code was using some stack hungry printfs and increasing the size of the stack fixed the memory corruption leading to hard fault/undefined behavior.

2 Likes

No, the Data Ready Pin goes low when the ADC has finished its conversion. It goes high as a result of the ADC being triggered to start a new conversion. When it goes low, that is your indication you can read the result, that doesn’t cause it to sample the input to begin a conversion.

What method are you using to trigger the ADC to do the conversion? Are you sending a SPI command to do so, or are you using the SYNC pin?

If you really need them to convert data sampled at the same time, you want to be using the SYNC pin to trigger the conversion, as you can’t start two SPI commands at the exact same time.

So it turned out to be the most common cause of crashes (stack overflow), caused by the most common cause of stack overflow (printf) as per the most common FAQ :face_with_hand_over_mouth::face_with_hand_over_mouth::face_with_hand_over_mouth:

Moved to the kernel forum category.

1 Like

Yes.
and two tasks running successfully now, it’s because of stack overflow. now i need to add a few more tasks and check.