| поискавой системы для электроныых деталей |
|
AN4221 датащи(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4221 датащи(HTML) 23 Page - STMicroelectronics |
|
23 / 51 page ![]() DocID024055 Rev 2 23/51 AN4221 Bootloader command set 50 2.7 Erase memory command The Erase Memory command allows the host to erase Flash memory pages or sectors using a two-byte addressing mode. When the bootloader receives the Erase Memory command, it transmits the ACK byte to the host. The bootloader then receives two bytes (number of pages or sectors to be erased), the Flash memory page or sector codes (each of which is 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 host; otherwise, it sends a NACK byte to the host and the command is aborted. Erase Memory command specifications The bootloader receives one half-word (two bytes) that contains 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 global mass erase, 0xFFFE and 0xFFFD respectively for bank1 and bank2 mass erase). Note: Some products do not support the Mass Erase feature, in which case you can send the erase command with the numbers of all pages or sectors instead. Note: Codes 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 receives: • In the case of a special erase, one byte: the checksum of the previous bytes • 0x00 for 0xFFFF, the global erase If N+1 pages or sectors are erased, the bootloader receives (2 x (N + 1)) bytes, each half- word of which contains a page or sector number that is coded on two bytes, with the MSB first. Then all previous byte checksums are received 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 host sends bytes to the STM32 as follows: 1. Byte 1: 0x44 2. Byte 2: 0xBB 3. Wait for ACK 4. Bytes 3-4: – Special erase (0xFFFx), OR – Number of pages or sectors to be erased (N+1 where: 0 ≤N < Maximum number of pages or sectors) 5. Wait for ACK (if special erase is not requested) 6. Remaining bytes: – Checksum of Bytes 3-4 in case of special erase (0x00), OR – (2 x (N + 1)) bytes (page numbers or sectors coded on two bytes MSB first) and then the checksum for bytes 3-4 and all the following bytes). 7. Wait for ACK |
|
ссылки 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 |