We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5f13c0 commit ed7954fCopy full SHA for ed7954f
libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/spi_api.c
@@ -145,7 +145,7 @@ void spi_frequency(spi_t *obj, int hz) {
145
uint8_t ref_prescaler = 0;
146
147
// bus clk
148
- uint32_t PCLK = 48000000u;
+ uint32_t PCLK = SystemCoreClock / (((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV4_MASK) >> SIM_CLKDIV1_OUTDIV4_SHIFT) + 1);
149
uint8_t prescaler = 1;
150
uint8_t divisor = 2;
151
0 commit comments