Page 2 of 3

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sat Jul 01, 2017 3:48 pm
by ginodecock
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,

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sat Jul 01, 2017 6:59 pm
by WiFive
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.

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sun Jul 02, 2017 6:02 am
by igrr
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.

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Tue Jul 04, 2017 7:59 pm
by ginodecock
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

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Tue Jul 04, 2017 10:35 pm
by WiFive
Not that difficult because ulp has i2c master so you don't have to implement it with bit bang.

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sat Jul 08, 2017 9:29 pm
by ginodecock
@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,

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sun Jul 09, 2017 2:13 pm
by rudi ;-)
@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 ;-)

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sun Jul 09, 2017 2:14 pm
by rudi ;-)
Not that difficult because ulp has i2c master so you don't have to implement it with bit bang.
?

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sun Jul 09, 2017 2:15 pm
by rudi ;-)
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

Re: TG0WDT_SYS_RESET after two DEEPSLEEP_RESET

Posted: Sun Jul 09, 2017 8:17 pm
by WiFive
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.