71
NXPTM M522XX, KINETIS and i.MX RT / Re: Closing and reopening handles
« Last post by mark on June 21, 2023, 03:24:47 PM »Hi Neil
You can call with the ucDriverMode set to MODIFY_CONFIG is you want to change the UART settings (such as the baud rate).
The UART doesn't support close and re-open since this is something that is never (up to now) needed in an embedded system. It would be possible since the driver handles a close but it would require the UART's memory management to be changed to use dynamic heap (such as when the buffer sizes need to change) rather than uMalloc() as it presently uses.
If you want to stop the UART for some time you can also do
fnDriver( GSMPortID, ( TX_OFF | RX_OFF ), 0 );
and then later re-enable it with
fnDriver( GSMPortID, ( TX_ON | RX_ON ), 0 );
Regards
Mark
You can call with the ucDriverMode set to MODIFY_CONFIG is you want to change the UART settings (such as the baud rate).
The UART doesn't support close and re-open since this is something that is never (up to now) needed in an embedded system. It would be possible since the driver handles a close but it would require the UART's memory management to be changed to use dynamic heap (such as when the buffer sizes need to change) rather than uMalloc() as it presently uses.
If you want to stop the UART for some time you can also do
fnDriver( GSMPortID, ( TX_OFF | RX_OFF ), 0 );
and then later re-enable it with
fnDriver( GSMPortID, ( TX_ON | RX_ON ), 0 );
Regards
Mark