stm32-rs / stm32l4xx-hal

A Hardware abstraction layer for the stm32l432xx series chips written in rust.
156 stars 103 forks source link

Add support for stm32l4r5 and stm32l4s5 #324

Open mattcarp12 opened 2 years ago

mattcarp12 commented 2 years ago

Picking up where @gauteh left off.

mattcarp12 commented 2 years ago

Any suggestions on how to fix the build errors?

gauteh commented 2 years ago

Great 👍 are you using it with the blues wireless board? I think I will have a project this autumn where I will have use for this again.

mattcarp12 commented 2 years ago

Great +1 are you using it with the blues wireless board? I think I will have a project this autumn where I will have use for this again.

Yep! Awesome, let us know about it!

gauteh commented 1 year ago

Hi, I don't think this works with the full CPU speed - but it would be great to get this merged and continue the improvements later.

gauteh commented 1 year ago

Hi, this no longer seems to work with the latest stm32-rs. Was any of the peripherals changed there? I am pretty sure qspi and adc compiled in the PR I set up a while ago here.

Also getting:

   Compiling stm32l4xx-hal v0.7.1 (/home/gauteh/dev/embedded/stm32l4xx-hal)
warning: variable does not need to be mutable
   --> /home/gauteh/dev/embedded/stm32l4xx-hal/src/rtc.rs:297:25
    |
297 |                     let mut alrmar = rtc.alrmar;
    |                         ----^^^^^^
    |                         |
    |                         help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
   --> /home/gauteh/dev/embedded/stm32l4xx-hal/src/rtc.rs:358:25
    |
358 |                     let mut alrmbr = rtc.alrmbr;
    |                         ----^^^^^^
    |                         |
    |                         help: remove this `mut`

error[E0507]: cannot move out of dereference of `RTC`
   --> /home/gauteh/dev/embedded/stm32l4xx-hal/src/rtc.rs:297:38
    |
297 |                     let mut alrmar = rtc.alrmar;
    |                                      ^^^^^^^^^^
    |                                      |
    |                                      move occurs because value has type `Reg<ALRMAR_SPEC>`, which does not implement the `Copy` trait
    |                                      help: consider borrowing here: `&rtc.alrmar`

error[E0507]: cannot move out of dereference of `RTC`
   --> /home/gauteh/dev/embedded/stm32l4xx-hal/src/rtc.rs:358:38
    |
358 |                     let mut alrmbr = rtc.alrmbr;
    |                                      ^^^^^^^^^^
    |                                      |
    |                                      move occurs because value has type `Reg<ALRMBR_SPEC>`, which does not implement the `Copy` trait
    |                                      help: consider borrowing here: `&rtc.alrmbr`