Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
2c674b07
Unverified
Commit
2c674b07
authored
6 years ago
by
Dylan Laduranty
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #9877 from fedepell/sercom_set_gen
saml21: fix sercom_set_gen for sercom5
parents
e8dfabd4
bfdafe87
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpu/sam0_common/include/periph_cpu_common.h
+6
-1
6 additions, 1 deletion
cpu/sam0_common/include/periph_cpu_common.h
with
6 additions
and
1 deletion
cpu/sam0_common/include/periph_cpu_common.h
+
6
−
1
View file @
2c674b07
...
@@ -352,8 +352,13 @@ static inline void sercom_set_gen(void *sercom, uint32_t gclk)
...
@@ -352,8 +352,13 @@ static inline void sercom_set_gen(void *sercom, uint32_t gclk)
(
SERCOM0_GCLK_ID_CORE
+
sercom_id
(
sercom
)));
(
SERCOM0_GCLK_ID_CORE
+
sercom_id
(
sercom
)));
while
(
GCLK
->
STATUS
.
reg
&
GCLK_STATUS_SYNCBUSY
)
{}
while
(
GCLK
->
STATUS
.
reg
&
GCLK_STATUS_SYNCBUSY
)
{}
#elif defined(CPU_FAM_SAML21)
#elif defined(CPU_FAM_SAML21)
GCLK
->
PCHCTRL
[
SERCOM0_GCLK_ID_CORE
+
sercom_id
(
sercom
)].
reg
=
if
(
sercom_id
(
sercom
)
<
5
)
{
GCLK
->
PCHCTRL
[
SERCOM0_GCLK_ID_CORE
+
sercom_id
(
sercom
)].
reg
=
(
GCLK_PCHCTRL_CHEN
|
gclk
);
}
else
{
GCLK
->
PCHCTRL
[
SERCOM5_GCLK_ID_CORE
].
reg
=
(
GCLK_PCHCTRL_CHEN
|
gclk
);
(
GCLK_PCHCTRL_CHEN
|
gclk
);
}
#endif
#endif
}
}
...
...
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