Embedded Rust on a Cortext-M0 board: blinky program bringup

Поділитися
Вставка
  • Опубліковано 1 жов 2024
  • I thought I was getting a STM32 BluePill, but ordered as different board: a Cortex-M0 based board. Still quite a capable MCU which can be used for a variety of things. This shows how to create a simple blinky program for the board.
    Using the cortex-m quickstart example at github.com/rus...

КОМЕНТАРІ • 7

  • @DavidCabanis
    @DavidCabanis 2 роки тому +2

    Thank you Andrei, I have been looking for Embedded Rust tutorials all over youtube but your is the most exhaustive so far. You really took the time to explain all the steps; Brilliant work thanks again.

  • @ArmonBRUNCHEMS
    @ArmonBRUNCHEMS Рік тому

    It is a really really cool tutorial. You don't cut anything and like this it's way more pleasant to understand everything. Usually people on youtube cut all theirs mistakes but those are really 70% of the time of a dev and the process to fix those is really what makes the learning good. You won a subscriber keep on this kind of content !

  • @jamjestlx
    @jamjestlx Рік тому

    Some libraries consume delay, do You know how to solve this issue? There is a similar problem with the i2c bus for example but there is the shared-bus library.

    • @embedded-rust
      @embedded-rust  Рік тому

      Can you give a specific example link?
      I believe I encountered this before but in that case Delay was a trait and I ended up implementing it myself. The original delay was using timers and one could only have a single timer to expire hence delay was consumed.

    • @embedded-rust
      @embedded-rust  Рік тому +1

      ​@@jamjestlx Looking at the code in docs.rs/bme280/0.3.0/src/bme280/lib.rs.html#369 and more, it looks to me like the delay is not dependent on super high accuracy, just that enough time passes, basically startup time or measuring time.
      What I imagine you could do is have some struct containing a Mutexed delay object and implement DelayMs for that (basically deferring delay to the underlying delay). It will not be perfect as the mutex may block more than the delay requested, however at least for the BME280 it should be enough.

    • @embedded-rust
      @embedded-rust  Рік тому +1

      By mutex I mean some form of ARC + Mutex or pointing to a global mutexed delay, so that you can consume and construct several instances of the same struct pointing to a shared Mutexed delay.

    • @jamjestlx
      @jamjestlx Рік тому

      @@embedded-rust I will try that. Thank You!