cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743ZI SPI Fault/Freeze when reset

TCash.1
Associate III

Hello Everybody,

I am using the STM32H743ZI chip with STM32CubeIde. I have been having success with my code running in debug mode with the debugger attached. however when I power off the board and start it up there is a problem when the program start transmitting data on SPI4 in blocking mode. The MCU appears to just freeze on the call to

HAL_SPI_TransmitReceive(chip->hspi, (uint8_t*)&dataFrame, (uint8_t*)rxData, 1, 1000);

(Even after the timeout value, I have tried lower timeouts too) Other code and SPI transfers are working ok when I reset the board. I have tried setting an LED on in the Error_Handler() function. But that does not seem to respond:

void Error_Handler(void)
{
  /* USER CODE BEGIN Error_Handler_Debug */
  /* User can add his own implementation to report the HAL error return state */
 
	HAL_GPIO_WritePin(LED_GPIO_Port, LED_DATA_OUT_Pin, GPIO_PIN_SET);
 
  /* USER CODE END Error_Handler_Debug */
}

What is strange is that a similar call to spi2 works fine. All these call are called once before entering the main loop.

Are there any Ideas on what to try? This code was ported from an STM32F767ZI and Worked on that chip (same SPI numbers, pins, etc)

Thanks in advance for any help,

Trevor

1 ACCEPTED SOLUTION

Accepted Solutions
TCash.1
Associate III

Solved. Turned out it was a separate issue I had just not narrowed down.

View solution in original post

1 REPLY 1
TCash.1
Associate III

Solved. Turned out it was a separate issue I had just not narrowed down.