Sissors 2014-01-08 21:00:40 +01:00
parent e5f13c047c
commit ed7954f5ac
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ void spi_frequency(spi_t *obj, int hz) {
uint8_t ref_prescaler = 0;
// bus clk
uint32_t PCLK = 48000000u;
uint32_t PCLK = SystemCoreClock / (((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV4_MASK) >> SIM_CLKDIV1_OUTDIV4_SHIFT) + 1);
uint8_t prescaler = 1;
uint8_t divisor = 2;