Getting Started with STM32 and Nucleo Part 5: How to Use SPI | Digi-Key Electronics

Описание к видео Getting Started with STM32 and Nucleo Part 5: How to Use SPI | Digi-Key Electronics

In this tutorial, Shawn shows you how to use the STMicroelectronics STM32CubeIDE to configure and use the Serial Peripheral Interface (SPI) communication bus on an STM32 Nucleo board.

If you are not familiar with STM32CubeIDE, we recommend watching this video first:    • Getting Started with STM32 and Nucleo...  

We first go over the basics of SPI communication, which includes how to connect devices in a variety of configurations on the bus. We additionally look at the different operating modes and how CPOL and CPHA can be adjusted for different devices. After, we look at a real logic analyzer capture of a SPI signal and analyze it as a timing diagram.

Then, we connect a SPI EEPROM chip to the Nucleo board so we can test SPI functionality. The plan is to write several bytes to the EEPROM and then read them back. If they match, then we know SPI and the EEPROM are working.

Next, we use STM32CubeIDE to configure one of the SPI buses on the STM32 microcontroller. From there, we write several lines of C code, using the HAL library, to read and write bytes to and from the SPI bus. Bytes read from the EEPROM are written to the serial terminal.

Finally, we provide a demo on how to use SPI with interrupts to create non-blocking SPI communication.

Please note that we are using the Nucleo-L476RG for this video, which can be found here: https://www.digikey.com/product-detai...

Product Links:
Nucleo-L476RG - https://www.digikey.com/product-detai...
Microchip 25AA040A-I/P EEPROM - https://www.digikey.com/product-detai...

Related Videos:
Getting Started with STM32 and Nucleo Part 1: Introduction to STM32CubeIDE and Blinky
   • Getting Started with STM32 and Nucleo...  

Getting Started With STM32 and Nucleo Part 2: How to Use I2C to Read Temperature Sensor TMP102
   • Getting Started With STM32 and Nucleo...  

Getting Started With STM32 and Nucleo Part 3: FreeRTOS - How To Run Multiple Threads w/ CMSIS-RTOS
   • Getting Started With STM32 and Nucleo...  

Getting Started With STM32 & Nucleo Part 4: Working with ADC and DMA
   • Getting Started With STM32 & Nucleo  ...  

Programming the Adafruit Feather STM32F405 Express with STM32CubeIDE
   • Programming the Adafruit Feather STM3...  

TinyML: Getting Started with STM32 X-CUBE-AI
   • TinyML: Getting Started with STM32 X-...  

Related Project Links:
Getting Started with STM32 - How to Use SPI - https://www.digikey.com/en/maker/proj...

Related Articles:
Making a Temperature Logger with the Adafruit Feather STM32F405 Express - https://www.digikey.com/en/maker/proj...
TinyML: Getting Started with STM32 X-CUBE-AI - https://www.digikey.com/en/maker/proj...

Комментарии

Информация по комментариям в разработке