| поискавой системы для электроныых деталей |
|
AN4286 датащи(PDF) 24 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4286 датащи(HTML) 24 Page - STMicroelectronics |
|
24 / 38 page ![]() DocID024458 Rev 2 24/38 AN4286 Bootloader command set 37 2.8 Erase Memory command The Erase Memory command allows the master to erase the Flash memory pages or sectors using two-byte addressing mode. When the bootloader receives the Erase Memory command, it transmits the ACK byte to the master. After transmission of the ACK byte, the bootloader receives two bytes (number of pages or sectors to be erased), the Flash memory page codes (each one coded on two bytes, MSB first) and a checksum byte (XOR of the sent bytes). If the checksum is correct, the bootloader erases the memory and sends an ACK byte to the master. Otherwise it sends a NACK byte to the master and the command is aborted. Erase Memory command specifications The bootloader receives two bytes that contain N, the number of pages or sectors to be erased. • For N = 0xFFFY (where Y is from 0 to F) a special erase is performed. – 0xFFFF for a global mass erase. – 0xFFFE for a Bank 1 mass erase (only for products supporting this feature). – 0xFFFD for a Bank 2 mass erase (only for products supporting this feature). – Values from 0xFFFC to 0xFFF0 are reserved. • For other values where 0 ≤ N < maximum number of pages or sectors: N + 1 pages or sectors are erased. The bootloader then receives the following. • In the case of a special erase, one byte: checksum of the previous bytes: (that is, 0x00 for 0xFFFF). • In the case of N+1 pages or sector erase, the bootloader receives (2 x (N + 1)) bytes, each half-word containing a page number (coded on two bytes, MSB first). Then all previous byte checksums (in one byte). Note: No error is returned when performing erase operations on write-protected sectors.The maximum number of pages or sectors is relative to the product and thus should be respected. The master sends bytes to the STM32 as follows. • Start Of Frame: 0x5A • Byte 1: 0x44 • Byte 2: 0xBB • Wait for ACK (as described in section 1) • Bytes 3-4: – Special erase: global erase (0xFFFY where Y={F, E, D}) OR – Number of pages or sectors to be erased (N+1 where: 0 ≤ N < maximum number of pages or sectors). • Remaining bytes: – Checksum of bytes 3-4 in the case of a special erase (0x00, 0x01 or 0x02). OR – (2 x (N + 1)) bytes (page numbers coded on two bytes MSB first) then the checksum for bytes 3-4 and all the following bytes). |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |