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
7df5ddf7
Commit
7df5ddf7
authored
1 year ago
by
Eric Brombaugh
Browse files
Options
Downloads
Patches
Plain Diff
Updated for latest SysTick changes in ch32v003fun library.
parent
5e71b663
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/systick_irq/README.md
+5
-5
5 additions, 5 deletions
examples/systick_irq/README.md
examples/systick_irq/systick_irq.c
+3
-0
3 additions, 0 deletions
examples/systick_irq/systick_irq.c
with
8 additions
and
5 deletions
examples/systick_irq/README.md
+
5
−
5
View file @
7df5ddf7
...
...
@@ -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_
Ms
() function that
's
part of the ch32v003fun library - th
at
function use
s
the Systick counter for
doing busy-wait delays and
will interfere with its use in gen
erat
ing predictable
IRQs
. Do not use the built-in Delay_Ms() and related functions when using
Systick
for IRQs.
Note that this example is
*NOT*
compatible with the Delay_
*
() function
s
that
are
part of the ch32v003fun library - th
ose
function
s
use the Systick counter for
doing busy-wait delays and
assume that the CNT register rolls ov
er
at
32-bit
maximum
. Do not use the built-in Delay_Ms() and related functions when using
Systick
for IRQs.
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.
examples/systick_irq/systick_irq.c
+
3
−
0
View file @
7df5ddf7
...
...
@@ -25,6 +25,9 @@ volatile uint32_t systick_cnt;
*/
void
systick_init
(
void
)
{
/* disable default SysTick behavior */
SysTick
->
CTLR
=
0
;
/* enable the SysTick IRQ */
NVIC_EnableIRQ
(
SysTicK_IRQn
);
...
...
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