2025-01-11 04:13 PM - edited 2025-01-15 07:18 PM
I am first time using NUCLEO-H755ZI-Q board for our project.
Here I am using it as a SPI slave and RaspberryPi4 as a Master SPI Device to transmit/receive data over SPI from MCU shown in attached image1. I have set RaspberryPi4Master SPI CLOCK as 24Mz.
Note: I am not using CS pin
Image1: Master and Slave Setup
Image2: Setting up SPI1 Config
-> Setting up SPI1 Config on M7 core using CubeMX as Full-Duplex Slave, 8bit, NSS signal Software,
CRC Disabled, SPI1 global interrupt enabled
-> what is the usage of other Advance Parameters mentioned into SPI1 default Config do I need to setup those in my case ?
Image3: Setting up SPI Slave Clock to 24Mz
-> I was able to set SPI1(MCU SPI SLAVE) Clock Freq to 24Mz which is same as RPI Master SPI clock 24Hz
-> Do I need to exact match SPI Slave clock same as SPI Master clock ?
2025-01-30 09:18 AM
Hello @ercjethava1992 ,
The clock doesn't need to be matching between your RPI and MCU as you are getting the clock from your master for the communication and the clock that you are mentioning is the internal peripheral clock. you can refer to the cube firmware example with the difference being that your master is on RPI platform
STM32Cube_FW_H7_V1.12.1\Projects\NUCLEO-H745ZI-Q\Examples\SPI\SPI_FullDuplex_ComIT
Regards