Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.5k
ports/mimxrt: Update nxp_driver to MCUX_2.16.100.#18333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
codecovbot commentedOct 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #18333 +/- ##==========================================- Coverage 98.38% 98.38% -0.01%========================================== Files 171 171 Lines 22297 22294 -3 ==========================================- Hits 21936 21933 -3 Misses 361 361 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
github-actionsbot commentedOct 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Code size report: |
Thank, Anrew. I can test other boards. Is is sufficient to fetch the PR and update the submodules to get the new lib, or do I have to run |
Thanks@robert-hh just the PR checkout and the submodule to the pinned commit should be fine. Out of interest is there a particular set of tests / peripherals you think are higher risk than others? Have you seen issues on anything specific in the past (other than the uart idle) ? I do have a rt1010 Dev board and an arch mix (rt1052) here but other than "boots to repl" I'm not sure what tests will add particular value really without extra hardware. |
Updated: Fixed UART IRQ Wrapper ImplementationI've updated the wrapper implementation to fix a critical bug where Problem FoundThe original single wrapper approach failed because:
Binary analysis confirmed the wrapper function was compiled but never executed - the SDK function pointer was stored in Solution: Double WrapperThe fix wraps both void__wrap_LPUART_TransferCreateHandle(LPUART_Type*base,lpuart_handle_t*handle,lpuart_transfer_callback_tcallback,void*userData) {__real_LPUART_TransferCreateHandle(base,handle,callback,userData);// Override SDK's stored function pointer with our wrapper's addressuint32_tinstance=LPUART_GetInstance(base);s_lpuartIsr[instance]=__wrap_LPUART_TransferHandleIRQ;} This ensures our IRQ wrapper is installed in the dispatch table and actually gets called. Testing PerformedTested on SEEED_ARCH_MIX (MIMXRT1052DVL6B) with TX/RX loopback: IRQ_TXIDLE test (
IRQ_RXIDLE test (
Both tests verified that the wrapper correctly handles SDK 2.16's refactored idle line handling where Code Size Impact
Changes
|
andrewleech commentedNov 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
SDK 2.16 Upgrade Validation SummaryTesting PerformedPerformed some limited testing on SEEED_ARCH_MIX (MIMXRT1052DVL6B) board: 1. Boot and Console Communication
2. Peripheral Initialization (Clock System Validation)
Confirms PFD clock calculations remain correct despite SDK driver changes 3. SDRAM Memory Subsystem (SEMC Controller)
4. GPIO Functionality
5. Virtual Timer
6. RTC (Real-Time Clock)
7. Flash Filesystem (FlexSPI Controller)
Testing LimitationsNot Tested:
Testing Method: |
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Summary
Following on from#16235 this PR updates the nxp_driver submodule from 2.11 to 2.16
Also related to that previous PR I've submitted an update to the readme inmicropython/nxp_driver#1
My particular use case is to use mymimxrt1170 display drivers with LVGL however these require newer peripheral drivers from the nxp_driver / SDK.
The PR also includes a new way of handling the updates needed for the uart driver to allow micropython to handle the idle interrupt. This was previously fixed by@robert-hh I believe in the patched snapshot copy of ports/mimxrt/hal/fsl_lpuart.c however I propose swapping this for the wrapper included in the second commit in this PR rather than needing to manually update and patch this driver file from the SDK when it's updated.
Testing
I've only been able to test this on the mimx1170 so far.
Trade-offs and Alternatives
If the uart patch is too difficult to confirm its correctness we can possibly keep the existing copy of the (older) patched uart driver as-is and defer updating it at all until a particular need arises?