Skip to content
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

RP2040: Bootloader fixes #165

Merged
merged 2 commits into from
Mar 30, 2023
Merged

RP2040: Bootloader fixes #165

merged 2 commits into from
Mar 30, 2023

Conversation

PetteriAimonen
Copy link
Collaborator

Fixes three causes for random hangs at boot time on RP2040:

  • When USB cable was connected while using SD card bootloader, sometimes the USB packet would arrive during flash writing and trigger bug in mbed-os RP2040 USB driver
  • It seems that platform_rewrite_flash_page() crashes randomly if it is not in RAM. Not sure of the root cause.
  • During boot flash chip size check hangs if the system tick interrupt happens to occur at the same time. Fixed by disabling interrupts during the size check.

The SD-card bootloader occassionally crashed due to either:
- USB packets during flash writing (arduino/ArduinoCore-mbed#409)
- Some flash XIP issues when function is not in RAM.
Sometimes flash_do_cmd() call would coincide with SysTick interrupt.
Interrupts should be disabled when running it.
@aperezbios aperezbios merged commit a53782c into main Mar 30, 2023
@aperezbios aperezbios deleted the bootloader_fixes branch May 19, 2023 01:43
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.

2 participants