Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
12 years, 11 months ago.
Serial baud rate change on the fly
Is it possible to change the Serial baud rate on the fly?
I need to initialise a 4Dsystems Oled display using the Picaso controller that starts (autobaud) at 9600, then I need to chnage the Mbed to a higher speed (115200), can't see a way to do this. The processor hangs if I call baud again durring the program after I have sent the code to speed up the display baud. I know the display changes to the higher speed if I keep the power to the display and reset the Mbed with the coresponding baud rate. Any ideas?
Paul
Question relating to:
1 Answer
12 years, 11 months ago.
Thank you Erik for responding.
As you have confirmed I can change the baud rate on the fly, I perused the issue and managed to get it working. the problem was the baud rate had been defined so trying to call baud again seemed to 'hang' the CPU. I found the '#undef' function and redefined the baud after sending the baud rate change code to the display. That worked and I'm now up and running :)
Post your code, without code we cant say much. Changing baudrate on the fly shouldnt be a problem and simply possible by calling baud when you like a different baudrate.
posted by Erik - 21 Dec 2012