Page 1 of 1

ULP, pack two 16-bit measurements in one 32-bit register (r0,r1,r2,r3)

Posted: Sun Mar 29, 2020 9:56 am
by ferni9
Hi,
I am working on a project with ESP32 where I read 16-bit data from an IMU sensor in deep-sleep, hence with ULP.
In order to downsize the data stored in RTC_SLOW_MEM region I would like to save 2 16-bit measurements in one 32-bit register (r0,r1,r2,r3), though I don't know if this is possible. Any ideas? Thank you!

Re: ULP, pack two 16-bit measurements in one 32-bit register (r0,r1,r2,r3)

Posted: Sun Mar 29, 2020 3:23 pm
by boarchuz
R0-R3 are 16 bit registers.

ULP can only access the lower 16 bits of each 32-bit word in RTC slow memory so that's not possible.

Re: ULP, pack two 16-bit measurements in one 32-bit register (r0,r1,r2,r3)

Posted: Mon Mar 30, 2020 8:26 am
by ferni9
Ok!, thx for your quick reply