TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

ginodecock
Posts: 30
Joined: Thu Jun 29, 2017 7:10 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby ginodecock » Sat Jul 01, 2017 3:48 pm

Ok,

Thanks for the reply.

I am looking for a solution to periodically log temperature and send result once a day.

How to control the deep sleep timer from deep sleep stub and move a function to ROM?

Thanks,

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby WiFive » Sat Jul 01, 2017 6:59 pm

ginodecock wrote:move a function to ROM?
You can't move functions to ROM, it is not writable.

Maybe you should use a ULP program to read the temp, store it in ram, then wake up when you have to transmit.

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

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby ESP_igrr » Sun Jul 02, 2017 6:02 am

Indeed, ULP would be more suitable for this task, and overall current consumption would be lower than if you wake up from deep sleep to measure the temperature.

Take a look at the deep sleep example, it shows how to read TSENS using the ULP.

ginodecock
Posts: 30
Joined: Thu Jun 29, 2017 7:10 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby ginodecock » Tue Jul 04, 2017 7:59 pm

Hi,

The end product would be more complex. During guarding the temperature sensor is controlled by I2C and the temperature should be displayed on a lcd display with low energy.

Here I was hoping that the deep sleep wake up stub would make it doable to do in C-code to:

-measure temperature over I2C
-log temperature in RTC slow mem
-show it on a display over I2C
-control deep sleep timer for next sensor reading
==> If time to offload data wakeup and boot.
==> If problem temperature wakeup and alert.

Doing this on the ULP processor would be quite difficult because programming is in assembler

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby WiFive » Tue Jul 04, 2017 10:35 pm

Not that difficult because ulp has i2c master so you don't have to implement it with bit bang.

ginodecock
Posts: 30
Joined: Thu Jun 29, 2017 7:10 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby ginodecock » Sat Jul 08, 2017 9:29 pm

@WiFive, you're right. Programming the ulp processor is doable using the assembler macros.
I was able to do temperature logging of the cpu temperature in RTC memory.

@Espressif, a sample of I2C with the ulp processor would be appreciated.

Thanks,

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby rudi ;-) » Sun Jul 09, 2017 2:13 pm

ginodecock wrote:@WiFive, you're right. Programming the ulp processor is doable using the assembler macros.
I was able to do temperature logging of the cpu temperature in RTC memory.

@Espressif, a sample of I2C with the ulp processor would be appreciated.

Thanks,
am not espressif
but suggest you to use simple bit bang on the ulp domain available pins.
there is no driver available

hope this helps

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby rudi ;-) » Sun Jul 09, 2017 2:14 pm

WiFive wrote:Not that difficult because ulp has i2c master so you don't have to implement it with bit bang.
?
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby rudi ;-) » Sun Jul 09, 2017 2:15 pm

rudi ;-) wrote:
WiFive wrote:Not that difficult because ulp has i2c master so you don't have to implement it with bit bang.
?
can be that i have you missunderstand -
the i2c master is bit bang mode or not ?

it sound "ulp has i2c master so you don't have to implement it with bit bang" was like
ulp has I2C Master "HW" driver
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Postby WiFive » Sun Jul 09, 2017 8:17 pm

rudi ;-) wrote: ulp has I2C Master "HW" driver
The ULP co-processor can use a separate I2C controller, located in the RTC domain, to communicate with
external I2C slave devices. RTC_I2C has a limited feature set, compared to I2C0/I2C1 peripherals.

Who is online

Users browsing this forum: No registered users and 51 guests