Duggle Posted June 4, 2013 Report Posted June 4, 2013 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?
TK. Posted June 6, 2013 Report Posted June 6, 2013 STM32 or LPC17? 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) Best Regards, Thorsten.
Duggle Posted June 7, 2013 Author Report Posted June 7, 2013 Thanks, TK. It happens to be STM32 though I will be testing it on LPC17 later. I'll do some diagnostic debug messages and post back. I had some trouble with USB debug messages in the display driver code interfering with the ability to upload code to the Core. I think this could have been made worse by the large amount of data being sent in the messages. I can always resort to UART midi for the debug messages if I have to.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now