Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
MIMXRT1050_EVK and MIMXRT1170_EVK
Fix bug where calling set_format in MBED (which calls serial_format) causes the CTRL register to become corrupt due to saving its initial value to a uint8_t when the register is 32 bit wide
Change temp variable from uint8_t to uint32_t in serial_api.c
Fixes #15342
Impact of changes
Migration actions required
Documentation
None, bug fix to serial API
Pull request type
Test results
Manually tested on MIMXRT1050_EVK, baud rate no longer changes to a random value after calling serialPort->set_format()
Not tested on a MIMXRT1170_EVK as I do not have access to one. Confirmed CTRL register is 32bit in section 71.5.1.8 of the MIMXRT1170 Reference Manual. The lpuart block appears identical across the 1050, 1060 and 1170 model range.
Reviewers