GlobalLogic
Embedded Starter
Kit
SPI Interface
Training 07
Bare Metal
Trainings
Contents
 Assignments and Goals
 Theory
 Practice
 Individual task
08.11.2021 18:17 Bare Metal – Training 07 2
Assignments and Goals
• SPI Understanding
• SPI Module Internal Structure
• SPI Interface at Starter Kit schematics
• READ-ID from Serial Flash
• Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 3
SPI Understanding
SPI (англ. Serial Peripheral Interface, SPI bus —
последовательный периферийный интерфейс,
шина SPI) — последовательный синхронный
стандарт передачи данных в режиме полного
дуплекса, предназначенный для обеспечения
простого и недорогого высокоскоростного
сопряжения микроконтроллеров и периферии.
SPI также иногда называют четырёхпроводным
(англ. four-wire) интерфейсом.
08.11.2021 18:17 Bare Metal – Training 07 4
SPI Understanding
08.11.2021 18:17 Bare Metal – Training 07 5
SPI Understanding
08.11.2021 18:17 Bare Metal – Training 07 6
SPI Understanding
08.11.2021 18:17 Bare Metal – Training 07 7
How SPI works?
SPI Module Internal Structure
08.11.2021 18:17 Bare Metal – Training 07 8
SPI Interface at Starter Kit schematics
08.11.2021 18:17 Bare Metal – Training 07 9
READ-ID from Serial Flash
08.11.2021 18:17 Bare Metal – Training 07 10
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 11
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 12
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 13
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 14
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 15
Using SPI in blocking mode
08.11.2021 18:17 Bare Metal – Training 07 16
Individual task
• Write data to the Flash and read it back after
power cycle
• Implement reset section / all memory
operations
• Try to increase SPI frequency to 50Mhz
(maximum for SPI)
• Switch SPI to IRQ mode
• Use SPI vs DMA
08.11.2021 18:17 Bare Metal – Training 07 17

Bare metal training_07_spi_flash

  • 1.
  • 2.
    Contents  Assignments andGoals  Theory  Practice  Individual task 08.11.2021 18:17 Bare Metal – Training 07 2
  • 3.
    Assignments and Goals •SPI Understanding • SPI Module Internal Structure • SPI Interface at Starter Kit schematics • READ-ID from Serial Flash • Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 3
  • 4.
    SPI Understanding SPI (англ.Serial Peripheral Interface, SPI bus — последовательный периферийный интерфейс, шина SPI) — последовательный синхронный стандарт передачи данных в режиме полного дуплекса, предназначенный для обеспечения простого и недорогого высокоскоростного сопряжения микроконтроллеров и периферии. SPI также иногда называют четырёхпроводным (англ. four-wire) интерфейсом. 08.11.2021 18:17 Bare Metal – Training 07 4
  • 5.
    SPI Understanding 08.11.2021 18:17Bare Metal – Training 07 5
  • 6.
    SPI Understanding 08.11.2021 18:17Bare Metal – Training 07 6
  • 7.
    SPI Understanding 08.11.2021 18:17Bare Metal – Training 07 7 How SPI works?
  • 8.
    SPI Module InternalStructure 08.11.2021 18:17 Bare Metal – Training 07 8
  • 9.
    SPI Interface atStarter Kit schematics 08.11.2021 18:17 Bare Metal – Training 07 9
  • 10.
    READ-ID from SerialFlash 08.11.2021 18:17 Bare Metal – Training 07 10
  • 11.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 11
  • 12.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 12
  • 13.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 13
  • 14.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 14
  • 15.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 15
  • 16.
    Using SPI inblocking mode 08.11.2021 18:17 Bare Metal – Training 07 16
  • 17.
    Individual task • Writedata to the Flash and read it back after power cycle • Implement reset section / all memory operations • Try to increase SPI frequency to 50Mhz (maximum for SPI) • Switch SPI to IRQ mode • Use SPI vs DMA 08.11.2021 18:17 Bare Metal – Training 07 17