Skip to content

arch/risc-v/espressif: Add ULP wakeup modes#18792

Merged
simbit18 merged 3 commits intoapache:masterfrom
eren-terzioglu:feature/esp_ulp_config
Apr 24, 2026
Merged

arch/risc-v/espressif: Add ULP wakeup modes#18792
simbit18 merged 3 commits intoapache:masterfrom
eren-terzioglu:feature/esp_ulp_config

Conversation

@eren-terzioglu
Copy link
Copy Markdown
Contributor

Summary

  • Docs/platforms/risc-v: Add ULP wakeup modes docs for esp32[-c6|-p4]

Add ULP wakeup modes docs for esp32[-c6|-p4]

  • board/risc-v/espressif: Add ULP wakeup modes board support

Add ULP wakeup modes board support for esp32[-c6|-p4]

  • arch/risc-v/espressif: Add ULP wakeup modes

Add ULP wakeup modes for esp32[-c6|-p4]

Impact

Impact on user: Yes, they can wakeup ULP LP-Core from other sources to save more power

Impact on build: No

Impact on hardware: Yes, ULP LP-Core can work differently

Impact on documentation: Yes, related docs added

Impact on security: No

Impact on compatibility: No

Testing

esp32p4-function-ev-board:ulp and esp32c6-devkitc:ulp configs used to test with ESPRESSIF_ULP_WAKEUP_LP_TIMER option

Building

Command to build:

make distclean && ./tools/configure.sh esp32p4-function-ev-board:ulp && kconfig-tweak -e CONFIG_ESPRESSIF_ULP_WAKEUP_LP_TIMER && make olddefconfig && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0

Running

Custom application used to run

ULP Example:

#include <stdint.h>
#include "nuttx/config.h"
#include <stdbool.h>
#include "ulp_lp_core_gpio.h"

#define GPIO_PIN 0

bool gpio_level_previous = true;

int main(void)
{
    ulp_lp_core_gpio_set_level(GPIO_PIN, gpio_level_previous);
    gpio_level_previous = !gpio_level_previous;
    return 0;
}

HP Core example:


#include <nuttx/config.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <nuttx/fs/ioctl.h>
#include <sys/ioctl.h>

#include "ulp/ulp/ulp_main.h"
#include "ulp/ulp/ulp_code.h"

int main(int argc, char *argv[])
{
  int fd;

  fd = open("/dev/ulp", O_WRONLY);
  if (fd < 0)
    {
      printf("Failed to open ULP: %d\n", errno);
      return -1;
    }

  write(fd, ulp_blink_bin, ulp_blink_bin_len);

Results

After build flash and run example, GPIO0 should blink with a a period of 2 seconds

Add ULP wakeup modes for esp32[-c6|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Add ULP wakeup modes board support for esp32[-c6|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: L The size of the change in this PR is large Board: risc-v labels Apr 24, 2026
@eren-terzioglu eren-terzioglu force-pushed the feature/esp_ulp_config branch from 78790a8 to 9a56181 Compare April 24, 2026 07:45
Add ULP wakeup modes docs for esp32[-c6|-p4]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@simbit18 simbit18 merged commit 61b0fd1 into apache:master Apr 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Documentation Improvements or additions to documentation Board: risc-v Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants