Page 1 of 1

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

Posted: Thu Nov 05, 2020 9:18 am
by willemmerson
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!

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

Posted: Tue Jan 26, 2021 5:54 pm
by andymule
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.

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

Posted: Fri Dec 02, 2022 1:29 am
by johnboiles
Y'all make any progress figuring out RISCV ULP i2c?