Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
adisbladis
firmware
Commits
12316fe3
Commit
12316fe3
authored
5 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
fix(GPIO): Select voltage bank per IO
parent
0f1fb69e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/system_max32665.c
+18
-2
18 additions, 2 deletions
...ries/CMSIS/Device/Maxim/MAX32665/Source/system_max32665.c
with
18 additions
and
2 deletions
sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/system_max32665.c
+
18
−
2
View file @
12316fe3
...
...
@@ -159,11 +159,27 @@ __weak void SystemInit(void)
// Set all GPIO to 25K pullup mode by default
SYS_ClockEnable
(
SYS_PERIPH_CLOCK_GPIO0
);
SYS_ClockEnable
(
SYS_PERIPH_CLOCK_GPIO1
);
MXC_GPIO0
->
vssel
|=
0xFFFFFFFF
;
// All GPIO on port 0 to 1.8 V first
MXC_GPIO0
->
vssel
=
0
;
MXC_GPIO0
->
vssel
|=
(
1UL
<<
0
)
|
(
1UL
<<
1
)
|
(
1UL
<<
2
)
|
(
1UL
<<
3
)
|
(
1UL
<<
4
)
|
(
1UL
<<
5
);
// Flash
MXC_GPIO0
->
vssel
|=
(
1UL
<<
6
)
|
(
1UL
<<
7
);
// USB I2C
MXC_GPIO0
->
vssel
|=
(
1UL
<<
8
);
// Motor FET
MXC_GPIO0
->
vssel
|=
(
1UL
<<
9
)
|
(
1UL
<<
10
);
// USB UART
MXC_GPIO0
->
vssel
|=
(
1UL
<<
20
)
|
(
1UL
<<
21
)
|
(
1UL
<<
22
)
|
(
1UL
<<
29
);
// Wristband
MXC_GPIO0
->
vssel
|=
(
1UL
<<
17
)
|
(
1UL
<<
23
)
|
(
1UL
<<
28
);
// GPIO to TOP
MXC_GPIO0
->
vssel
|=
(
1UL
<<
31
);
// ECG Switch
MXC_GPIO0
->
ps
|=
0xFFFFFFFF
;
MXC_GPIO0
->
pad_cfg1
|=
0xFFFFFFFF
;
MXC_GPIO0
->
pad_cfg2
&=
~
(
0xFFFFFFFF
);
MXC_GPIO1
->
vssel
|=
0xFFFFFFFF
;
// All GPIO on port 1 to 1.8 V first
MXC_GPIO1
->
vssel
=
0
;
MXC_GPIO0
->
vssel
|=
(
1UL
<<
0
)
|
(
1UL
<<
1
)
|
(
1UL
<<
2
)
|
(
1UL
<<
3
)
|
(
1UL
<<
4
)
|
(
1UL
<<
5
);
// SDHC
MXC_GPIO1
->
vssel
|=
(
1
<<
6
)
|
(
1
<<
7
);
// GPIO to TOP
MXC_GPIO1
->
vssel
|=
(
1
<<
14
)
|
(
1
<<
15
);
// GPIO for RGB LEDs
MXC_GPIO1
->
ps
|=
0xFFFFFFFF
;
MXC_GPIO1
->
pad_cfg1
|=
0xFFFFFFFF
;
MXC_GPIO1
->
pad_cfg2
&=
~
(
0xFFFFFFFF
);
...
...
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