I need to upgrade a project to imp002 to imp005 and I’m a new user of electricimp technology. The imp002 code project developed relies on nv table to many things, and I noticed that imp005 and impOS36 have no nv table support.
what can I do to have a non-volatile storage such as nv table in imp005?
impOS (all versions) have nv support when they are on devices that have backup SRAM and support deep sleep.
imp005 does not support deep sleep at all - the silicon isn’t capable of this - and so nv doesn’t exist.
imp004m/imp006 do support deep sleep, but the silicon doesn’t have any backup SRAM, so there’s no nv. However, imp004m/imp006 also have a very low current “shallow sleep” which preserves all RAM - in fact, it just appears like your squirrel code is always running, even when the system is consuming a few tens of microamps.
In almost all cases, customers who used deep sleep on 001/002/003 projects and then moved to 004/006 just use shallow sleep.
…if you want to store data across power cycles on any imp, there are options:
small amounts of data, with system-provided protection for the data: use https://developer.electricimp.com/api/imp/setuserconfiguration and getuserconfiguration. This storage is space-limited, but wear-leveled and (in the case of 005, where it’s off-chip) encrypted and protected with AES-GCM-AEAD and a device-unique key. Number of write cycles will depend on the size of the data and how often you change it.
large amounts of data, use the hardware.spiflash area and (eg) the SPI flash filing system library. This is not encrypted on any imp, but you can hash it with a key stored privately (eg in your code or in the user config place) and https://developer.electricimp.com/api/crypto/hmacsha256 - this will prevent anyone modifying it without you noticing.
tks for your answer! I spent yesterday investigating the imp006 and seems it is sampling and not massive production (and I did not find breakout kit to buy).
Do you know where I can find the imp product lifecycle?
It’s available, just not promoted yet… there will be an announcement soon
If you contact email@example.com, the breakout is available and parts are available too.
All imps that have ever been made are fully supported, back to the imp001 in 2012. imp003/004m/005/006/impC001 are all available.