diff --git a/slides/lectures/fils_en/05/slides.md b/slides/lectures/fils_en/05/slides.md index b46c46e18a286a16219c9ba9a2b5ddd2de8d9fc0..64ffeeffbc90ccfd93b50c39ab5152f8d9e9e164 100644 --- a/slides/lectures/fils_en/05/slides.md +++ b/slides/lectures/fils_en/05/slides.md @@ -27,7 +27,7 @@ Lecture 5 --- # UART & SPI -used by RP2040 +used by RP2350 - Direct Memory Access - Buses @@ -35,7 +35,9 @@ used by RP2040 - Serial Peripheral Interface - Analog and Digital Sensors -<!-- DMA --> +<!-- +DMA +--> --- src: ../../resources/dma/slides.md diff --git a/slides/lectures/resources/dma/slides.md b/slides/lectures/resources/dma/slides.md index 75c589ed87443236b856d8a4ee6b40c0e180c776..6eb9ecc188134284cd8114c9838d90d21483276b 100644 --- a/slides/lectures/resources/dma/slides.md +++ b/slides/lectures/resources/dma/slides.md @@ -6,14 +6,13 @@ layout: section Direct Memory Access --- ---- + # Bibliography for this section -**Raspberry Pi Ltd**, *[RP2040 Datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf)* - - Chapter 2 - *System Description* - - Chapter 2.5 - *DMA* - +**Raspberry Pi Ltd**, *[RP2350 Datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf)* + - Chapter 12 - *Peripherals* + - Chapter 16.6 - *DMA* --- layout: two-cols diff --git a/slides/lectures/resources/sensors/slides.md b/slides/lectures/resources/sensors/slides.md index eb0e1fc42447caed1b0a58e40152748c35c46da2..352fc7e3cc4ae518e43fc0e26144864dcf533876 100644 --- a/slides/lectures/resources/sensors/slides.md +++ b/slides/lectures/resources/sensors/slides.md @@ -81,7 +81,7 @@ using synchronous/asynchronous SPI to read the `press_lsb` register of BMP280 <div grid="~ cols-2 gap-5"> -```rust{all|1|3,4|6,7|6,7,8|10,11|13,14} +```rust {1|3,4|6,7|6,7,8|10,11|13,14|all} const REG_ADDR: u8 = 0xf8; // enable the sensor @@ -98,7 +98,7 @@ cs.set_high(); let pressure_lsb = buf[1]; ``` -```rust{none|all|1|3,4|6,7,8|6,7,8,9|11,12|14,15} +```rust {none|1|3,4|6,7,8|6,7,8,9|11,12|14,15|all} const REG_ADDR: u8 = 0xf8; // enable the sensor @@ -118,9 +118,8 @@ let pressure_lsb = rx_buf[1]; </div> - ---- --- + # Writing to a digital sensor using synchronous/asynchronous SPI to set up the `ctrl_meas` register of the BMP280 sensor @@ -128,7 +127,7 @@ using synchronous/asynchronous SPI to set up the `ctrl_meas` register of the BMP <div grid="~ cols-2 gap-5"> -```rust{all|1|3,4|6,7|9,10|9,10,11|13,14} +```rust {1|3,4|6,7|9,10|9,10,11|13,14|all} const REG_ADDR: u8 = 0xf4; // see subchapters 3.3.2, 3.3.1 and 3.6 @@ -145,7 +144,7 @@ spi.blocking_transfer_in_place(&mut buf); cs.set_high(); ``` -```rust{none|all|1|3,4|6,7|9,10|9,10,11|9,10,11,12|14,15} +```rust {none|1|3,4|6,7|9,10|9,10,11|9,10,11,12|14,15|all} const REG_ADDR: u8 = 0xf4; // see subchapters 3.3.2, 3.3.1 and 3.6 diff --git a/slides/lectures/resources/spi/slides.md b/slides/lectures/resources/spi/slides.md index cfbab0e48260a41915812ae5bf667c46bdb36cc7..6b7cd476ae5e7afea5b6d5c22618da3de22d553a 100644 --- a/slides/lectures/resources/spi/slides.md +++ b/slides/lectures/resources/spi/slides.md @@ -4,15 +4,14 @@ layout: section # SPI Serial Peripheral Interface ---- --- # Bibliography for this section -1. **Raspberry Pi Ltd**, *[RP2040 Datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf)* - - Chapter 4 - *Peripherals* - - Chapter 4.4 - *SPI* +1. **Raspberry Pi Ltd**, *[RP2350 Datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf)* + - Chapter 12 - *Peripherals* + - Chapter 12.3 - *SPI* 2. **Paul Denisowski**, *[Understanding SPI](https://www.youtube.com/watch?v=0nVNwozXsIc)* @@ -213,21 +212,21 @@ activate all the **sub** devices | Speed | *no limit* | does not have any limit, it is limited by the **main** clock and the electronics wirings | --- ---- + # Usage - EEPROMs / Flash (usually in *QSPI* mode) - Raspberry Pi Pico has its 2MB Flash connected using *QSPI* - sensors - small displays -- RP2040 has two SPI devices +- RP2350 has two SPI devices <div align="center"> -<img src="./raspberry_pi_pico_pins.jpg" class="rounded m-5 w-120"> +<img src="../rp2350/pico2w-pinout.svg" class="rounded m-5 w-100"> </div> --- ---- + # Embassy API for RP2040, synchronous @@ -257,7 +256,7 @@ pub enum Polarity { </div> -```rust{all|1|2|2,3|5-7|5-8|10,11|13|13,14|13,14,15|13,14,15,16} +```rust {1|2|2,3|5-7|5-8|10,11|13|13,14|13,14,15|13,14,15,16|all} use embassy_rp::spi::Config as SpiConfig; let mut config = SpiConfig::default(); config.frequency = 2_000_000; @@ -277,11 +276,11 @@ cs.set_high(); ``` --- ---- + # Embassy API for RP2040, asynchronous -```rust{all|1|2|2,3|5-7|5-8|10,11|13|13,14,15|13,14,15,16|13,14,15,16,17} +```rust {1|2|2,3|5-7|5-8|10,11|13|13,14,15|13,14,15,16|13,14,15,16,17|all} use embassy_rp::spi::Config as SpiConfig; let mut config = SpiConfig::default(); config.frequency = 2_000_000; diff --git a/slides/lectures/resources/uart/slides.md b/slides/lectures/resources/uart/slides.md index 088708027abd2151b2bb44457a6f5ccc0bb78e99..f7fe9fc8f2afcec6aa8321dd68ead5ccaa3a3b01 100644 --- a/slides/lectures/resources/uart/slides.md +++ b/slides/lectures/resources/uart/slides.md @@ -5,13 +5,13 @@ layout: section Universal Asynchronous Receiver and Transmitter --- ---- + # Bibliography for this section -1. **Raspberry Pi Ltd**, *[RP2040 Datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf)* - - Chapter 4 - *Peripherals* - - Chapter 4.2 - *UART* +1. **Raspberry Pi Ltd**, *[RP2350 Datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf)* + - Chapter 12 - *Peripherals* + - Chapter 12.1 - *UART* 2. **Paul Denisowski**, *[Understanding Serial Protocols](https://www.youtube.com/watch?v=LEz5UCN3aHA)* 3. **Paul Denisowski**, *[Understanding UART](https://www.youtube.com/watch?v=sTHckUyxwp8)* @@ -193,21 +193,21 @@ using the 8N1 data format </div> --- ---- + # Usage - print debug information - device console -- RP2040 has two USART devices +- RP2350 has two USART devices <div align="center"> -<img src="../rp2040/rp2040_adafruit_pinout.png" class="rounded m-5 w-100"> +<img src="../rp2350/pico2w-pinout.svg" class="rounded m-5 w-100"> </div> --- # Embassy API -for RP2040, synchronous +for RP2350, synchronous <div grid="~ cols-4 gap-5"> @@ -250,7 +250,7 @@ pub enum Parity { </div> -```rust{all|1|1,2|4,5|6,7|9,10,11} +```rust {1|1,2|4,5|6,7|9,10,11|all} use embassy_rp::uart::Config as UartConfig; let config = UartConfig::default(); @@ -264,13 +264,12 @@ let mut buf = [0; 5]; uart.blocking_read(&mut buf); ``` - --- # Embassy API -for RP2040, asynchronous +for RP2350, asynchronous -```rust{all|1|3-5|7|9,10|12,13|15,16,17} +```rust {1|3-5|7|9,10|12,13|15,16,17|all} use embassy_rp::uart::Config as UartConfig; bind_interrupts!(struct Irqs { diff --git a/website/versioned_docs/version-fils_en/lecture/05.md b/website/versioned_docs/version-fils_en/lecture/05.md index 90430791ee804b803d646db414a2aed9f8f71c90..065fdc837dd74e091510208a3467c4a16d15e29c 100644 --- a/website/versioned_docs/version-fils_en/lecture/05.md +++ b/website/versioned_docs/version-fils_en/lecture/05.md @@ -1,7 +1,6 @@ --- sidebar_position: 5 description: Direct Memory Access, Serial Port and SPI, Analog and Digital Sensors -unlisted: true --- # 05 - UART & SPI