How is the ULP coprocessor going to be programmed?

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

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

Postby urbanze » Thu Oct 05, 2017 7:29 pm

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.

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

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

Postby ESP_krzychb » Thu Oct 05, 2017 8:56 pm

urbanze wrote: Just toggle on/off a pin...
Check https://github.com/krzychb/ulp-loop.

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

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

Postby urbanze » Thu Oct 05, 2017 9:19 pm

krzychb wrote:
urbanze wrote: 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?

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

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

Postby ESP_krzychb » Fri Oct 06, 2017 5:31 am

urbanze wrote: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

tomtor
Posts: 22
Joined: Thu May 11, 2017 6:15 am

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

Postby tomtor » Fri Oct 06, 2017 6:55 am

ESP_igrr wrote: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 ;)

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Fri Oct 06, 2017 7:34 am

tomtor wrote: 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


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

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

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

Postby urbanze » Fri Oct 06, 2017 1:59 pm

krzychb wrote:
urbanze wrote: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

Who is online

Users browsing this forum: No registered users and 179 guests