stm32-rs / stm32l0xx-hal

A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
BSD Zero Clause License
96 stars 60 forks source link

Support for the STM32L0x0 subfamily #146

Open jglauche opened 3 years ago

jglauche commented 3 years ago

I implemented L0x0 subfamily and got the examples compile (and verified that the blink example is working!) https://github.com/stm32-rs/stm32l0xx-hal/issues/141

Please someone have a look at the unsafe brackets I had to add for my nightly rust in src/dma.rs .

For local testing, I had to replace stm32l0 dependency in Cargo.toml to stm32l0 = { path = "../stm32-rs/stm32l0" } after building the stm32-rs project. I didn't add this to the PR.

Requires my fork of https://github.com/jglauche/stm32-rs Waits on PR to merge: https://github.com/stm32-rs/stm32-rs/pull/505

jglauche commented 3 years ago

Some updates on this:

it looks like my PR to the stm32-rs library for the L0x0 SVD will be merged soon-ish.

On this HAL crate... there's a lot of work TBD

I tried merging the gpio.rs with an another crate to find out that I should have based it off another one (stm32f3xx-hal).

I'm fighting bit with serial.rs too:

hannobraun commented 3 years ago

I haven't followed this closely, but a general note: It would make our (the maintainers) life MUCH easier, if you could submit as much as possible in as many self-contained pull requests as possible. Doesn't make sense to start now, as it is still blocked on your upstream PR, but I'm just saying, if this turns into one huge pull requests that changes everything, it will be hard to find the time to review it.

jglauche commented 3 years ago

I haven't followed this closely, but a general note: It would make our (the maintainers) life MUCH easier, if you could submit as much as possible in as many self-contained pull requests as possible. Doesn't make sense to start now, as it is still blocked on your upstream PR, but I'm just saying, if this turns into one huge pull requests that changes everything, it will be hard to find the time to review it.

I assumed as much, but I feel like I opened a can of worms here. The more I actually test the more things I find that don't work for a reason..

hannobraun commented 3 years ago

To be clear, improvements and fixes are definitely welcome. I'm just saying, I hope when they're ready they'll arrive in neat packages :smile:

jglauche commented 3 years ago

Quick update:

  1. my PR to stm32-rs was merged, now integrating this RP blocks on them releasing their next version.
  2. my I2C issue was caused by my test code causing a race condition at an eeprom write, resulting in an MCU bug described in the Errata as "new transfer cannot be launched if first part of the address is not acknowledged by the slave"
  3. since I know how to reliably reproduce this bug, I'm planning to integrate a workaround for it in the upcoming weeks.
Mstrodl commented 1 year ago

Any news?

jglauche commented 1 year ago

Any news?

I haven't had the chance to keep my branch updated as my client that I was developing the l0x0 support to switched to l4 MCU