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

Clock needs to advance when interrupts are disabled #16

Closed
terrillmoore opened this issue Nov 18, 2018 · 0 comments
Closed

Clock needs to advance when interrupts are disabled #16

terrillmoore opened this issue Nov 18, 2018 · 0 comments
Assignees

Comments

@terrillmoore
Copy link
Member

if interrupts are disabled, the result from millis() doesn't advance. The approach taken should be to check the SCB_ICSR_PENDSTSET_Msk bit and increment the tick count if it's set. This doesn't guarantee that millis() will advance as fast as it might if interrupts were enabled, but at least it will advance, and a tight loop based on millis() changing will terminate.

@terrillmoore terrillmoore self-assigned this Nov 18, 2018
terrillmoore added a commit that referenced this issue Nov 19, 2018
Fix #16: advance clock in millis() if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant