Modern embedded framework, using Rust and async.
Go to file
Daniel Bevenius be20512f17 Add contants and update comment about ALP
This commit add two constants and updates the comment about ALP.

It was not easy to find the definition of ALP but after searching I
found what I believe is the correct definition in section 3.3 "Clocks"
in the referenced document below.

Active Low Power (ALP):
Supplied by an internal or external oscillator. This clock is
requested by cores when accessing backplane registers in other cores
or when performing minor computations. When an external crystal is
used to provide reference clock, ALP clock frequency is determined by
the frequency of the external oscillator. A 37.4 MHz reference clock
 is recommended.

Refs:
https://www.infineon.com/dgdl/Infineon-AN214828_Power_Consumption_Measurements-ApplicationNotes-v03_00-EN.pdf?fileId=8ac78c8c7cdc391c017d0d2803a4630d
2022-09-12 11:49:09 +02:00
.vscode Get wifi credentials from envvars in example. 2022-07-21 23:50:40 +02:00
examples/rpi-pico-w Update Embassy. 2022-08-23 01:06:14 +02:00
firmware Obtain the firmware blobs from the user instead of hardcoding magic flash addrs. 2022-07-17 00:33:30 +02:00
src Add contants and update comment about ALP 2022-09-12 11:49:09 +02:00
.gitignore Obtain the firmware blobs from the user instead of hardcoding magic flash addrs. 2022-07-17 00:33:30 +02:00
Cargo.toml Update Embassy. 2022-08-23 01:06:14 +02:00
LICENSE-APACHE Add LICENSEs 2022-07-11 22:53:57 +02:00
LICENSE-MIT Add LICENSEs 2022-07-11 22:53:57 +02:00
README.md Get wifi credentials from envvars in example. 2022-07-21 23:50:40 +02:00
rust-toolchain.toml update rust nightly to match embassy. 2022-07-13 21:22:52 +02:00
rustfmt.toml 🌈 2022-07-10 19:45:26 +02:00

cyw43

WIP driver for the CYW43439 wifi chip, used in the Raspberry Pi Pico W. Implementation based on Infineon/wifi-host-driver.

Current status

Working:

  • Station mode (joining an AP).
  • Sending and receiving Ethernet frames.
  • Using the default MAC address.
  • embassy-net integration.

TODO:

  • AP mode (creating an AP)
  • GPIO support (used for the Pico W LED)
  • Scanning
  • Setting a custom MAC address.
  • RP2040 PIO driver for the nonstandard half-duplex SPI used in the Pico W. Probably porting this. (Currently bitbanging is used).
  • Using the IRQ pin instead of polling the bus.
  • Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?)

Running the example

  • cargo install probe-run
  • cd examples/rpi-pico-w
  • WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release

After a few seconds, you should see that DHCP picks up an IP address like this

11.944489 DEBUG Acquired IP configuration:
11.944517 DEBUG    IP address:      192.168.0.250/24
11.944620 DEBUG    Default gateway: 192.168.0.33
11.944722 DEBUG    DNS server 0:    192.168.0.33

The example implements a TCP echo server on port 1234. You can try connecting to it with:

nc 192.168.0.250 1234

Send it some data, you should see it echoed back and printed in the firmware's logs.

License

This work is licensed under either of

at your option.