mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/cc2538: fix SPI clock initialisation
This commit is contained in:
parent
55391bc8eb
commit
9b772a45de
@ -115,14 +115,15 @@ static const i2c_conf_t i2c_config[I2C_NUMOF] = {
|
||||
* @brief Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
|
||||
*
|
||||
* Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where
|
||||
* CPSR and SCR cannot be larger than 255.
|
||||
* 1 < CPSR < 255 and
|
||||
* 0 < SCR < 256
|
||||
*/
|
||||
static const spi_clk_conf_t spi_clk_config[] = {
|
||||
{ .cpsr = 10, .scr = 31 }, /* 100khz */
|
||||
{ .cpsr = 1, .scr = 79 }, /* 400khz */
|
||||
{ .cpsr = 1, .scr = 31 }, /* 1MHz */
|
||||
{ .cpsr = 1, .scr = 6 }, /* ~4.5MHz */
|
||||
{ .cpsr = 1, .scr = 2 } /* ~10.7MHz */
|
||||
{ .cpsr = 2, .scr = 39 }, /* 400khz */
|
||||
{ .cpsr = 2, .scr = 15 }, /* 1MHz */
|
||||
{ .cpsr = 2, .scr = 2 }, /* ~4.5MHz */
|
||||
{ .cpsr = 2, .scr = 1 } /* ~10.7MHz */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -108,14 +108,15 @@ static const i2c_conf_t i2c_config[I2C_NUMOF] = {
|
||||
* @brief Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
|
||||
*
|
||||
* Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where
|
||||
* CPSR and SCR cannot be larger than 255.
|
||||
* 1 < CPSR < 255 and
|
||||
* 0 < SCR < 256
|
||||
*/
|
||||
static const spi_clk_conf_t spi_clk_config[] = {
|
||||
{ .cpsr = 10, .scr = 31 }, /* 100khz */
|
||||
{ .cpsr = 1, .scr = 79 }, /* 400khz */
|
||||
{ .cpsr = 1, .scr = 31 }, /* 1MHz */
|
||||
{ .cpsr = 1, .scr = 6 }, /* ~4.5MHz */
|
||||
{ .cpsr = 1, .scr = 2 } /* ~10.7MHz */
|
||||
{ .cpsr = 2, .scr = 39 }, /* 400khz */
|
||||
{ .cpsr = 2, .scr = 15 }, /* 1MHz */
|
||||
{ .cpsr = 2, .scr = 2 }, /* ~4.5MHz */
|
||||
{ .cpsr = 2, .scr = 1 } /* ~10.7MHz */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -74,14 +74,15 @@ static const i2c_conf_t i2c_config[I2C_NUMOF] = {
|
||||
* @brief Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
|
||||
*
|
||||
* Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where
|
||||
* CPSR and SCR cannot be larger than 255.
|
||||
* 1 < CPSR < 255 and
|
||||
* 0 < SCR < 256
|
||||
*/
|
||||
static const spi_clk_conf_t spi_clk_config[] = {
|
||||
{ .cpsr = 10, .scr = 31 }, /* 100khz */
|
||||
{ .cpsr = 1, .scr = 79 }, /* 400khz */
|
||||
{ .cpsr = 1, .scr = 31 }, /* 1MHz */
|
||||
{ .cpsr = 1, .scr = 6 }, /* ~4.5MHz */
|
||||
{ .cpsr = 1, .scr = 2 } /* ~10.7MHz */
|
||||
{ .cpsr = 2, .scr = 39 }, /* 400khz */
|
||||
{ .cpsr = 2, .scr = 15 }, /* 1MHz */
|
||||
{ .cpsr = 2, .scr = 2 }, /* ~4.5MHz */
|
||||
{ .cpsr = 2, .scr = 1 } /* ~10.7MHz */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -74,14 +74,15 @@ static const i2c_conf_t i2c_config[I2C_NUMOF] = {
|
||||
* @brief Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
|
||||
*
|
||||
* Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where
|
||||
* CPSR and SCR cannot be larger than 255.
|
||||
* 1 < CPSR < 255 and
|
||||
* 0 < SCR < 256
|
||||
*/
|
||||
static const spi_clk_conf_t spi_clk_config[] = {
|
||||
{ .cpsr = 10, .scr = 31 }, /* 100khz */
|
||||
{ .cpsr = 1, .scr = 79 }, /* 400khz */
|
||||
{ .cpsr = 1, .scr = 31 }, /* 1MHz */
|
||||
{ .cpsr = 1, .scr = 6 }, /* ~4.5MHz */
|
||||
{ .cpsr = 1, .scr = 2 } /* ~10.7MHz */
|
||||
{ .cpsr = 2, .scr = 39 }, /* 400khz */
|
||||
{ .cpsr = 2, .scr = 15 }, /* 1MHz */
|
||||
{ .cpsr = 2, .scr = 2 }, /* ~4.5MHz */
|
||||
{ .cpsr = 2, .scr = 1 } /* ~10.7MHz */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -74,14 +74,15 @@ static const i2c_conf_t i2c_config[I2C_NUMOF] = {
|
||||
* @brief Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
|
||||
*
|
||||
* Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where
|
||||
* CPSR and SCR cannot be larger than 255.
|
||||
* 1 < CPSR < 255 and
|
||||
* 0 < SCR < 256
|
||||
*/
|
||||
static const spi_clk_conf_t spi_clk_config[] = {
|
||||
{ .cpsr = 10, .scr = 31 }, /* 100khz */
|
||||
{ .cpsr = 1, .scr = 79 }, /* 400khz */
|
||||
{ .cpsr = 1, .scr = 31 }, /* 1MHz */
|
||||
{ .cpsr = 1, .scr = 6 }, /* ~4.5MHz */
|
||||
{ .cpsr = 1, .scr = 2 } /* ~10.7MHz */
|
||||
{ .cpsr = 2, .scr = 39 }, /* 400khz */
|
||||
{ .cpsr = 2, .scr = 15 }, /* 1MHz */
|
||||
{ .cpsr = 2, .scr = 2 }, /* ~4.5MHz */
|
||||
{ .cpsr = 2, .scr = 1 } /* ~10.7MHz */
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user