I am using ST Link debugger on STM32F407 MCU. I have issues relating to data not loading in correct manner in between differnt circular buffers, used to extract bytes from USART. I wanted to see how thread which extracts frames from the serial [4000]
array behaves with added delay.
Below code plays fine with debuger and I can step into each line, and inspect values of the variables.
//This callback is automatically called by the HAL when the DMA transfer is completed
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) {
// read 50 bytes of raw data to the raw_serial buffer
HAL_UART_Receive_DMA (huart, raw_serial, 50);
//osDelay(10);
//HAL_Delay(10);
// add raw_serial to the serial[4000]
AppendSerial(raw_serial,size);
}
Using either of those delays:
osDelay(10);
HAL_Delay(10);
Causes program execution to get stuck in one of the countdown loops and prevents me from ever reachign a breakpoint located after the wait statment.
Reading this post it seems to me that osDelay
is more apprioprate, when using FreeRTOS.
Only things I can think of causing this is ST Link lacking compatibility or drivers, or inability to include delays from within interrupt triggered callback functions.
Thanks for your help.