Using i2c from ULP-RISC-V coprocessor on esp32-S2

willemmerson
Posts: 40
Joined: Mon Mar 18, 2019 12:34 pm

Using i2c from ULP-RISC-V coprocessor on esp32-S2

Postby willemmerson » Thu Nov 05, 2020 9:18 am

I am interested in taking sensor readings using the risc-v coprocessor while in deep sleep, probably every 10 minutes or so, over i2c.
I was interested in doing this to potentially save power, by not waking up the esp to do a sensor reading. I was put off doing this on the stack-based coprocessor because I don't know assembly, but if "it's just c" on the risc-V then it might be worth a go.

So my questions are:

a) is there access to i2c hardware like with the stack-based ULP or would I need to use software i2c?
b) considering it can already wake up, do a sensor reading and go back to sleep in less than 100ms, is using the coprocessor actually going to save any power? i.e. if the risc-v coprocessor consumes significantly more power than normal deep sleep then it might not be

Thanks!

andymule
Posts: 3
Joined: Tue Jan 26, 2021 5:50 pm

Re: Using i2c from ULP-RISC-V coprocessor on esp32-S2

Postby andymule » Tue Jan 26, 2021 5:54 pm

There are some existing examples of this on the non-RISC ULP, which will also work for you if you're chasing functionality:

https://github.com/wardjm/esp32-ulp-i2c
https://github.com/tomtor/ulp-i2c

If you're chasing RISC-V ULP knowledge -- well... So am I.

johnboiles
Posts: 5
Joined: Thu Mar 03, 2022 6:31 am

Re: Using i2c from ULP-RISC-V coprocessor on esp32-S2

Postby johnboiles » Fri Dec 02, 2022 1:29 am

Y'all make any progress figuring out RISCV ULP i2c?

Who is online

Users browsing this forum: Baidu [Spider], zelenecul and 150 guests