Skip to content

Commit ed7954f

Browse files
committed
1 parent e5f13c0 commit ed7954f

File tree

1 file changed

+1
-1
lines changed
  • libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z

1 file changed

+1
-1
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void spi_frequency(spi_t *obj, int hz) {
145145
uint8_t ref_prescaler = 0;
146146

147147
// bus clk
148-
uint32_t PCLK = 48000000u;
148+
uint32_t PCLK = SystemCoreClock / (((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV4_MASK) >> SIM_CLKDIV1_OUTDIV4_SHIFT) + 1);
149149
uint8_t prescaler = 1;
150150
uint8_t divisor = 2;
151151

0 commit comments

Comments
 (0)