Write the data to flash memory

Description

  Write the data from serial port to flash memory.

This command can't be used in commands set

If any data already exsited at the writing destination memory space, An erase command must be run before writing, or the data in that memory area will be unusable.

Note: V7 firmware----the address will be remapped into the reserved memory space that reserved by command Reserve flash.

Usage:

Direct:

"FLMWRAL" follow with the L bytes of data

Arduino:

void flashWrite(uint32_t addr, uint32_t length, const uint8_t * pdata)

C:

void Digole_flashWrite(uint24_t addr, uint24_t length, const uint8_t * pdata)

Parameters:

A, addr

The 3 bytes of start address where the memory going to be erased.

L, length

The 3 bytes length of the memory going to be erased

pdata

The pointer to the data that be saved

Return:

none

Example (Arduino):

uint8_t d[4096]={......};

mydisp.flashWrite(65536L,4096,&d); //write 4096 bytes of data address 65536 and 69631

Example(direct)

 

uint8_t d[4096]={......};

serial.writeString("FLMWR\x01\x00\00\x00\x10\x00"); //send write command

for(uint16_t i=0;i<4096;i++) //write 4096 bytes of data address 65536 and 69631 serial.write(d[i]);

Changelog

Version Description
   

See Also

Mini file

Write data to E2PROM