Is there any bug in code HAL_Delay() not works?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-04 11:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-05 3:35 AM
It needs the SysTick or other TIM source to interrupt and count.
It therefore has some interrupt and priority issues if miss used under interrupt context or callbacks.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-05 7:33 AM
You can inspect the source for HAL_Delay and verify it's doing the right thing. It doesn't need to be treated as a black box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-06 2:21 AM
as you said i removed HAL_Delay() function and i monitor variable uwTick maimum value of variable is 406 then variable is automatically set to 0 you can see in below image.
that's the problem but why it get automatically reset to 0
so i check reset pins of MCU automatically pulled low continuous time interval so my MCU get RESET i don't know why its automatically pulled low?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-06 7:11 AM
I didn't say to remove HAL_Delay.
Monitor RCC_CSR register at startup to determine the cause of reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-07 6:04 AM
I read rcc_csr before halinit function
It shows internal watchdog timer reset bit set
​I haven't set any watchdog timer in my program.
i preform full chip erase and then i read RCC_CSR it gives same value.
​
