-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
samd: A set of small changes and bug fixes. #11106
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0f38d1
to
255deb9
Compare
dpgeorge
reviewed
Apr 11, 2023
@dpgeorge Updated by rewriting the respective commit. That method is indeed much more clear. Thank you for the hint. |
b0aa85b
to
b0eee0f
Compare
58e18a1
to
8a74722
Compare
Saves ~140 bytes and is not really needed, since for higher baud rates hard SPI is available. Signed-off-by: robert-hh <[email protected]>
Signed-off-by: robert-hh <[email protected]>
Such that they are easier to adapt. The maximum code size is set by: MICROPY_HW_CODESIZE=xxxK in mpconfigmcu.mk for the MCU family as default or in mpconfigboard.mk for a specific board. Setting the maximum code size allows the loader to error out if the code gets larger than the space dedicated for it. Signed-off-by: robert-hh <[email protected]>
Signed-off-by: robert-hh <[email protected]>
Signed-off-by: robert-hh <[email protected]>
If sockets were open when calling soft reset, gc_sweep_all() would try to close them. In case of e.g. the NINA WiFi handler, connected through SPI, spi_transfer() would be called for command exchange with the NINA module. But at that time SerCom was already disabled. Moving sercom_deinit_all() behind gc_sweep_all() solves this issue. Signed-off-by: robert-hh <[email protected]>
Just for coverage. Signed-off-by: robert-hh <[email protected]>
These include ADC, DAC, I2C, SoftI2C, SPI, SoftI2C, PWM, UART, pulse. This is useful for devices like the Adafruit Trinket series which have almost no accessible GPIO pins. Signed-off-by: robert-hh <[email protected]>
So the names don't start with a digit, which isn't allowed in Python. Signed-off-by: robert-hh <[email protected]>
With Crystal: set the crystal startup wait time to 1 second. It was 2 seconds before, and that seeemed too long. With USB-Sync: scan for up to 1 second for the USB to be registered and carry on with boot as soon as it it. Before, the code just waited for 500ms. Side change: improve related comments. Signed-off-by: robert-hh <[email protected]>
Thanks for updating. This is now merged. |
Thank you very much. Next in queue for SAMD may be #10233, which helps. It increases both flash write speed and code execution speed at SAMD51 devices. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make some machine devices configurable by #defines. These include ADC, DAC, I2C, SoftI2C, SPI, SoftI2C, PWM, UART, pulse.
Drop support for SoftSPI max speed. Saves ~140 bytes and is not really needed, since for higher baud rates hard SPI is available.
Update pins.csv for the Mini SAM M4 board.
Rearrange the mcu specific loader files. Such that they are easier to adapt. The maximum code size is set by:
MICROPY_HW_CODESIZE=xxxK
in mpconfigmcu.mk for the MCU family as default or in mpconfigboard.mk for a specific board. Setting the maximum code size allows the loader to raise an error if the code gets larger than the space dedicated to it.
Add default deploy instructions.
Enable MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF for SAMD51.
Fix a soft reset bug, which caused soft reset to stall if streams using e.g. UART or SPI had to be closed by it's finalizer.
Enable machine.deepsleep() as alias to machine.lightsleep(), providing consistency at least for the method set.
Rename two pins of the WIO terminal. The names started with a digit.
Reduce the startup time. At boards with a crystal, the startup wait time after power-up is reduced to 1 second. At boards using USB-sync, the code checks for USB registering instead of just waiting a fixed time.