Re: What is the right way to add PM to esp32c6

2024-12-03 Thread Tiago Medicci Serrano
Hello Felipe, We have plans to do that, but for now, we have been investing in bug fixes and adding more peripherals, so we don't have a schedule for it. I suggest you open an issue on the repository and report the feature you want and what you have done so far. Eventually, other users may try to

Re: What is the right way to add PM to esp32c6

2024-12-03 Thread Felipe Moura Oliveira
Hello Tiago, Do you have any expectation to add this feature to esp32c6? I am planning my tasks and I may be better waiting for Espressif to provide it. Em qua., 13 de nov. de 2024 às 16:38, Alan C. Assis escreveu: > Hi Tiago, > > I think the issue could be related to the GPIO RTC: the GPIO pi

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Alan C. Assis
Hi Tiago, I think the issue could be related to the GPIO RTC: the GPIO pins have different interruption configurations in normal mode and low power mode (called GPIO RTC mode). Maybe it could be the root cause of the issue, but not idea why WiFi is interfering on it (since it works when WiFi is n

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Tiago Medicci Serrano
Hi Felipe, thanks for making it clearer. I don't see any reason why Wi-Fi would interfere with the interruption detection (that issue I solved earlier regarding the interrupt allocator isn't related here). You can check if the interruption is triggered by checking it on GDB. Did you check that? A

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Felipe Moura Oliveira
Hi Tiago, I realize I didn’t express myself clearly before. What I meant to say is that I believe it’s possible to put the MCU to sleep without modifying the WiFi power manager settings. Looking at this post: https://github.com /espressif/esp-idf/issues/11550, you’ll notice that putting the MCU to

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Tiago Medicci Serrano
Hi Felipe, I don't think they are separate features, please check this documentation: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-reference/system/sleep_modes.html If I understood correctly, you still need PM for using light sleep with RF. Best regards, Em qua., 13 de nov.

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Felipe Moura Oliveira
Hi Tiago, I believe the issue isn’t related to the CONFIG_PM macro. From what I understand, it’s possible to independently put both the MCU and the WiFi transceiver into low-power mode. For now, I’d like to focus on putting only the MCU to sleep by calling the esp_light_sleep_start() function, si

Re: What is the right way to add PM to esp32c6

2024-11-13 Thread Tiago Medicci Serrano
Hi Felipe, Please check the occurrences of `CONFIG_PM_ENABLE` on ESP-IDF's Wi-Fi driver of ESP32-C6. Its counterpart in NuttX would be `CONFIG_PM`

Re: What is the right way to add PM to esp32c6

2024-11-12 Thread Felipe Moura Oliveira
Hello Tiago. When I am using WIFI config and enabling Auto-Sleep, the mcu can no longer wake up from light sleep, so it ends up restarting because of WD. Em ter., 12 de nov. de 2024 às 08:47, Tiago Medicci Serrano < tiago.medi...@gmail.com> escreveu: > Hi Felipe, > > What exactly is your problem

Re: What is the right way to add PM to esp32c6

2024-11-12 Thread Tiago Medicci Serrano
Hi Felipe, What exactly is your problem regarding light sleep and Wi-Fi? If I'm not mistaken, some hooks must be implemented in the Wi-Fi driver too. My suggestion: take a look at IDF's implementation and try light sleep with/without Wi-Fi: compare the `sdkconfig.h` enabling/disabling light sleep

Re: What is the right way to add PM to esp32c6

2024-11-11 Thread Felipe Moura Oliveira
Hello everyone, Tiago, actually I am able to compile and run light sleep using nsh configuration, but it's failing when I am using wifi configuration. I tried it by myself but I cannot solve it, can you give some help please? I push a draft to you look it easely: https://github.com/apache/nuttx/pu

Re: What is the right way to add PM to esp32c6

2024-11-04 Thread Tiago Medicci Serrano
Hi Felipe, good to hear about your progress here! These functions are ROM-defined functions. By checking the TRM, you can see a read-only flash partition that holds some functions (widely used functions, like malloc and internal functions). ets_get_cpu_frequency

Re: What is the right way to add PM to esp32c6

2024-11-01 Thread Felipe Moura Oliveira
Hello everyone, Tiago, I am trying to work with light sleep for now, after it work will go ahead with deep sleep. To run in light sleep I don't need to change linker so I was able to build and flash without "image" issues. Now I am facing other kind of issue: Some functions refers to "ets" functio

Re: What is the right way to add PM to esp32c6

2024-10-29 Thread Felipe Moura Oliveira
Hello Tiago. Please look de draft here: https://github.com/apache/nuttx/pull/14548 This branch will refer to the updated 3rd-party in my repo. You only need to enable PM in menuconfig and it will be enough to see changes. Em ter., 29 de out. de 2024 às 13:10, Tiago Medicci Serrano < tiago.medi.

Re: What is the right way to add PM to esp32c6

2024-10-29 Thread Tiago Medicci Serrano
Hi Felipe, Can you share your PR as a draft on GH to make it easier to check the files (and the build process)? Em ter., 29 de out. de 2024 às 12:41, Felipe Moura Oliveira < moura@gmail.com> escreveu: > Hello Tiago, > > I "finished" the port, but after it my esp32c6 dev kit is resetting. May

Re: What is the right way to add PM to esp32c6

2024-10-29 Thread Felipe Moura Oliveira
Hello Tiago, I "finished" the port, but after it my esp32c6 dev kit is resetting. Maybe the issue is related my changes in boards/risc-v/esp32c6/common/scripts/esp32c6_sections.ld. Can you give some tips about how to go ahead? Below you can see nuttx report: Build:Sep 19 2022 rst:0x7 (TG0_WDT_HPS

Re: What is the right way to add PM to esp32c6

2024-10-29 Thread Felipe Moura Oliveira
Hello everyone, I was able to solve linker issues, editing the linker by myself. I need to finish more than one build issue before testing it, so I will see if I made the right changes in linker. Em seg., 28 de out. de 2024 às 16:01, Felipe Moura Oliveira < moura@gmail.com> escreveu: > *Hell

Re: What is the right way to add PM to esp32c6

2024-10-28 Thread Felipe Moura Oliveira
*Hello everyone, Tiago,* I have made progress with the build issue I was encountering and am now "stuck" at what I believe is one of the final stages. I am experiencing the following compilation error: LD: nuttx riscv-none-elf-ld: warning: /home/felipe-moura/nuttxspace/nuttx-felipe/nuttx has a LOA

Re: What is the right way to add PM to esp32c6

2024-10-25 Thread Tiago Medicci Serrano
Hi Felipe, The RTC GPIO is a feature of the GPIO/RTC driver, so a substitute for this function should be part of `nuttx/arch/risc-v/src/common/espressif/esp_rtc_gpio.c`. That being said, you can either implement it (and define it as a macro, on HAL) or you can either ignore these functions related

Re: What is the right way to add PM to esp32c6

2024-10-25 Thread Felipe Moura Oliveira
Hello Tiago, Thank you for your assistance earlier. I would like to discuss further the necessity of the esp_driver_gpio/include/rtc_io.h file, which is only available in the IDF. In sleep_modes.c, there is the following code snippet: esp_err_t esp_sleep_enable_ext1_wakeup_io(uint64_t io_mask, e

Re: What is the right way to add PM to esp32c6

2024-10-25 Thread Tiago Medicci Serrano
Hi Felipe, `esp_private/pm_impl.h` is from the component `esp_pm` of ESP-IDF, which is a driver directly. Same for `esp_driver_gpio/include/rtc_io.h` (here, a detail: I wasn't able to find this path on IDF, so make sure you are checking under the `release/v5.1` branch, which the HAL was based). Th

Re: What is the right way to add PM to esp32c6

2024-10-24 Thread Felipe Moura Oliveira
Hello all, Tiago, I have a question regarding the porting process. Specifically, I need to add the sleep_modes.c file to the compilation process. Am I on the right path with this approach? To achieve this, I modified the hal_esp32c6.mk file by adding sleep_modes.c. However, I am facing some issu

Re: What is the right way to add PM to esp32c6

2024-10-23 Thread Felipe Moura Oliveira
Hello Tiago. Thank you for clarification, I will follow your instructions. Em qua., 23 de out. de 2024 às 13:01, Tiago Medicci Serrano < tiago.medi...@gmail.com> escreveu: > Hi Felipe, > > Just complementing: use your forked version of the HAL during the > development. As soon as you have a work

Re: What is the right way to add PM to esp32c6

2024-10-23 Thread Tiago Medicci Serrano
Hi Felipe, Just complementing: use your forked version of the HAL during the development. As soon as you have a working version, you can submit on the official repository. Best regards, Em qua., 23 de out. de 2024 às 12:58, Tiago Medicci Serrano < tiago.medi...@gmail.com> escreveu: > Hi Felipe,

Re: What is the right way to add PM to esp32c6

2024-10-23 Thread Tiago Medicci Serrano
Hi, Just another note to guide your development: we don't develop anything on `esp-hal-3rdparty`: most of the code we use from it is derived from the path https://github.com/espressif/esp-hal-3rdparty/tree/release/v5.1.c/components/hal (essentially, header files from `components/hal//include/hal`,

Re: What is the right way to add PM to esp32c6

2024-10-23 Thread Tiago Medicci Serrano
Hi Felipe, Thanks for asking! You should follow the path using the functions on esp-hal-3rdparty. You can fork the repository and use `ESP_HAL_3RDPARTY_VERSION=b4c723a119344b4b71d69819019d55637fb570fd ESP_HAL_3RDPARTY_URL="g...@github.com:tmedicci/esp-hal-3rdparty.git"` env vars (globally or befor

What is the right way to add PM to esp32c6

2024-10-23 Thread Felipe Moura Oliveira
Hello everyone, Our project has reached a point where we need the Power Manager functionality, which is not yet available in the ESP32C6. I am studying to start the implementation, but I am confused about the correct way to approach this. There is a Power Manager implementation for the ESP32C3, b