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

ferni9
Posts: 4
Joined: Fri Mar 27, 2020 11:29 am

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

Postby ferni9 » Sun Mar 29, 2020 9:56 am

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!

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

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

Postby boarchuz » Sun Mar 29, 2020 3:23 pm

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.

ferni9
Posts: 4
Joined: Fri Mar 27, 2020 11:29 am

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

Postby ferni9 » Mon Mar 30, 2020 8:26 am

Ok!, thx for your quick reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 103 guests