Page 2 of 2

Re: How is the ULP coprocessor going to be programmed?

Posted: Thu Oct 05, 2017 7:29 pm
by urbanze
Anyone can write an example of "blink" with ulp? Just toggle on/off a pin...

I tried with "libraries" WRITE_RTC_REG(RTC_IO_TOUCH_PAD0_REG,RTC_IO_TOUCH_PAD0_HOLD_S,1,0) and simillars but doesnt worked. I had sucess with use ulp + delay, for, whiles, vars, but gpio not.

Re: How is the ULP coprocessor going to be programmed?

Posted: Thu Oct 05, 2017 8:56 pm
by krzychb
Just toggle on/off a pin...
Check https://github.com/krzychb/ulp-loop.

Re: How is the ULP coprocessor going to be programmed?

Posted: Thu Oct 05, 2017 9:19 pm
by urbanze
Just toggle on/off a pin...
Check https://github.com/krzychb/ulp-loop.
I see before, and dont understand write(reg)

You can explain better how it work?

Re: How is the ULP coprocessor going to be programmed?

Posted: Fri Oct 06, 2017 5:31 am
by krzychb
I see before, and dont understand write(reg)
There are several instances of using "WRITE_RTC_REG" in https://github.com/krzychb/ulp-loop/blo ... op_blink.S.
Which one would you like to be clarified?

Or you do not understand description in manual - http://esp-idf.readthedocs.io/en/latest ... ers-access

Re: How is the ULP coprocessor going to be programmed?

Posted: Fri Oct 06, 2017 6:55 am
by tomtor
Which sentence in readthedocs are you referring to (regarding 'the readthedocs html docu specify that a signed byte offset can be used to read data')?
Quoute: https://esp-idf.readthedocs.io/en/lates ... the-memory

=============================================================
LD – Load data from the memory

Syntax
LD Rdst, Rsrc, offset
Operands
Rdst – Register R[0..3], destination

Rsrc – Register R[0..3], holds address of destination, in 32-bit words

Offset – 10-bit signed value, offset in BYTES
=============================================================
See also

viewtopic.php?f=2&t=3228&p=15171#p15171

for working subroutines ;)

Re: How is the ULP coprocessor going to be programmed?

Posted: Fri Oct 06, 2017 7:34 am
by ESP_igrr
Offset – 10-bit signed value, offset in BYTES
That looks correct, please see the following section for an explanation:
https://esp-idf.readthedocs.io/en/lates ... addressing


See also viewtopic.php?f=2&t=3228&p=15171#p15171 for working subroutines ;)
Very nice example, thanks.

Re: How is the ULP coprocessor going to be programmed?

Posted: Fri Oct 06, 2017 1:59 pm
by urbanze
I see before, and dont understand write(reg)
There are several instances of using "WRITE_RTC_REG" in https://github.com/krzychb/ulp-loop/blo ... op_blink.S.
Which one would you like to be clarified?

Or you do not understand description in manual - http://esp-idf.readthedocs.io/en/latest ... ers-access
hoho, sucess! Thanks for this links.

See code for simple blink with 1sec delay: https://i.imgur.com/Z7Am2rp.png
Image