PanelDue serial port baudrate
-
I am wondering if anyone uses paneldue with port baudrate set lower than 57600. It could go as slow as 9600 but I think such baurdates are used hardly ever if at all. I would rather see baudrates starting from 57600 and higher (57600, 115200, 230400, 460800, 921600). Does it make sense to still making such low speeds like 9600 availabe?
-
Sometimes lowering the baud rate can help in high noise situations or in longer than recommended cable runs.
-
@Phaedrux I am aware what is the intention of low speeds. But are they actually used? And why there is no option for those with short cable that could actually run almost 1Mbit?
-
@BoA said in PanelDue serial port baudrate:
@Phaedrux I am aware what is the intention of low speeds. But are they actually used? And why there is no option for those with short cable that could actually run almost 1Mbit?
Sadly the UARTs in microcontrollers do not yet have the FIFO buffers that became common in PCs around 25 years ago. So at high baud rates there is a risk of receive overrun, if the processor is doing something with interrupts disabled when characters are received, or there are higher priority interrupts to be serviced.
The data rate to/from PanelDue only has to be high enough so that the request for data and the response can both be accommodated within the polling cycle time. Higher baud rates than that don't provide any advantage.
-
@dc42 Hmm... PDC (DMA) would solve the "no fifo" issues. Is it in use?
I think it is time to setup build env on my pc this weekend
-
@BoA said in PanelDue serial port baudrate:
@dc42 Hmm... PDC (DMA) would solve the "no fifo" issues. Is it in use?
I think it is time to setup build env on my pc this weekend
We don't currently use DMA for the UARTs, because there isn't normally enough UART traffic to warrant it. If we do need to increase the baud rate because of more traffic, then we will switch to DMA. It's not entirely straightforward because the DMA needs to wrap around the ring buffer, or switch automatically between two buffers.