-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update example software and exercises for 1.0 release #58
Merged
marnovandermaas
merged 8 commits into
lowRISC:staging
from
AlexJones0:pin_mapping_changes
Nov 7, 2024
Merged
Update example software and exercises for 1.0 release #58
marnovandermaas
merged 8 commits into
lowRISC:staging
from
AlexJones0:pin_mapping_changes
Nov 7, 2024
Conversation
This file contains 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
Includes the latest driver changes to match 1.0 HW changes, the new pinmux driver, and also a bump to the system clock frequency from 30 MHz to 40 MHz. The driver changes include updates to the I2C, EThernet, PWM and GPIO drivers, as well as board description file updates.
AlexJones0
force-pushed
the
pin_mapping_changes
branch
from
November 7, 2024 15:14
ad271d0
to
755ccac
Compare
The updated I2C driver handles controller halts properly, and for good practice requires (via a `nodiscard` attribute) that the new Boolean result of the I2C's `blocking_write` function is not discarded. This commit hence simply adds checks to the existing demos that will debug log if an error occurs on these writes.
AlexJones0
force-pushed
the
pin_mapping_changes
branch
from
November 7, 2024 15:29
3afa695
to
b0312ae
Compare
AlexJones0
force-pushed
the
pin_mapping_changes
branch
from
November 7, 2024 15:37
b0312ae
to
6030354
Compare
marnovandermaas
force-pushed
the
pin_mapping_changes
branch
from
November 7, 2024 15:43
61bce7c
to
3970c6a
Compare
marnovandermaas
approved these changes
Nov 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me. Please also review the two commits I put on top.
Sonata's updated GPIO driver correctly provides different struct for different GPIO devices. This updates Sonata's examples and exercises (with the exception of the automotive demo, which will be handled separately) to use the new drivers and names of devices from the board description file, and changes direct reads/writes to/from the `input` and `output` registers to match the new general/board GPIO mappings after things have moved in the hardware.
In the latest 1.0 hardware, the LCD has been changed to use a chip select (for its CS, DC and RST pins) and to use a PWM for its backlight. This commit updates the LCD library/driver to appropriately make use of the SPI driver intsead of the GPIO as it was using before, and to use the PWM for the LCD's backlight. The PWM is always set to 100, and for now the driver simply replaces existing functionality - there is no way to modify the PWM from the driver.
This was done using the following command: nix flake lock --update-input sonata-system The new revision for Sonata System is: d410c6692bae8b579ee1b9986dd7ad1ebe077a8b
AlexJones0
force-pushed
the
pin_mapping_changes
branch
from
November 7, 2024 15:51
9f31bca
to
b04d284
Compare
Your changes look good to me @marnovandermaas, I've just added a commit so that CI will also run on this PR (since it is a PR on the |
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.
This PR only touches the automotive demo enough to make it compile, but not work, which will be addressed in a separate PR due to consistency issues with the demo, likely due to the demo's reliance on undefined behaviour.
See the commit messages for more details on the changes.
This PR primarily involves updating demos to use the updated GPIO, I2C and PWM drivers, and to match the newest GPIO board input/output mappings for any instances where the
input
/output
GPIO registers are being interfaced with directly. It also updates the LCD library/driver to match the newest hardware changes - using SPI Chip Select lines and a PWM backlight in place of the original GPIO pin interface.This has been tested to build and run all existing software with the exception of the automotive demo, which is not fixed by this PR, and the proximity demo, as I do not have hardware on hand to test that.