cancel
Showing results for 
Search instead for 
Did you mean: 

Cant upload in PlatformIO and NUCLEO-H755 board is suddenly not detected in stm32CubeProgrammer

pero
Associate II

Im using NUCLEO-H755ZI-Q. I used it together with plattformio and arduino framework. In order to get arduino to work im using this setup:

 

[env:nucleo_h743zi]
platform = ststm32
board = nucleo_h743zi
framework = arduino
monitor_speed = 115200

 

This works fine using this board but suddenly it stopped working. And getting this upload error

 

Error: init mode failed (unable to connect to the target)

 

As well as the board is not connected stm32CubeProgrammer.

It is however discovered at port 13 but cannot upload. The COM led is also red indicating there is a problem with the communication with the computer. I got a brand new usb cable and have tried others so it is not the cable. 
I have two possible scenarios what has happened. 

1) since I have soldered the headers I have burned some component on the board. But maybe not so likely since it first worked and then stopped working
2) something has happened with the communication after using "wrong" but working board for uploading nucleo_h743zi. 

Are there any way of factory reset my board NUCLEO-H755ZI-Q in order to try to resolve what is wrong or any other recommendation? I have of course tried to reset with the reset button. But still the led is red. 

Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

According to this statement, did you upload a STM32H743 program to a STM32H755?



2) something has happened with the communication after using "wrong" but working board for uploading nucleo_h743zi. 


and: 

[env:nucleo_h743zi]
platform = ststm32
board = nucleo_h743zi
framework = arduino
monitor_speed = 115200

If yes, pretty sure it's a power configuration issue as NUCLEO_H743ZI board is configured in LDO while NUCLEO-H755ZI-Q is configured in SMPS.

So, refer to this article on how to recover the board.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

10 REPLIES 10
SofLit
ST Employee

Hello,

According to this statement, did you upload a STM32H743 program to a STM32H755?



2) something has happened with the communication after using "wrong" but working board for uploading nucleo_h743zi. 


and: 

[env:nucleo_h743zi]
platform = ststm32
board = nucleo_h743zi
framework = arduino
monitor_speed = 115200

If yes, pretty sure it's a power configuration issue as NUCLEO_H743ZI board is configured in LDO while NUCLEO-H755ZI-Q is configured in SMPS.

So, refer to this article on how to recover the board.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

+1 on the SMPS/LDO settings

Code would notionally be in SystemClock_Config() function, or part of some board level library or variant code as part of the build process.

static void SystemClock_Config(void)
{
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_OscInitTypeDef RCC_OscInitStruct;
  HAL_StatusTypeDef ret = HAL_OK;

  /*!< Supply configuration update enable */
  HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); // **NOT** LDO

  /* The voltage scaling allows optimizing the power consumption when the device is
     clocked below the maximum system frequency, to update the voltage scaling value
     regarding system frequency refer to product datasheet.  */
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

  while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
...
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Yes it should be for STM32H755.

 

  /*!< Supply configuration update enable */
  HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); // **NOT** LDO

 

instead of:

 

  /*!< Supply configuration update enable */
  HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);

 

+ As it's an SMPS, he can't exceed the maximum System frequency of 400MHz @VOS1 as it could be for NUCLEO_H743ZI (I suppose the program he uploaded is running @480MHz @VOS0).

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Projects/NUCLEO-H745ZI-Q/Templates/BootCM4_CM7/CM7/Src/main.c#L135

Yes, I'd expect the PlatformIO board selection would need to be done more selectively to better match the hardware at play, especially if currently targeting the OLD NUCLEO-H743ZI(1) design

 

NUCLEO-H745ZI-Q being the closest variant without the CRYP/HASH support

https://github.com/platformio/platformio-docs/blob/develop/boards/ststm32/nucleo_h745zi_q.rst

[env:nucleo_h745zi_q]
platform = ststm32
board = nucleo_h745zi_q

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks for the reply. Yes this solves the issue. Bu I need arduino framework support. Dont think that is supported with NUCLEO-H745ZI-Q. Is there something else to use to get arduino framework support together with NUCLEO-H755ZI-Q?

As said by @Tesla DeLorean PlatformIo supports the STM32H745 which is same as STM32H755. 

The difference between the devices is that H755 has the crypto accelerator not the H745.

So you can use NUCLEO-H745Z platform for NUCLEO-H755.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

You'd need to engage with the developers directly. Perhaps fund a porting exercise.

Or look at the differences/addition related to the different board, ie pin usage, LEDs, etc, and port/morph the current material into something better suited for the board / MCU you're using.

Perhaps find where the "arduino" framework is living on Github and cite that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

According to the boardlist at plattformio i cant see that STM32H745 is supported though? Are there an alternative?

https://github.com/platformio/platformio-docs/blob/develop/boards/ststm32/nucleo_h745zi_q.rst

Meanwhile, there is config problem. As I said, in SMPS System clock should not exceed 400MHz @VOS1:

I don't have an idea how PlatformIO works but you need to change the frequency to 400MHz and the voltage scale to VOS1

SofLit_0-1725646003386.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.