cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H7S3L8 SPI Transmission Issue - TXDR Register Not Updating

Hello,

I'm working with the NUCLEO-H7S3L8 microcontroller and trying to transmit data using SPI, but I'm encountering an issue where the TXDR (Transmit Data Register) is not updating.

I have generated the code using STM32CubeIDE Version: 1.17.0 and SDK version STM32Cube_FW_H7RS_V1.1.0, keeping most of the settings default.

SPI Configuration (via STM32CubeIDE GUI):

  • Configured SPI in full-duplex master mode.
  • Set data size to 8-bit.
  • Adjusted the prescaler for 75 Mbit/s (currently, speed does not seem to affect the issue).
  • Connected the MISO pin to the MOSI pin (PA6 <---> PB5) using a jumper. (Loopback Test)

Issue:

  • SPI communication does not seem to initiate.

Debugging Observations:

  • Execution gets stuck in the HAL_SPI_TransmitReceive function when using the HAL_MAX_DELAY macro.
  • TXDR register remains unchanged when writing data.

Questions:

  1. Why is the TXDR register not updating when writing data?
  2. Are there any specific settings required for the SPI peripheral in the NUCLEO-H7S3L8 series?
  3. Could this be related to clock configuration or a missing initialization step?
  4. Is there a required sequence for enabling SPI transmission that I might be missing?

I would appreciate any insights or suggestions. Thanks in advance!

aditya_prajapati_0-1738779624648.png

 

1 REPLY 1

@aditya_prajapati wrote:
  • TXDR register remains unchanged when writing data.

Questions:

  1. Why is the TXDR register not updating when writing data?

Beware that hardware registers are not just memory - is there any reason to believe that you should be able to read-back what you wrote to it ?

https://community.st.com/t5/stm32cubeide-mcus/best-technique-for-viewing-uart-debugging-is-dr-register/m-p/768141/highlight/true#M33976