2020-03-29 10:44 AM
Hello there,
Recently I bought the STM32H747 DISCO as I want to start working with microscontrollers. I've been working with FPGAs for a couple of years so I have general understanding of how things work. Howerver, the question I have is very basic - how do you run the code on the platform?
So far I have a blinking LED application, which builds with no errors, but when it comes to running the code i get some issues. I connect the eval board to CN2 and the demo application flashed on the boaard starts to run. When I try to run my application (from the CubeIDE) the demo application restarts and in the Cude I get the following message:
That's it, nothing happens afterwars, the board simply resets. I suspect there may be something specific when it comes to running single core applications on dual core chip, or maybe I am running the application incorectly in some way.
Do you have any ideas what am I doing wrong?
Help is much appreciated :)
------------------------------------------------------------------------------------------------------------------------------------
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK error (DEV_CONNECT_ERR)
ST-Link Server is running on port : 7184
ST-LINK SN : 002F001F3137511439383538
ST-LINK FW : V3J6M2
Voltage : 3.26V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Device name : STM32H7xx
Flash size : 2 MBytes (default)
Device type : MCU
Device CPU : Cortex-M7/M4
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a23832.srec
File : ST-LINK_GDB_server_a23832.srec
Size : 1864 Bytes
Address : 0x08100000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 8
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.151
Verifying ...
Download verified successfully
Debugger connection lost.
Shutting down...
-------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------
Code:
static unsigned short pin_state = 0;
while(1){
pin_state = !pin_state;
HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, pin_state);
HAL_Delay(500);
}
2020-03-29 12:30 PM
I'd probably build for the CM7 core, and have the code build for the FLASH base address of 0x08000000
2020-03-30 09:59 AM
Thanks for the suggestion, I tried it and it the demo that was running on the board stopped, but I didn't see any LED blinking :D.
I will further look into it.
2020-03-31 09:10 PM
Problem solved, idk how, but it works :D. I enabled the DEBUG option in the CubeMX and set it to serial. Not sure if this solved the problem, but now it works :D