cancel
Showing results for 
Search instead for 
Did you mean: 

Need full-duplex connection to modem UART. Can UART driver be extended?

bobmc_rmm1
Associate II

The UART driver has much code with detailed comments for the the things it can do. However, it should come with a disclaimer "No support for full-duplex" which is the most basic use-case. My application needs full-duplex for connection to a u-blox modem UART at 115200. It uses the legacy AT commands for modem setup.

So the driver needs to enable interrupts during init and leave them on until the port is closed. But the following routine decrements a buffer count and disables interrupts when it becomes 0.

"static HAL_StatusTypeDef UART_Receive_IT(UART_HandleTypeDef *huart)"

I have a simple patch which skips the counter decrement and copies bytes to a ring buffer. It works well but will get wiped out when code is regenerated.

What can be done. Is it possible to get an official driver with full-duplex mode.

1 REPLY 1
S.Ma
Principal

Well there should be some example of AT commands modem examples such as in X-CUBE-CELLULAR package.

Some other way to look at it is to use DMA cyclic mode on a rolling buffer and analysing it every 1 msec (time slice vs byte base).