-
Notifications
You must be signed in to change notification settings - Fork 3
ULP memory management
Main idea is to fit in memory as many modules as possible. So i want to understand memory consumption for each module.
readfifo30100 1784 - 1460 = 324 :')
writeMULTY 1460 - 1300 = 160
readMULTY 1300 - 1088 = 212
read16 1088 - 956 = 132
read8 956 - 872 = 84
write16 872 - 696 = 176
write8 696 - 544 = 152
popfail, fail 544 - 504 = 40
I2c util vars 504 - 504 Hmmmm???
store_mem 504 - 488 = 16
Inc sample_counter. 488 - 472 = 16
wake_up 472 - 448 = 24
waitMs 448 - 420 = 28
i2c_read_byte 420 - 332 = 88
i2c_write_byte 332 - 268 = 64
i2c_read_bit 268 - 224 = 44
i2c_write_bit 224 - 172 = 52
i2c_stop_cond 172 - 116 = 56
i2c_start_cond 116 - 20 = 96
move r3, stackEnd 20 - 16 = 4
AS RESULT --- init main program and i2c except multi and fifo ~ 1032
Ina219. 1884 - 1032 = 852. ????? big
lsm6ds3 3076 - 1884 = 1192. ????? too big ()
mlx90615 (+ readMULTY) 3680 - 3076 = 604
ds3231 (+ writeMULTY) 4064 - 3680 = 384
All other logic for on/off sensor -- 4632 - 4064 = 568
Bmw280 (onlyPreassureCALIBR reading) 5396 - 4632 = 764 (best case, create multy read for 16 byte)