2024-09-24 07:51 AM - last edited on 2024-09-24 09:03 AM by SofLit
Hi all,
I spent hours but I cannot make UART work in DMA circular mode with RTOS (CMSIS V2).
Can someone send me a simple example ?
I would like to receive characters from PC (various length commands: 8-10 chars) and process them in another task parallel. Then save the position and next time start processing the commands in the buffer from the previous position.
What I experienced is that ReceiveBuffer contains one only character. When I put a breakpoint at HAL_UART_Receive_DMA line and send the characters, in next iteration I see the whole string received.
I guess somehow I have to wait till the streaming is finished.
void StartDefaultTask(void *argument)
{
for(;;)
{
HAL_UART_Receive_DMA(&huart5, (uint8_t*)ReceiveBuffer, 256);
osDelay(1);
}
}
2024-09-24 10:47 AM - edited 2024-09-24 10:48 AM
Hello @Adam90 and welcome to the Community
Please take a look at this GitHub link.
2024-09-24 04:11 PM
We have no idea what you're doing. Show your interrupt code