[riot-notifications] [RIOT-OS/RIOT] cpu/qn908x: Initial minimal support for NXP QN908x CPUs. (#13855)
notifications at github.com
Mon Nov 30 04:09:30 CET 2020
@iosabi commented on this pull request.
> +void clocks_init(void)
+ /* Set up clock selectors - Attach clocks to the peripheries */
+ /* Switch XTAL_CLK to 32M */
+ /* Switch 32K_CLK to XTAL32K */
+ /* Switch SYS_CLK to XTAL */
+ /* Switch WDT_CLK to APB */
+ /* Set up dividers */
+ /* Set OSC32M_DIV divider to value 2 */
+ CLOCK_SetClkDiv(kCLOCK_DivOsc32mClk, 1U);
+ /* Set XTAL_DIV divider to value 2 */
+ CLOCK_SetClkDiv(kCLOCK_DivXtalClk, 1U);
+ /* Set AHB_DIV divider to value 2 */
+ CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U);
+ /* Set FRG_MULT1 to value 0, Set FRG_DIV1 to value 255 */
+ CLOCK_SetClkDiv(kCLOCK_DivFrg1, 0U);
+ /* Set FRG_MULT0 to value 0, Set FRG_DIV0 to value 255 */
+ CLOCK_SetClkDiv(kCLOCK_DivFrg0, 0U);
+ /* Set APB_DIV divider to value 1 */
+ CLOCK_SetClkDiv(kCLOCK_DivApbClk, 0U);
I moved this to cpu.c and added a whole lot of config.
I'm not entirely sure how is the Kconfig supposed to work. If I run `make BOARD=qn9080dk -C examples/hello-world/` the `autoconf.h` is not generated and the CONFIG_ variables with the defaults in the Kconfig are not set, not even the ones the board should be forcing.
I ended up adding the same logic with CONFIG_* variables in the cpu_conf.h, maybe this is just a transition thing but it would be better if I don't have to do that. On the other hand adding them to cpu_conf.h lets me document them so doxygen can pick them up.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications