Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
1191ec6a
Commit
1191ec6a
authored
9 years ago
by
Tobias Badertscher
Committed by
Damien George
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
stmhal/uart.c: Fix wrong baudrate calculation for stm32l4 series.
parent
43c8f545
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
stmhal/uart.c
+0
-4
0 additions, 4 deletions
stmhal/uart.c
with
0 additions
and
4 deletions
stmhal/uart.c
+
0
−
4
View file @
1191ec6a
...
@@ -579,11 +579,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con
...
@@ -579,11 +579,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con
}
else
{
}
else
{
actual_baudrate
=
HAL_RCC_GetPCLK1Freq
();
actual_baudrate
=
HAL_RCC_GetPCLK1Freq
();
}
}
#if defined(MCU_SERIES_L4)
actual_baudrate
=
(
actual_baudrate
<<
5
)
/
(
self
->
uart
.
Instance
->
BRR
>>
3
);
#else
actual_baudrate
/=
self
->
uart
.
Instance
->
BRR
;
actual_baudrate
/=
self
->
uart
.
Instance
->
BRR
;
#endif
// check we could set the baudrate within 5%
// check we could set the baudrate within 5%
uint32_t
baudrate_diff
;
uint32_t
baudrate_diff
;
...
...
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