How to re-configure the system clock by code in runtime?
Moderators: RoccoMarco, barthess
-
- Posts: 24
- Joined: Sun Jan 12, 2020 2:11 pm
- Has thanked: 4 times
How to re-configure the system clock by code in runtime?
Is there any way to re-configure or change the system clock by code in runtime?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: How to re-configure the system clock by code in runtime?
Hi,
Only for some newest devices: G0, G4, L4+, WL. The procedure is quite complex and requires stopping and restarting all drivers affected by the clock change.
Giovanni
Only for some newest devices: G0, G4, L4+, WL. The procedure is quite complex and requires stopping and restarting all drivers affected by the clock change.
Giovanni
-
- Posts: 24
- Joined: Sun Jan 12, 2020 2:11 pm
- Has thanked: 4 times
Re: How to re-configure the system clock by code in runtime?
1. my board is stm32l4xx,can i use the stm32L4+'s code?
2. the clock is setuped in halInit() or chSysInit()? can i call that in runtime to re-configure the clock?
2. the clock is setuped in halInit() or chSysInit()? can i call that in runtime to re-configure the clock?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: How to re-configure the system clock by code in runtime?
Hi,
On the L4 there is no support for dynamic clocking, L4+ is quite different and the code cannot be used.
It would be possible to do in L4 HAL the same changes done in L4+ HAL but I have no immediate plans for that, you may try to compare hal_lld.c and hal_lld.h.
Giovanni
On the L4 there is no support for dynamic clocking, L4+ is quite different and the code cannot be used.
It would be possible to do in L4 HAL the same changes done in L4+ HAL but I have no immediate plans for that, you may try to compare hal_lld.c and hal_lld.h.
Giovanni
-
- Posts: 24
- Joined: Sun Jan 12, 2020 2:11 pm
- Has thanked: 4 times
Who is online
Users browsing this forum: No registered users and 17 guests