Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf67d061

Browse files
author
danicampora
committed
cc3200: Fix SPI clock divider calculation.
1 parentd0601b0 commitf67d061

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎cc3200/hal/spi.c‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -782,23 +782,17 @@ SPIConfigSetExpClk(unsigned long ulBase,unsigned long ulSPIClk,
782782
}
783783

784784
//
785-
// Mask the configurations and set clock divider granularity
786-
// to 1 cycle
785+
// set clock divider granularity to 1 cycle
787786
//
788-
ulRegData= (ulRegData& (~(MCSPI_CH0CONF_WL_M |
789-
MCSPI_CH0CONF_EPOL |
790-
MCSPI_CH0CONF_POL |
791-
MCSPI_CH0CONF_PHA |
792-
MCSPI_CH0CONF_TURBO ) |
793-
MCSPI_CH0CONF_CLKG));
787+
ulRegData |=MCSPI_CH0CONF_CLKG;
794788

795789
//
796790
// Get the divider value
797791
//
798792
ulDivider= ((ulSPIClk/ulBitRate)-1);
799793

800794
//
801-
// The least significant four bits of the divider is usedfo configure
795+
// The least significant four bits of the divider is usedto configure
802796
// CLKD in MCSPI_CHCONF next eight least significant bits are used to
803797
// configure the EXTCLK in MCSPI_CHCTRL
804798
//

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp