I’d like to set the baud rate on a UART different from the MIDI rate that is default. (I’m developing a display driver).
I’ve found call’s to MIOS32_UART_BaudrateSet(..) ineffective. (Sorry I dont recall the value returned).
Most of the functions in MIOS32_UART say “Applications shouldn’t call this function directly, instead please use MIOS32_COM or MIOS32_MIDI layer functions”
I’m finding that setting
#define MIOS32_UART2_BAUDRATE 715250
in mios32_config.h works perfectly.
I’d prefer to initialise the uart in the driver init call to make it as easy as possible to build this display into an application.
What calls do I need to make to set the uart baudrate at runtime?
The Baudrate initialisation code is located in $MIOS32_PATH/mios32/*/mios32_uart.c, MIOS32_UART_BaudrateSet should also work on re-configurations… but I never tried this by myself.
You could add some debug messages in order to find out why the re-initialisation is failing.
(this would help me, because I’ve currently 0 time to debug such issues by myself)