Hi,
I have been looking at this example where the author used the ULP to make an LED blink:
https://github.com/joba-1/Blink-ULP
The example uses GPIO 2 (RTC GPIO 12) to connect the LED. I tried unsuccessfully to change the example to make use of GPIO 25. According to table 4.4 of the TRM GPIO 25 is equivalent to RTC GPIO 6. The blink example uses RTC_IO_TOUCH_PAD2_REG to set the digital function for RTC GPIO 12. There is no corresponding register for RTC GPIO 6, so my question is if it is possible to use GPIO 25 and if yes, how to configure RTC IO_MUX.
TIA,
AP
Use ULP to blink LED
Re: Use ULP to blink LED
RTC_IO_PAD_DAC1_REG
Re: Use ULP to blink LED
Thanks, that helped. I got it to work with:
AP
Code: Select all
WRITE_RTC_REG(RTC_IO_PAD_DAC1_REG, 17, 1, 1)
WRITE_RTC_REG(RTC_IO_PAD_DAC1_REG, 15, 2, 0)
Re: Use ULP to blink LED
I got it to blink with the following. My LED is on RTC_GPIO6 (RTC_GPIO_OUT_DATA_S+6), same as GPIO25 (see https://www.programmersought.com/article/40455220487/). The code is taken from https://codingfield.com/en/2019/01/15/u ... le-simple/.
Code: Select all
loop1:
WRITE_RTC_REG(RTC_GPIO_OUT_REG,RTC_GPIO_OUT_DATA_S+6,1,1)
WAIT 65535
WAIT 65535
[...]
WAIT 65535
WRITE_RTC_REG(RTC_GPIO_OUT_REG,RTC_GPIO_OUT_DATA_S+6,1,0)
WAIT 65535
WAIT 65535
[...]
WAIT 65535
JUMP loop1
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], justenyonyer and 100 guests