-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/sam0_common: Implement time-sharing of SERCOMs #21029
base: master
Are you sure you want to change the base?
Commits on Nov 21, 2024
-
cpu/sam0_common: implement SERCOM time-sharing
This adds a `periph_sercom` feature and implementation which `periph_i2c`, `periph_uart`, and `periph_spi` are implemented on top. This allows for sharing a single SERCOM instance to provide multiple serial interfaces (in round-robin time-sharing fashion). Note: In practice, a SERCOM can often not be shared if it needs to provide an UART. Background: While code using the I2C/SPI APIs is already optimized to share the peripheral with `i2c_acquire()`/`spi_acquire()` and `i2c_release()`/`spi_release()`, UARTs are typically not shared and most users will not call `uart_poweron()` and `uart_poweroff()` to only have the SERCOM in UART mode when actually needed. Worse: For many use cases (such as stdin), the UART will need to be constantly running, as receiving data happens asynchronously at unpredictable points in time.
Configuration menu - View commit details
-
Copy full SHA for 4c71bc3 - Browse repository at this point
Copy the full SHA 4c71bc3View commit details -
boards/adafruit-metro-m4-express: allow sharing SERCOM
Now that sharing SERCOMs is implemented, we can make use of that :) A warning is emitted if this is actually done, as sharing with UART is often not working as expected.
Configuration menu - View commit details
-
Copy full SHA for a29ee49 - Browse repository at this point
Copy the full SHA a29ee49View commit details -
tests/periph/selftest_shield: release UART after test
Calling `uart_poweroff()` when done with the UART test allows sharing the underlying hardware e.g. to provide other peripheral interfaces. One example of this would be the SERCOM3 on the Adafruit Metro M4 Express that is used to provide UART on D1/D0 and SPI on D11/D12/D13.
Configuration menu - View commit details
-
Copy full SHA for 122819b - Browse repository at this point
Copy the full SHA 122819bView commit details -
tests/periph/selftest_shield: fix logic to enable UART test
We cannot use the D0/D1 UART if it is also used for STDIO. However, the logic did not take into account whether `stdio_uart` was used at all. This fixes the issue.
Configuration menu - View commit details
-
Copy full SHA for feda1b9 - Browse repository at this point
Copy the full SHA feda1b9View commit details -
boards/adafruit-metro-m4-express: Add I2C and UART Mapping
The M4 Express does now have an I2C and an UART compatible with Arduino Shields, so we can expose them.
Configuration menu - View commit details
-
Copy full SHA for f9c952d - Browse repository at this point
Copy the full SHA f9c952dView commit details
Commits on Nov 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2ca76e0 - Browse repository at this point
Copy the full SHA 2ca76e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1880f3 - Browse repository at this point
Copy the full SHA c1880f3View commit details -
boards/adafruit-metro-m4-express: improve TTY detection
Also detect TTY of bootloader with `MOST_RECENT_PORT=1`.
Configuration menu - View commit details
-
Copy full SHA for c3608b2 - Browse repository at this point
Copy the full SHA c3608b2View commit details
Commits on Nov 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7efd29e - Browse repository at this point
Copy the full SHA 7efd29eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 56ef1ea - Browse repository at this point
Copy the full SHA 56ef1eaView commit details