Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CubeMx settings causes HAL delay to be faster then usual STM32F407 descovery

Status
Not open for further replies.

yefj

Advanced Member level 5
Advanced Member level 5
Joined
Sep 12, 2019
Messages
1,505
Helped
1
Reputation
2
Reaction score
5
Trophy points
38
Activity points
9,113
Hello, I am using CUBEMX to define the clock of the periphery but when i used the HAL delay function i got the HAL_ delay be 100 times smaller.
In the manual 1000 input is 1 second in HAL delay.
How do i see the effect of the diagram bellow on the HAL DELAY function?
I read about systick maybe affecting it.i am having trouble to link the CUBEMX diagram bellow and systic and delay of HAL_delay.
Can i have a logical link between those elements?
Thanks.

HAL API STM32
https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.DM00105879.pdf

STM32F407 Reference manual:

Code:
/* USER CODE BEGIN 3 */
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_15);
        HAL_Delay(50000);
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_15);
        HAL_Delay(50000);
        
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_14);
        HAL_Delay(5000);
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_14);
        HAL_Delay(50000);
        
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_13);
        HAL_Delay(50000);
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_13);
        HAL_Delay(50000);
        
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_12);
        HAL_Delay(50000);
        HAL_GPIO_TogglePin (GPIOD, GPIO_PIN_12);
        HAL_Delay(50000);

1612617089438.png
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top