2014-08-01 11:45 PM
Hi,
I'm using RS232 on USART2 of STM32F407 with CubeMx 4.0. I have a protocol which starts with '[' and ends with ']'. I need everythin between 2 braces and I have variable record length. So its not possible to use HAL_UART_Receive_IT because the length need to be known at time of call.Therre is also no way to set a delimiter or any character to stop receving or call HAL_UART_RxCpltCallback when it receives a defined character. Something like readline() or similar. Right now, I have a big buffer (max possible size + 10) and check the huart structure manually and process them when there is anything received.But I think, its not the right way to do that.Have anybody an idea how such problem should be solved?Thanks in advance.2015-04-25 09:39 AM
Hello Reay.rob,
What you did is exactly what I need, could you please share some simple code sample? Thank you Antoine