« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.7 - WriteMem (WriteCal)

Writes 1 block (32 bytes) to the non-volatile user or calibration memory.

Command number 0x28 accesses the user memory area. Hardware version 1.2 has 256 bytes (block numbers 0-7), hardware versions 1.21 and 1.3 have 512 bytes (block 0-15). The ensure backwards compatibility only 256 Bytes are accessible when using the LJ_chUSER_MEM function in the UD driver. 

Command number 0x2B accesses the calibration memory area consisting of 512 bytes (block numbers 0-15), of which the last 8 blocks are not used. Memory must be erased before writing. Do not call this function while streaming.

The U3 flash has a rated endurance of at least 20000 writes, which is plenty for reasonable operation, but if this function is called in a high-speed loop the flash could eventually be damaged. In the case of these functions, that means 20000 writes per 32-byte block.

Table 5.2.7-1. WriteMem Command Response

Command:  
Byte  
0 Checksum8
1 0xF8
2 0×11
3 0×28 (0×2B)
4 Checksum16 (LSB)
5 Checksum16 (MSB)
6 0×00
7 BlockNum
8-39 32 Bytes of Data
   
Response:  
Byte  
0 Checksum8
1 0xF8
2 0×01
3 0×28 (0×2B)
4 Checksum16 (LSB)
5 Checksum16 (MSB)
6 Errorcode
7 0×00

2 comments

Hello,

Is it the same memory used for the configuration that the non-volatile user memory used. Thus, it counts in the rated endurance of at least 20000 writes.

Thanks.

Claude C.

I added a paragraph above.  This flash memory does have the same endurance rating of at least 20000 writes.  In this case that means 20000 writes per 32-byte block of flash.