2024-04-14 09:11 AM
Hello everyone!
I am working on a project and using STM32H7B3I-DK board. I am facing issues with SPI communication. I am using simple code:
while (1)
{
HAL_SPI_TransmitReceive(&hspi2, tx_data, rx_data, strlen(tx_data), HAL_MAX_DELAY); // Send AT command and receive response
printf("Response: %s\r\n", rx_data); // Print received response
HAL_Delay(1000); // Delay before sending the next command
}
}
where after executing nothing is stored in rx_data. Do I need to modify clock configurations?
Thanks in advance!
2024-04-14 11:25 AM
Hello,
You need to check if you're using the correct GPIOs and their configs that connect your MCU to the external device.
You need also to monitor your SPI lines with an oscilloscope or a logic analyzer. Are you seeing data coming back from the slave?