Continously Receiving UART Data and Transferring to DMA without Generating Interrupts With Variable Length Data on the STM32L475RE
I am working on a portion of code that handles some UART messages that come in periodically from an LCD. The reception of a message over UART from this screen will generate a response based on the parsing of the message received.
It is part of a larger app, and is not a critical portion of the app execution. Therefore it is not desired to have this generate interrupts- in case of the LCD going haywire and overwhelming the app with messages which tie up the CPU and interferes with the code flow that needs to execute
The messages coming from the LCD are of variable length. I know the maximum possible message length, but that is all. I was using the HAL call (working on STM32L475RE):
HAL_UARTEx_ReceiveToIdle_DMA()
Which was effective since it can receive to either a max length or the RX line going idle. The issue is, i seem to only make this work when I enable the DMA nd UART interrupts and have a callback function which handles the DMA transfer complete interrupt, therefore breaking the desired principle of not using interrupts.
Is there a possible way to continously receive UART data and transfer it to some buffer using DMA without needing to generate interrupts? What I'd really desire is to have some function in the main loop that checks if the DMA buffer has been populated since the last call, and then parse and handle this newly received data- essentially what a callback function would be doing without interrupt generation
