Can't start first code with NUCLEO-H755ZI-Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-08 01:16 AM
I bought a new NUCLEO-H755ZI-Q board. It's my first STM32. I use MXCube to create a new project for MDK-ARM. I tried both STM32H755ZI and Nucleo-H755ZU-Q. And I enter my code in Application/User/CM7/Core/main.c . Between line 163 "/* USER CODE BEGIN WHILE" and line 166 "/* USER CODE END WHILE */". Rebuild all target files and press F8 download to chip. But it can't work. Can any one give me a hand please? Thanks a lot.
My Code is:
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_0,GPIO_PIN_SET);
HAL_Delay(1000);
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_0,GPIO_PIN_RESET);
HAL_Delay(1000);
- Labels:
-
GPIO-EXTI
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-08 01:52 AM
Hello @JZhan.15 and welcome to the STM32 Community,
Please share your ioc file to check your clock configuration and code.
You can get insprired from this article GPIO feature overview to setup the pin and GPIO port in STM32CubeMX.
Refer to the GPIO_IOToggle examples within STM32CubeH7 MCU package, you may re-use sections available in the example or get inspired from them.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-08 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-15 06:27 AM
Hi @JZhan.15 ,
Please precise what do you expect exactly as result ?
I checked your "board" project, it seems the PB0 is not initialized.
So, you should add this initialization
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
Also, I got an HAL_ERROR, and the MCU goes to the Error_Handler in the main. So, after commenting the Boot_Mode_Sequence code, the Led blinked.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-24 09:29 AM
Hi @JZhan.15 ,
Do you have still this problem to solve?
If you still need help, feel free to ask your question in more detail.
When your question is answered, please close this topic by choosing "Select as Best".
Imen
Thanks
Imen