Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stm32] fix sys_time_usleep #739

Closed
wants to merge 2 commits into from
Closed

Conversation

gautierhattenberger
Copy link
Member

only use systick counter

only use systick counter
// start time
uint32_t start = systick_get_value();
// max time of one full counter cycle
uint32_t DT = usec_of_cpu_ticks(systick_get_reload());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either this should be usec_of_cpu_ticks(systick_get_reload() + 1) or systick_set_reload it is wrong in sys_time_arch_init.

@flixr
Copy link
Member

flixr commented Jun 3, 2014

Tested on F1 and F4 and sleeps for the correct time... merged with 7282435

@flixr flixr closed this Jun 3, 2014
@flixr flixr added this to the v5.2 milestone Jun 3, 2014
@flixr flixr deleted the stm32_usleep branch June 3, 2014 20:14
@flixr flixr added the stm32 label Jun 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants