Jump to content

MIOS32_UART_BaudrateSet


Duggle
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...