I wrote a simple ULP blink programm, and it basically works.
But my goal was to use the main core just for loading and starting the ULP code, nothing else.
Unfortunately the led at GPIO2 stays off if I don't do a rtc_gpio_init(2) in the main core first.
Is it not possible to do the equivalent from within the ULP copro?
Here is what I tried, maybe you see the error?
main.c: https://github.com/joba-1/Blink-ULP/blo ... main.c#L16
blink.S: https://github.com/joba-1/Blink-ULP/blo ... link.S#L18
Code: Select all
// This tries to mimic rtc_gpio_init(GPIO_NUM_2), but does not work yet :(
WRITE_RTC_REG(RTC_IO_TOUCH_PAD2_REG, RTC_IO_TOUCH_PAD2_MUX_SEL_M, 1, 1)
WRITE_RTC_REG(RTC_IO_TOUCH_PAD2_REG, RTC_IO_TOUCH_PAD2_FUN_SEL_M, 1, 0)