kinetis: Unify cpu.c, update clock initialization code#7379
kinetis: Unify cpu.c, update clock initialization code#7379jnohlgard merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
Testing status:
@haukepetersen @aabadie @kYc0o do you have access to any of the above boards for testing? |
|
Forgot to update the documentation. Will address. |
|
Great! I'll take a look asap. |
|
updated docs |
|
Relevant tests are tests/xtimer_drift and examples/gnrc_networking (for the Phytec board) |
|
I just tested this without success. No example runs anymore either on mulle or frdm-k64f. I didn't test on pba-d-01-kw2x. |
0cf5e04 to
489b41e
Compare
|
The problem with mulle and k64f is a configuration error. I will update this PR tomorrow, or later tonight. Also found another problem which messed up the FEI mode. |
489b41e to
ac55f13
Compare
|
|
Tested I2C on Mulle and FRDM-K22F using the tests/drivers_hih6130 and the HIH6130 sensor breakout board from Sparkfun. |
|
@kYc0o do you mind testing on k64f? I don't have that board. |
Some KW series CPUs have no OSC module, but uses the oscillator found in the built-in transceiver.
f6dd76f to
f304334
Compare
|
Tested on pba-d-01-kw2x (kw22d512 model) and frdm-k64f boards. Everything works as expected. |
|
Please squash. |
f304334 to
98bb2ce
Compare
|
@kYc0o squashed, waiting for Murdock |
Unify cpu_init for all Kinetis CPUs to reduce code duplication. Updated the MCG driver implementation to make the configuration easier. Most clock settings are initialized by kinetis_mcg_init() called from cpu_init. Board specific external clock source initialization (FRDM-K64F, PhyNode) needs to be performed in board_init instead of in cpu_init.
98bb2ce to
742bcad
Compare
|
Go! |
Unify cpu_init for all Kinetis CPUs to reduce code duplication. Updated the MCG driver implementation to make the configuration easier. Most clock settings are initialized by kinetis_mcg_init() called from cpu_init. Board specific external clock source initialization (FRDM-K64F, PhyNode) needs to be performed in board_init instead of in cpu_init.
The clock dividers (SIM_CLKDIV1) previously set in various places for different boards are now unified and handled directly by the MCG driver.