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
6c3c5155
Unverified
Commit
6c3c5155
authored
11 months ago
by
CNLohr
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #304 from eeucalyptus/fix_core_defs
define SysTick and NVIC via ***_BASE defs
parents
7b87b3fc
27d40807
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
ch32v003fun/ch32v003fun.h
+8
-2
8 additions, 2 deletions
ch32v003fun/ch32v003fun.h
with
8 additions
and
2 deletions
ch32v003fun/ch32v003fun.h
+
8
−
2
View file @
6c3c5155
...
...
@@ -1615,10 +1615,12 @@ typedef struct
#define FLASH_BASE (0x08000000) /* FLASH base address in the alias region */
#define SRAM_BASE (0x20000000) /* SRAM base address in the alias region */
#define PERIPH_BASE (0x40000000) /* Peripheral base address in the alias region */
#define CORE_PERIPH_BASE (0xE0000000) /* System peripherals base address in the alias region */
#else
#define FLASH_BASE ((uint32_t)0x08000000) /* FLASH base address in the alias region */
#define SRAM_BASE ((uint32_t)0x20000000) /* SRAM base address in the alias region */
#define PERIPH_BASE ((uint32_t)0x40000000) /* Peripheral base address in the alias region */
#define CORE_PERIPH_BASE ((uint32_t)0xE0000000) /* System peripherals base address in the alias region */
#endif
#if defined(CH32V30x)
...
...
@@ -1791,6 +1793,9 @@ typedef struct
#define EXTEN_BASE (AHBPERIPH_BASE + 0x3800)
#endif
#define PFIC_BASE (CORE_PERIPH_BASE + 0xE000)
#define SysTick_BASE (CORE_PERIPH_BASE + 0xF000)
#if defined(CH32V20x)
#if defined(CH32V20x_D8) || defined(CH32V20x_D8W)
#define OSC_BASE (AHBPERIPH_BASE + 0x202C)
...
...
@@ -11517,13 +11522,14 @@ typedef struct
#endif
#define PFIC ((PFIC_Type *)
0xE000E000
)
#define PFIC ((PFIC_Type *)
PFIC_BASE
)
#define NVIC PFIC
#define NVIC_KEY1 ((uint32_t)0xFA050000)
#define NVIC_KEY2 ((uint32_t)0xBCAF0000)
#define NVIC_KEY3 ((uint32_t)0xBEEF0000)
#define SysTick ((SysTick_Type *) 0xE000F000)
#define SysTick ((SysTick_Type *) SysTick_BASE)
#ifndef __ASSEMBLER__
...
...
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