ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

K20D50M Serial baudrate #761

Closed Sissors closed 9 years ago

Sissors commented 9 years ago

At line 127: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/cc1c4962551c/targets/hal/TARGET_Freescale/TARGET_K20D50M/serial_api.c

uint32_t PCLK = (obj->uart == UART0) ? SystemCoreClock : SystemCoreClock/2;

This was probably copy pasted from the KLxx code, where it was used in the past, also now also has been replaced by a better version. Problem is UART0 runs on core clock, others at the bus clock. So this needs to correctly use the bus clock, where for the K20D50M the bus clock is standard not core clock / 2.

The correct way is here: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/cc1c4962551c/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/serial_api.c

0xc0170 commented 9 years ago

Should be fixed via 774.