2023-12-11 12:53 AM - last edited on 2023-12-11 02:20 AM by Sarra.S
I had created a project in STM32CubeIDE for the STM32H563 chip. I was able to flash it through UART1 using STM32CubeProgrammer but the code seems not executing. The code is just to toggle a LED every 500ms
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_MEMORYMAP_Init();
MX_ICACHE_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
HAL_Delay(500);
}
/* USER CODE END 3 */
}
Is there any extra configuration to be done. The code other than the while loop is generated by the IDE.
Solved! Go to Solution.
2023-12-11 05:54 PM
The code you have will blink the LED, if you've defined/initialized it correctly and no other functions are crashing.
Consider using a debugger rather than guessing.
2023-12-11 05:54 PM
The code you have will blink the LED, if you've defined/initialized it correctly and no other functions are crashing.
Consider using a debugger rather than guessing.
2023-12-11 07:44 PM
Is there anything particular to look for while flashing the ELF file tho the chip through UART with the help of STM32CubeProgrammer.
2023-12-12 08:19 AM
I'm not quite sure of your question. Flashing an ELF over UART should work. I think you can do a verification that it wrote correctly. But you can't get any sort of debugging information from this.