Skip to content
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 stm32h7 Example #23

Merged
merged 4 commits into from
Oct 26, 2020
Merged

Conversation

irwineffect
Copy link
Contributor

@irwineffect irwineffect commented Oct 23, 2020

Updates the minimq-stm32h7 example to make it easier for others to use.

Summary of changes:

  • Now enables the cycle counter and icache through the init::Context rather than
    taking the cortex_m::Peripherals. We previously were reliant on a bug (cortex_m::Peripherals singleton can be duplicated rtic-rs/rtic#321) in
    cortex_m_rtic v0.5.3 concerning being able to take the Peripherals during init.
  • Removed dependency on external si7021 sensor, now publishes data based on
    internal random number generator.
  • Previously, the device would not reconnect to MQTT broker after restarting the
    program due to smoltcp trying to reuse the previous TCP connection. This was
    fixed in Adjusting TCP connection 3-way handshake state management smoltcp-rs/smoltcp#367, but this change has
    not been released on crates.io yet, so we are pulling in a specific version of
    smoltcp until this is released.
  • Adding the cargo lockfile to make it easier for others to reproduce a working build

Now enables the cycle counter and icache through the init::Context rather than
taking the cortex_m::Peripherals. We previously were reliant on a bug in
cortex_m_rtic v0.5.3 concerning being able to take the Peripherals during init.

Removed dependency on external si7021 sensor, now publishes data based on
internal random number generator.
Previously, the device would not reconnect to MQTT broker after restarting the
program due to smoltcp trying to reuse the previous TCP connection. This was
fixed in smoltcp-rs/smoltcp#367, but this change has
not been released on crates.io yet, so we are pulling in a specific version of
smoltcp until this is released.
Adding the cargo lockfile to make it easier for others to reproduce a working build
examples/minimq-stm32h7/Cargo.toml Outdated Show resolved Hide resolved
examples/minimq-stm32h7/Cargo.toml Outdated Show resolved Hide resolved
examples/minimq-stm32h7/Cargo.toml Show resolved Hide resolved
examples/minimq-stm32h7/src/main.rs Show resolved Hide resolved
examples/minimq-stm32h7/src/main.rs Outdated Show resolved Hide resolved
examples/minimq-stm32h7/src/main.rs Outdated Show resolved Hide resolved
examples/minimq-stm32h7/src/main.rs Show resolved Hide resolved
examples/minimq-stm32h7/stm32h7-ethernet/Cargo.toml Outdated Show resolved Hide resolved
Removed stm32h7-ethernet crate, now using the ethernet driver inside the
stm32h7xx-hal.

Reworked version specifications for RTIC and smoltcp.

Added custom handling in the case the MQTT client disconnects from the
broker.

Removed unnecessary debug code.
# Make dependencies use master branch for smoltcp until PR 367 lands on
# crates.io.
# https://github.com/smoltcp-rs/smoltcp/pull/367
smoltcp = {git = "https://github.com/smoltcp-rs/smoltcp", branch = "master"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, I believe branch = "master" is inferred, so it's not necessary to specify.

@ryan-summers ryan-summers merged commit bdcb759 into quartiq:master Oct 26, 2020
@irwineffect irwineffect deleted the update_example branch November 5, 2020 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants