Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
af9d885f
Commit
af9d885f
authored
Aug 01, 2015
by
Dave Hylands
Committed by
Damien George
Aug 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stmhal: Port of f4 hal commit
c568a2b4
to f7 hal
parent
9e8eba79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
stmhal/hal/f7/src/stm32f7xx_hal_rcc.c
stmhal/hal/f7/src/stm32f7xx_hal_rcc.c
+6
-1
No files found.
stmhal/hal/f7/src/stm32f7xx_hal_rcc.c
View file @
af9d885f
...
...
@@ -981,7 +981,12 @@ uint32_t HAL_RCC_GetSysClockFreq(void)
if
(
__HAL_RCC_GET_PLL_OSCSOURCE
()
!=
RCC_PLLCFGR_PLLSRC_HSI
)
{
/* HSE used as PLL clock source */
pllvco
=
((
HSE_VALUE
/
pllm
)
*
((
RCC
->
PLLCFGR
&
RCC_PLLCFGR_PLLN
)
>>
POSITION_VAL
(
RCC_PLLCFGR_PLLN
)));
//pllvco = ((HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> POSITION_VAL(RCC_PLLCFGR_PLLN)));
// dpgeorge: Adjust the way the arithmetic is done so it retains
// precision for the case that pllm doesn't evenly divide HSE_VALUE.
// Must be sure not to overflow, so divide by 4 first. HSE_VALUE
// should be a multiple of 4 (being a multiple of 100 is enough).
pllvco
=
((
HSE_VALUE
/
4
)
*
((
RCC
->
PLLCFGR
&
RCC_PLLCFGR_PLLN
)
>>
POSITION_VAL
(
RCC_PLLCFGR_PLLN
)))
/
pllm
*
4
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment