-
Notifications
You must be signed in to change notification settings - Fork 60
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
Enable SPI2 on subset of stm32l0x1 devices #221
Conversation
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.
According to RM0377 Table 2, "Overview of features per category" (ref Table 1 above it), the L011 and L031 don't have SPI2, so I don't think it's the right thing to remove the feature gates completely.
Thankfully it looks like the categories mentioned in that table are mirrored in these somewhat confusingly named features so you could try using those instead. I'd want to diff the cargo doc
output to check for any regressions in other parts if you do that though.
e109197
to
fa6e250
Compare
f0b3bb4
to
0ede113
Compare
Thanks for the quick review. I think I addressed all the comments except that I don't know how to review changes to |
Any time! It looks like there are some remaining
I'm not sure what you mean by this I'm afraid. I see warnings when I run |
Duh. I did replace all the deprecated functions... but I introduced a new call to
I was trying to address your original
|
I do get an error when running:
but the same error shows up before my changes:
I can complete the build if I comment out all |
Right, that makes more sense now. It should work if you remove the If you wanted to fix the root cause, it would be great to have every example use |
There are members of the stm32l0x1 subfamily that thave two SPIs. In particular the STM32l051 and the STM32l071. Compile tested as: cargo build --release --example spi2 --features mcu-STM32L051C8Tx (builds) cargo build --release --example spi2 --features mcu-STM32L031C6Tx (fails to build, as this subfamily only has 1 SPI) but not run on actual hardware.
and_hms() -> and_hms_opt() from_ymd() -> from_ymd_opt()
I did try
but that still failed with the error
Here is the diff in case you want to check it out panic_halt.diff.txt Given that I don't really know where this conflicting dependency comes from, I think I'll accept your offer to land the SPI2 fix now. Thanks! |
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.
Given that I don't really know where this conflicting dependency comes from, I think I'll accept your offer to land the SPI2 fix now.
Sure thing, and sorry the fix wasn't as easy as it should be :(. I'll put a follow up PR together to clean that stuff up later. Thanks for the attempt at least!
PR looks good too :)
* Enable SPI2 on subset of stm32l0x1 devices There are members of the stm32l0x1 subfamily that thave two SPIs. In particular the STM32l051 and the STM32l071. Compile tested as: cargo build --release --example spi2 --features mcu-STM32L051C8Tx (builds) cargo build --release --example spi2 --features mcu-STM32L031C6Tx (fails to build, as this subfamily only has 1 SPI) but not run on actual hardware. * Migrate deprecated NaiveDate functions and_hms() -> and_hms_opt() from_ymd() -> from_ymd_opt() Co-authored-by: Javier Cardona <javier.cardona@gmail.com>
There are members of the stm32l0x1 subfamily that thave two SPIs. In
particular the STM32l051 and the STM32l071.
Compile tested as:
(builds)
(fails to build, as this subfamily only has 1 SPI)
but not run on actual hardware.