Skip to main content
onio
Associate III
September 2, 2020
Solved

Problem debugging the STM32H7B3i-DK (Again)

  • September 2, 2020
  • 5 replies
  • 5108 views

I am developing on the STM32H7B3i-DK board using Keil MDK + STMCubeMx for creating the project.

For some bizarre reason that I can't explain, I can no longer do debugging on my dev board after been blocked for a few days by an issues that I had with "option bytes".

Now the option bytes issue was resolved I tried to continue with my debugging only to discover that I can not longer do debugging on the board which was kind of working.

Every time I run the debugger it seems to crash in the following function. The value passed in the SupplySource parameter is PWD_LDO_SUPPLY.

HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource)
{
 ,,,
 /* Set the power supply configuration */
 MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource);
 ,,,
}

Once the code tries to execute the line MODIFY_REG(PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource) it crashes with the following dialog box message

0693W000003QcFcQAK.png

At which point I can no longer continue with the debug session other than to power cycle the board or else I start to get other error messages such as

0693W000003QcGVQA0.png

Followed by

0693W000003QcGfQAK.png

Are other experiencing issues with this board. So far I have used the STM32H750, STM32H743 and the STM32L073 without any issues.

For some reason I seems to have spent 80% of my time fighting one issue or another on this board rather than my development.

Is there a decent tutorial on this board that one can follow or there known issues about this device that I should know off.

Thanks in advance.

This topic has been closed for replies.
Best answer by M.Hajji

Hello Onio,

From UM2569 page 17, the board is designed for SMPS only as default config which mean you need the SMPS enabled.

By using LDO_SUPPLY you are enabling LDO and disabling the SMPS thus you have no 1.2V supplied to the core and your debugger connection crash.

Try "PWR_DIRECT_SMPS_SUPPLY" or change it in your CubeMX project withing RCC parameters (see attached).

0693W000003QcToQAK.png

Hope my suggestion help.

Hajji.

5 replies

alister
Senior III
September 2, 2020

I've seen you other post https://community.st.com/s/question/0D53W00000GXsdnSAD/problem-running-sbsfu-with-keil-rtx5-rtos.

If your SBSFU (bootloader) executing on reset? Consider its purpose and that your using JTAG/SWD (to debug your application) is what it's designed to prevent.

What RDP, PCROP, MPU regions, etc is it enabling? Hopefully not RDP level 2!

BTW what is your core?

Before starting a debug session, clear its PCROP, RDP, etc.

Consider implementing two versions of your SBSFU: one for laboratory debug and development and one for the field, and don't enable RDP, PCROP, DAP, etc in the debug one. Also assigning your debug one different secret keys, in case someone accidentally moves a debug board from your secure and guarded development laboratory into the field.

onio
onioAuthor
Associate III
September 3, 2020

Hi alister,

The issue reported in this thread has now been solved Thanks.

=========================

Thanks for your reply. When I am running the SBSFU code I am not using the debugger because of the jumping around of the code. So I simply program the SBSFU firmware with STM32CubeProgrammer and the bootloader then allows me to load my code which for now is the UserApp project.

Without the RTOS as part of the UserApp build things seems to work fine. I can change the UserApp code and see the changes when I program using the SBSFU loader. The problem I see comes into play when I introduce RTOS which requires that I remove some default handler in order to use the one that is part of of the RTOS library.

I am not entire such if this issue is to do with the RTOS or C++(Micro-Lib not supported). Later on today I would try and isolate the problem by decoupling RTOS, C++ and micro-Lib from the UserApp and see which one breaks it.

In regarding the enabling of the security feature. The default SBSFU build enables all the security features when programmed using STM32CubeProgrammer. I have identified the Flag in the code which should be used to turn on and off the security features from been used. When I start to properly debug the code I would do this for my development environment.

Thanks.

alister
Senior III
September 3, 2020

>I am not using the debugger because of the jumping around of the code

Disable compiler optimization for your Debug configuration.

>when I introduce RTOS which requires that I remove some default handler 

You might change the SVC number SBSFU uses to enter privileged state. You must study and weigh: MPU for protection against inner attacks, or no MPU protection and use FreeRTOS, or to use FreeRTOS-MPU.

M.Hajji
M.HajjiBest answer
Visitor II
September 3, 2020

Hello Onio,

From UM2569 page 17, the board is designed for SMPS only as default config which mean you need the SMPS enabled.

By using LDO_SUPPLY you are enabling LDO and disabling the SMPS thus you have no 1.2V supplied to the core and your debugger connection crash.

Try "PWR_DIRECT_SMPS_SUPPLY" or change it in your CubeMX project withing RCC parameters (see attached).

0693W000003QcToQAK.png

Hope my suggestion help.

Hajji.

onio
onioAuthor
Associate III
September 3, 2020

Hi M.Hajji,

Thanks your suggestion definitely helped. Yes it was the power supply setting issue. The only bit I need to figure out was why it seemed to have worked last week.

At least for now it is sorted so I can press on again. Thanks

M.Hajji
Visitor II
September 3, 2020

In the CubeMX Repository there is examples/projects (running on STM32H7B3i-DK) and code template you can start with.

For the known limitations of the device, check the Errata.

Regards,

Hajji.

onio
onioAuthor
Associate III
September 3, 2020

Thanks Hajji, once again.

Cvega.11
Associate II
September 25, 2020

Hello my friend

Do you know how the wifi module works?

Some example of a WIFI http server (web server) with stm32h7b3i-dk ???

To communicate with the wifi module, use the SPI2 of the board but no more, the board does not give me any answer. Any idea how to implement an example ???

How to send the AT commanders in the SPI communication through the following lines:

HAL_SPI_TransmitReceive_IT (SPI_HandleTypeDef * hspi, uint8_t * pTxData, uint8_t * pRxData, uint16_t Size)

HAL_StatusTypeDef HAL_SPI_Transmit_IT (SPI_HandleTypeDef * hspi, uint8_t * pData, uint16_t Size)

How to configure the wifi module (ISM43340-M4G-L44-10 CF) with serial communication from how many baud to how to send AT commands from stm32h7b3i-dk?

onio
onioAuthor
Associate III
September 25, 2020

Hi Cvega,

I have not done anything with the Wifi module on this board. I however did a quick search and found a datasheet for the module. Please find link here have a look at page 18 as it make mention of some AT Commands.

I have used the STM32 SPI peripherals in the past and they do work as described.

I have saved the datasheet locally just in case you are not able to get it and I can email it to you.