Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
f67d0619
Commit
f67d0619
authored
Nov 01, 2015
by
danicampora
Browse files
cc3200: Fix SPI clock divider calculation.
parent
d0601b0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/hal/spi.c
View file @
f67d0619
...
...
@@ -782,15 +782,9 @@ SPIConfigSetExpClk(unsigned long ulBase,unsigned long ulSPIClk,
}
//
// Mask the configurations and set clock divider granularity
// to 1 cycle
// set clock divider granularity to 1 cycle
//
ulRegData
=
(
ulRegData
&
(
~
(
MCSPI_CH0CONF_WL_M
|
MCSPI_CH0CONF_EPOL
|
MCSPI_CH0CONF_POL
|
MCSPI_CH0CONF_PHA
|
MCSPI_CH0CONF_TURBO
)
|
MCSPI_CH0CONF_CLKG
));
ulRegData
|=
MCSPI_CH0CONF_CLKG
;
//
// Get the divider value
...
...
@@ -798,7 +792,7 @@ SPIConfigSetExpClk(unsigned long ulBase,unsigned long ulSPIClk,
ulDivider
=
((
ulSPIClk
/
ulBitRate
)
-
1
);
//
// The least significant four bits of the divider is used
f
o configure
// The least significant four bits of the divider is used
t
o configure
// CLKD in MCSPI_CHCONF next eight least significant bits are used to
// configure the EXTCLK in MCSPI_CHCTRL
//
...
...
Write
Preview
Supports
Markdown
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