Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Horn
ch32v003fun
Commits
5c096dd8
Unverified
Commit
5c096dd8
authored
1 year ago
by
Eric Brombaugh
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
e8305bfc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/systick_irq/README.md
+5
-5
5 additions, 5 deletions
examples/systick_irq/README.md
with
5 additions
and
5 deletions
examples/systick_irq/README.md
+
5
−
5
View file @
5c096dd8
...
...
@@ -4,11 +4,11 @@ interrupts for timing. Many bare-metal and RTOS based embedded applications will
use the Systick IRQ for timing, periodic housekeeping and task arbitration so
knowing how to set that up is useful.
Note that this example is
*NOT*
compatible with the Delay_
*
() functions that are
part of the ch32v003fun library - those functions use the Systick counter for
doing busy-wait delays and assume that
the C
N
T register
rolls over at 32-bit
maximum. Do not use the built-in Delay_Ms() and related functions when using
Systick for
IRQ
s
.
This code is compatible with the busywait delay functions in the ch32v003fun
library because it allows the Systick CNT register to keep running over its full
32-bit range. It does not set the STRE bit in
the CT
RL
register
so the counter
does not reset when the CMP register matches. In order to do this, the CMP register
is advanced at every
IRQ.
Note also the use of the
`__attribute__((interrupt))`
syntax in declaring the
IRQ handler. Some of the IRQ examples from the WCH HAL library have slightly
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment