Page 1 of 1

ADC in custom Bootloader

Posted: Wed Mar 01, 2023 8:02 am
by gianluca.siano
Hello,

is it possible to use the ADC APIs in the 2nd-level-bootloader? (I use a ESP32-C3)
I can not integrate the "driver/adc.h" in the bootloader. In the official ESP-IDF description it is written:

"In the bootloader space, you cannot use the drivers and functions from other components. If necessary, then the required functionality should be placed in the project’s bootloader directory (note that this will increase its size)."

Does it mean I should copy the "esp-idf" folder in my custom bootloader folder?

Is there any example application on using ADC in bootloader? Or at least a hint of which layer to use, HAL, LL or Register( :shock: )?

Re: ADC in custom Bootloader

Posted: Wed Mar 08, 2023 11:36 am
by rudi ;-)
gianluca.siano wrote:
Wed Mar 01, 2023 8:02 am
Hello,

is it possible to use the ADC APIs in the 2nd-level-bootloader? (I use a ESP32-C3)
I can not integrate the "driver/adc.h" in the bootloader. In the official ESP-IDF description it is written:

"In the bootloader space, you cannot use the drivers and functions from other components. If necessary, then the required functionality should be placed in the project’s bootloader directory (note that this will increase its size)."

Does it mean I should copy the "esp-idf" folder in my custom bootloader folder?

Is there any example application on using ADC in bootloader? Or at least a hint of which layer to use, HAL, LL or Register( :shock: )?
According to the official ESP-IDF documentation, it is not possible to use drivers and functions from other components in the bootloader space. Therefore, you will need to place the required functionality in the project's bootloader directory if it is necessary.

Regarding your question of whether you should copy the "esp-idf" folder in your custom bootloader folder, it is not recommended to do so, as it would increase the size of your bootloader unnecessarily.

Unfortunately, I am not aware of any example application on using the ADC in the bootloader, but you might find it useful to look into using the Register layer to interact with the ADC. Alternatively, you could consider using a custom ADC driver integrated directly into your project's bootloader directory.


"AskRudi"

Re: ADC in custom Bootloader

Posted: Fri Mar 10, 2023 8:32 am
by gianluca.siano
rudi ;-) wrote:
Wed Mar 08, 2023 11:36 am
gianluca.siano wrote:
Wed Mar 01, 2023 8:02 am
Hello,

is it possible to use the ADC APIs in the 2nd-level-bootloader? (I use a ESP32-C3)
I can not integrate the "driver/adc.h" in the bootloader. In the official ESP-IDF description it is written:

"In the bootloader space, you cannot use the drivers and functions from other components. If necessary, then the required functionality should be placed in the project’s bootloader directory (note that this will increase its size)."

Does it mean I should copy the "esp-idf" folder in my custom bootloader folder?

Is there any example application on using ADC in bootloader? Or at least a hint of which layer to use, HAL, LL or Register( :shock: )?
According to the official ESP-IDF documentation, it is not possible to use drivers and functions from other components in the bootloader space. Therefore, you will need to place the required functionality in the project's bootloader directory if it is necessary.

Regarding your question of whether you should copy the "esp-idf" folder in your custom bootloader folder, it is not recommended to do so, as it would increase the size of your bootloader unnecessarily.

Unfortunately, I am not aware of any example application on using the ADC in the bootloader, but you might find it useful to look into using the Register layer to interact with the ADC. Alternatively, you could consider using a custom ADC driver integrated directly into your project's bootloader directory.


"AskRudi"

Ok, it would increase the bootloader unnecessarily, but I can change the partition.csv accordly