Skip to content

Update MIMXRT clocking to hopefully fix deep sleep, fix boot issues on Teensy4 #130

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 15, 2023

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Feb 12, 2023

Summary of changes

This MR was made in collaboration with testers on the Teensy forums, and fixes a number of issues:

  • Incorrect boot header (__USED_FLASH_END instead of __USED_FLASH_SIZE) prevented boot
  • Incorrect core clock on boot (see explanation on targets: clock: change default core clock to 528M ARMmbed/mbed-os#13391)
    • Added new "target.enable-overdrive-mode" option to control this
  • Incorrect clocking configurations used when coming out of deep sleep (see targets: clock: change default core clock to 528M ARMmbed/mbed-os#13391)
  • Incorrect pin mappings for UART3 and UART6 (daisy register settings were missing, I added them)
  • .ncache section of memory was getting put into SEMC external RAM even if that ram was not enabled, causing a crash on boot. I have no idea why this got its own MEMORY section in the first place, and now I combined it into the main "m_data" section.
  • Missing UART IRQ handlers for UARTs 5-8, causing a crash whenever those UARTs were used

Impact of changes

The TEENSY_40 target is now usable at a basic level! Unfortunately USB serial is still not working however, and it's missing a boatload of pin mappings.

Migration actions required

For those using MIMXRT10xxC chips, they need to specify "target.enable-overdrive-mode": 0 in their mbed_app.json to keep the core clock at 528MHz.

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Testers on the pjrc forums have verified stuff for me.


Reviewers


@multiplemonomials multiplemonomials changed the title [draft] Update MIMXRT clocking to hopefully fix deep sleep, fix boot issues on Teensy4 Update MIMXRT clocking to hopefully fix deep sleep, fix boot issues on Teensy4 Feb 12, 2023
@PaulStoffregen
Copy link

@multiplemonomials multiplemonomials merged commit ccb664e into master Feb 15, 2023
@multiplemonomials multiplemonomials deleted the dev/fix-teensy4-issues branch February 15, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants