µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: Phil on February 11, 2020, 01:22:21 AM
-
Mark,
How do we change serial port settings on an open port? I need to change the baud rate (and possibly other settings) on an open serial port. I have used the serial port feature for years now. This is the first time I've needed to change a port setting in real time.
Thank you.
Phil
-
Phil
See the "set_baud" command on the command line menu (in debug.c).
It calls
fnSetNewSerialMode(0, MODIFY_CONFIG);
to make changes that were made to the UARTs Baud rate or other settings.
Basically one uses the open configuration but instead of FOR_I_O (which allocates queue resources and configures it) as flag one uses MODIFY_CONFIG instead - this just changes the configuration on-the-fly.
Regards
Mark
-
Mark,
I should have known. Sorry.
Thank you for your quick reply.
Best regards,
Phil