Hi all,
During the start of my MCU I need to read a pin's value to determine whether I should enter a bootloader or not.
And the thing is that I want to check this during the __early_init() phase.
To do this I'd like to use the PAL part of the HAL (to keep it all HW independent), but it is not initialized yet.
Is it safe to do a manual palInit() and do the check before all clocks are configured and so on?
I cannot find what limits ChibiOS puts on this.
Thanks for any clarification!
Best Regards
Emil
Manual PAL init?
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Manual PAL init?
Thanks for the answer!
I have tried it and it seems to work, but I noticed that compared to the rest of the HAL it is missing a stop or deinit function?
Is there some generic way to disable the clocks that the PAL has enabled?
Thanks!
I have tried it and it seems to work, but I noticed that compared to the rest of the HAL it is missing a stop or deinit function?
Is there some generic way to disable the clocks that the PAL has enabled?
Thanks!
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Manual PAL init?
Okey! I will have to get my own solution there then.
Is there any generic clock management in ChibiOS?
I have been searching the files and documentation, but I cannot find anything.
My guess is that something like that would be too platform specific.
Is there any generic clock management in ChibiOS?
I have been searching the files and documentation, but I cannot find anything.
My guess is that something like that would be too platform specific.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Manual PAL init?
It is the RCC module in the various STM32 sub-platforms. It is not an API, just a support module for the STM32 HAL.
Giovanni
Giovanni