2023-01-11 11:23 PM
stm32cubeide
i set as attached files, save and it generate codes by itself,
then add codes for blinking and then building ,
finally debugging ...
no blinking at all ...
2023-01-11 11:25 PM
I add more images
2023-01-11 11:35 PM
Hello,
3rd parameter of HAL_GPIO_WritePin should be GPIO_PIN_RESET or GPIO_PIN_SET (0 or 1)
If I understand well, you're doing test=0 and then test = -test which is always 0.
There is another function that might interrest you: HAL_GPIO_TogglePin, please have a look.
Good luck.
2023-01-11 11:37 PM
Thank you let me try this
2023-01-11 11:51 PM
Dear Mike i did it as attached files ,
then debug and it continue blinking (red /green...) it means continue uploading?
How long it take for debugging?
Am i forget any setting ?
2023-01-11 11:59 PM
The LD4 led keeps blinbking RED/GREEN when debugging. That is normal.
You should be able to go step by step.
2023-01-12 12:04 AM
Dear Mike
Download verified successfully
but there is no blinking on board ...
please recommend what I should check
2023-01-12 12:07 AM
Please attach your ioc file and your main.c file to this thread.
2023-01-12 12:12 AM
Dear Mike I upload all files in zip here :
https://drive.google.com/file/d/1KrVC-9MLMR-JmiA6xMrF3vWiPJyrU-c8/view?usp=share_link
Thank you for helping in advance
2023-01-12 12:38 AM
Thank you.
So problem is that you've selected the HSE as input for the PLL when on the board SB12 and SB13 are not closed.
So you have 2 options:
1) select the HSI as input for the PLL:
RCC_OscInitStruct.OscillatorType = /*RCC_OSCILLATORTYPE_HSE|*/RCC_OSCILLATORTYPE_HSI;
/*RCC_OscInitStruct.HSEState = RCC_HSE_ON;*/
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
or
2) close SB12 and SB13.
Hope that helps