STLINK Problems with STM32H745i-DISCO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-16 02:59 PM
Hi,
I just got my H745i-DISCO board and started to tinker with ToughGFX right away. I got a test application loaded on the board, but once I disconnected the USB connection and reconnect it (USB connected to STLink USB Port on Nucleo board, power jumper in first position) the STLINK seems not to recognize the MCU anymore. The loaded flash drive contains a "FAIL.txt" file with the following content: "The interface firmware FAILED to reset/halt the target MCU".
When I press and hold the reset button while plugging the USB and releasing it within 2 seconds, the FAIL.txt is not present. Either way, I can't get TouchGFX or STLink Utility to connect to the MCU. I tried all day and only got it to again recognize the MCU once. Then I did a full chip erase with STLink Utility and loaded another application with TouchGFX. Unplugging the USB, plugging it again, same error.
What am I doing wrong? How can I get consistent results?
What I've tried so far:
- Supplying the board via the scond USB power conn while keeping the STLink port connected
- Dis- and reconnecting the 3.3V MCU power jumper JP1
- Updating the onboard STLink to the latest firmware
- Doing the "connect under reset" option as suggested by STLink Utility
- Restart my computer
Any advice is warmly welcome
Best regards
Max
Solved! Go to Solution.
- Labels:
-
ST-Link
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-26 09:43 AM
Hi Max,
don´t ask me that.
I bought a new Nucleo to test the dual core. I connected the new board and it works as long as i did not disconnect it from power (USB). The next day i tried again and nothing works. I thought ok my fault and ordered new boards. The same story.
Using the code from above does not work for me. It stucks in the while loop.
But there are more inconsistencies:
Here is the generated code from CubeMX:
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Macro to configure the PLL clock source
*/
It seems that the code configures the LDO, but on the Nucleo board the SMPS is used.
But it works (at least with the hack).
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-26 09:48 AM
I still have a Support Ticket running for this issue. I will post some updates if ST decides to answer it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-26 04:48 PM
Hi,
Whilst I was testing something for maxpartenfelder problem the board was bricked too. I found out that voltage regulator U20 did not produce 3.3V. To verfy I feed in 3.3V on TP20. I was able to load firmware again. The STM32H745i-DISCO went into the bin and back to iMX RT1052. What a shame.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-30 02:51 PM
This solution worked perfectly.
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-09-30 04:21 PM
My understanding is that they have a persistent setting, and it always starts thru the ROM, perpetuating the setting. The BOOT0 pin changes how code execution forks into FLASH code.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-02 05:21 AM
Also you can add big one second delay (like delay (0xFFFFFF) that just while with asm("nop") )
(note, this is not Hall function based on systic, but on nop operation so no coding for systic needed)
It will give you to press connect after manual restet. It works for me, but i have to not forget to add this code. Before any of your code is run on MCU, it will give STLink time to connect to CPU)
But that mean that boot is delayed by 1s. Maybe some one needs to get up and running faster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-02 05:40 AM
It certainly would provide some margin to allow the debugger to wrestle control.
I'd probably use DWT CYCCNT, I'd suspect several hundred thousand cycles would suffice rather than 64 million.
Checking a GPIO, USART or button can also provide an escape route.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-02 05:58 AM
My variant will run on any MCU family, so it could be written in seconds with no knoledge about MCU. and where is no penalty of flash memory, power consumption or register setting after this delay is over.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-11 04:28 PM
Hi thomas.
I face the same problem with my Nucleo-H745 as well. CubeMX generates code:
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); //also tried PWR_DIRECT_SMPS_SUPPLY
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
When I try to debug, execution hangs in while loop (line #12), while the CM4 gets "Thread #1 (Suspended: Signal: SIGTRAP: Trace/breakpoint trap). Any success with your board?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-11 04:58 PM
What tool chain?
NUCLEO-H45ZI-Q should be using SMPS
https://www.st.com/en/evaluation-tools/nucleo-h745zi-q.html
Build something from the repository
STM32Cube_FW_H7_V1.5.0\Projects\NUCLEO-H745ZI-Q\Examples\GPIO\GPIO_EXTI
Up vote any posts that you find helpful, it shows what's working..