eren-terzioglu opened a new pull request, #18792:
URL: https://github.com/apache/nuttx/pull/18792
## Summary
<!-- This field should contain a summary of the changes. It will be
pre-filled with the commit's message and descriptions. Adjust it accordingly -->
* 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
<!-- Please fill the following sections with YES/NO and provide a brief
explanation -->
Impact on user: Yes, they can wakeup ULP LP-Core from other sources to save
more power
<!-- Does it impact user's applications? How? -->
Impact on build: No
<!-- Does it impact on building NuttX? How? (please describe the required
changes on the build system) -->
Impact on hardware: Yes, ULP LP-Core can work differently
<!-- Does it impact a specific hardware supported by NuttX? -->
Impact on documentation: Yes, related docs added
<!-- Does it impact the existing documentation? Please provide additional
documentation to reflect that -->
Impact on security: No
<!-- Does it impact NuttX's security? -->
Impact on compatibility: No
<!-- Does it impact compatibility between previous and current versions? Is
this a breaking change? -->
## Testing
<!-- Please provide all the testing procedure. Consider that upstream
reviewers should be able to reproduce the same testing performed internally -->
`esp32p4-function-ev-board:ulp` and `esp32c6-devkitc:ulp` configs used to
test with `ESPRESSIF_ULP_WAKEUP_LP_TIMER` option
### Building
<!-- Provide how to build the test for each SoC being tested -->
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
<!-- Provide how to run the test for each SoC being tested -->
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
<!-- Provide tests' results and runtime logs -->
After build flash and run example, GPIO0 should blink with a a period of 2
seconds
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]