2024-10-18 06:20 PM
I have a Beaglebone Computer configured as SPI Masted, and an STM32F446 configured as SPI Slave. I am simply sending 'HelloWorld' from the Beaglebone to the STM32, and trying to send 'ABCDEFG!' from the STM32 to the Beaglebone. The STM32 receives the message from the Beaglebone as expected, but the STM32 MISO line never outputs the message to the Beaglebone.
See the image for reference which shows the MISO output from the STM in blue, clk in yellow, and MOSI in green.
I am using HAL_SPI_TransmitReceive_DMA(&hspi1, SPITxByte, SPIRxByte, SPI_BUFF_LEN); for setting up the communication.
Can someone please help me out here? I've been scratching my head for days.
Attached is my Cube Generated main.c file
Solved! Go to Solution.
2024-10-19 08:10 AM
Well, looks like this is a hardware issue. I Tried the same code on a Nucleo dev kit and it works as expected.
2024-10-18 11:36 PM
Check : you have connected to the pin as set/given in Cube ; and check : is it really connected to stm pin ?
Because the blue signal looks like an open line , just some stray in from other lines.
+ pin speed setting high enough for your spi speed ?
2024-10-19 07:21 AM
I have been able to read continuity from the MISO header pin to the MCU package pin so I know that is good.
I will attempt running this code on a nucleo dev kit to verify.
Here is the cube generated HAL_SPI_MspInit functio that shows the correct initialization of the SPI peripherals.
2024-10-19 07:44 AM
>from the MISO header pin to the MCU package pin
Ok, but is it really same pin, you set in Cube for this miso ? (that was my question - also.)
2024-10-19 08:10 AM
Well, looks like this is a hardware issue. I Tried the same code on a Nucleo dev kit and it works as expected.
2024-10-19 08:19 PM
Yes it definitely is the right pin.
its an STM32F446 - LQFP64
PA4 - PA7, pins 20 - 23
MISO is pin 22 which corresponds to PA6 in data sheet and my schematic. Everything is hooked up and configured correctly.
This is a custom board I assembled on a hot plate with a stencil. There were multiple solder bridges that had to be fixed. Not really sure but definitely pointing to the IC at this point.