SlideShare a Scribd company logo
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

More Related Content

More from Roman Brovko

подготовка рабочего окружения
подготовка рабочего окруженияподготовка рабочего окружения
подготовка рабочего окружения
Roman Brovko
 

More from Roman Brovko (20)

Bare metal training_04_adc_temp_sensor
Bare metal training_04_adc_temp_sensorBare metal training_04_adc_temp_sensor
Bare metal training_04_adc_temp_sensor
 
Bare metal training_03_timers_pwm
Bare metal training_03_timers_pwmBare metal training_03_timers_pwm
Bare metal training_03_timers_pwm
 
Bare metal training_02_le_ds_and_buttons
Bare metal training_02_le_ds_and_buttonsBare metal training_02_le_ds_and_buttons
Bare metal training_02_le_ds_and_buttons
 
Bare metal training_01_hello_world
Bare metal training_01_hello_worldBare metal training_01_hello_world
Bare metal training_01_hello_world
 
Bare metal training_00_prerequisites
Bare metal training_00_prerequisitesBare metal training_00_prerequisites
Bare metal training_00_prerequisites
 
C language lect_23_advanced
C language lect_23_advancedC language lect_23_advanced
C language lect_23_advanced
 
C language lect_22_advanced
C language lect_22_advancedC language lect_22_advanced
C language lect_22_advanced
 
C language lect_21_advanced
C language lect_21_advancedC language lect_21_advanced
C language lect_21_advanced
 
подготовка рабочего окружения
подготовка рабочего окруженияподготовка рабочего окружения
подготовка рабочего окружения
 
C language lect_20_advanced
C language lect_20_advancedC language lect_20_advanced
C language lect_20_advanced
 
C language lect_19_basics
C language lect_19_basicsC language lect_19_basics
C language lect_19_basics
 
C language lect_18_basics
C language lect_18_basicsC language lect_18_basics
C language lect_18_basics
 
C language lect_17_basics
C language lect_17_basicsC language lect_17_basics
C language lect_17_basics
 
C language lect_16_basics
C language lect_16_basicsC language lect_16_basics
C language lect_16_basics
 
C language lect_06_introduction
C language lect_06_introductionC language lect_06_introduction
C language lect_06_introduction
 
C language lect_09_introduction
C language lect_09_introductionC language lect_09_introduction
C language lect_09_introduction
 
C language lect_10_basics
C language lect_10_basicsC language lect_10_basics
C language lect_10_basics
 
C language lect_11_basics
C language lect_11_basicsC language lect_11_basics
C language lect_11_basics
 
C language lect_13_basics
C language lect_13_basicsC language lect_13_basics
C language lect_13_basics
 
C language lect_14_basics
C language lect_14_basicsC language lect_14_basics
C language lect_14_basics
 

Bare metal training_07_spi_flash

  • 2. Contents  Assignments and Goals  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:17 Bare Metal – Training 07 5
  • 6. SPI Understanding 08.11.2021 18:17 Bare Metal – Training 07 6
  • 7. SPI Understanding 08.11.2021 18:17 Bare Metal – Training 07 7 How SPI works?
  • 8. SPI Module Internal Structure 08.11.2021 18:17 Bare Metal – Training 07 8
  • 9. SPI Interface at Starter Kit schematics 08.11.2021 18:17 Bare Metal – Training 07 9
  • 10. READ-ID from Serial Flash 08.11.2021 18:17 Bare Metal – Training 07 10
  • 11. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 11
  • 12. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 12
  • 13. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 13
  • 14. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 14
  • 15. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 15
  • 16. Using SPI in blocking mode 08.11.2021 18:17 Bare Metal – Training 07 16
  • 17. 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