nucleo-H743Zi clock misconfiguration. V.2.0.0.

Post Reply
User avatar
MasterT
Posts: 33
Joined: Mon Apr 20, 2020 12:02 am

nucleo-H743Zi clock misconfiguration. V.2.0.0.

Post by MasterT »

File: variant_NUCLEO_H743ZI.cpp

Having hard time to make SPI working on nucleo-H743ZI2, noticed that
clock to SPI123 selector default settings is PLL1-Q1, same time divider set to 2.

Code: Select all

  RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
  RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = 1;
  RCC_OscInitStruct.PLL.PLLN = 120;
  RCC_OscInitStruct.PLL.PLLP = 2;
  RCC_OscInitStruct.PLL.PLLQ = 2;
  RCC_OscInitStruct.PLL.PLLR = 2;
Max freq. for this line is 200 Mhz, Table 59. Kernel clock distribution overview RM0433. Divider 2 means 480 MHz
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: nucleo-H743Zi clock misconfiguration. V.2.0.0.

Post by fpiSTM »

Hi @MasterT
yes you're right there is a mistake here.
I was currently looking an issue with SPI on H7 and found this issue also.
Thanks for reporting this will be fixed soon.
User avatar
MasterT
Posts: 33
Joined: Mon Apr 20, 2020 12:02 am

Re: nucleo-H743Zi clock misconfiguration. V.2.0.0.

Post by MasterT »

I try SPI_loop example, provided by IDE. It's not working as it is on H743zi, than I replace this assignment:

Code: Select all

//  SPI.setMOSI(MOSI_PIN);
//  SPI.setMISO(MISO_PIN);
//  SPI.setSCLK(SCK_PIN);

  SPI.setMOSI(PA7);
  SPI.setMISO(PA6);
  SPI.setSCLK(PA5);
and it did a trick. I was not able to locate PIN_SPI_MOSI PIN_SPI_MISO PIN_SPI_SCK PIN_SPI_SS anywhere in H7 files, so this is probably a reason for failure.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: nucleo-H743Zi clock misconfiguration. V.2.0.0.

Post by fpiSTM »

MasterT wrote: Tue May 11, 2021 1:04 pm I was not able to locate PIN_SPI_MOSI PIN_SPI_MISO PIN_SPI_SCK PIN_SPI_SS anywhere in H7 files, so this is probably a reason for failure.
By default they are set to:
https://github.com/stm32duino/Arduino_C ... .h#L43-L65

A variant can redefine them. In the case of Nucleo-H743ZI they are not redefined as they are correct.
https://github.com/stm32duino/Arduino_C ... #L150-L152

By default the SPI_loop example use them so strange you need to redefined them. I've tested on a Nucleo H743ZI2 and had no issue with default example.
Post Reply

Return to “PR's bugs and enhancements”