From 1383ec853d13597afa66defdc11b01d192279538 Mon Sep 17 00:00:00 2001 From: Alexandru RADOVICI <alexandru.radovici@wyliodrin.com> Date: Thu, 27 Mar 2025 20:46:24 +0200 Subject: [PATCH 1/2] slides --- slides/lectures/fils_en/05/slides.md | 6 ++++-- slides/lectures/resources/dma/slides.md | 9 ++++---- slides/lectures/resources/sensors/slides.md | 11 +++++----- slides/lectures/resources/spi/slides.md | 21 +++++++++---------- slides/lectures/resources/uart/slides.md | 23 ++++++++++----------- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/slides/lectures/fils_en/05/slides.md b/slides/lectures/fils_en/05/slides.md index b46c46e..64ffeef 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 75c589e..6eb9ecc 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 eb0e1fc..352fc7e 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 cfbab0e..6b7cd47 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 0887080..f7fe9fc 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 { -- GitLab From 24f7df9bc793da0ad9b10f68e81b144f045bff8c Mon Sep 17 00:00:00 2001 From: Alexandru RADOVICI <alexandru.radovici@wyliodrin.com> Date: Thu, 27 Mar 2025 23:19:05 +0200 Subject: [PATCH 2/2] slides --- website/versioned_docs/version-fils_en/lecture/05.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/versioned_docs/version-fils_en/lecture/05.md b/website/versioned_docs/version-fils_en/lecture/05.md index 9043079..065fdc8 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 -- GitLab