Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4221 Datasheet(PDF) 7 Page - STMicroelectronics

Part # AN4221
Description  I2C protocol used in the STM32 bootloader
PDF  51 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4221 Datasheet(HTML) 7 Page - STMicroelectronics

Back Button AN4221 Datasheet HTML 3Page - STMicroelectronics AN4221 Datasheet HTML 4Page - STMicroelectronics AN4221 Datasheet HTML 5Page - STMicroelectronics AN4221 Datasheet HTML 6Page - STMicroelectronics AN4221 Datasheet HTML 7Page - STMicroelectronics AN4221 Datasheet HTML 8Page - STMicroelectronics AN4221 Datasheet HTML 9Page - STMicroelectronics AN4221 Datasheet HTML 10Page - STMicroelectronics AN4221 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 51 page
background image
DocID024055 Rev 2
7/51
AN4221
Bootloader command set
50
No-Stretch commands
No-Stretch commands allows executing Write, Erase, Write Protect, Write Unprotect, Read
Protect and Read Unprotect operations without stretching I2C line while bootloader is
performing the operation. These commands allows communicating with other devices on
the bus while bootloader performs operation that require waiting time.
The difference between these commands and the standard commands is at the end of the
command: When hosts requests ACK/NACK at the end of the command, instead of
stretching the I2C line, the bootloader responds with a third state which is Busy (0x76).
When Host receives Busy state, it should poll again on the state and read one byte till it
receives ACK or NACK response.
Communication safety
All communication from the programming host to the device is verified by checksum.
Received blocks of data bytes are XORed. A byte containing the computed XOR of all
previous bytes is added to the end of each communication (checksum byte). By XORing all
received bytes, data + checksum, the result at the end of the packet must be 0x00.
For each command, the host sends a byte and its complement (XOR = 0x00).
Each packet is either accepted (ACK answer) or discarded (NACK answer):
•
ACK = 0x79
•
NACK = 0x1F
With No-Stretch commands Busy state is sent instead of ACK or NACK when an operation
is ongoing:
•
BUSY= 0x76
Note:
The host's frame can be one of the following:
•
Send Command frame: The host initiates communication as master transmitter, and
sends two bytes to the device: command code + XOR.
•
Wait for ACK/NACK frame: The host initiates an I2C communication as master
receiver, and receives one byte from the device: ACK or NACK or BUSY.
•
Receive Data frame: The host initiates an I2C communication as master receiver, and
receives the response from the device. The number of received bytes depends on the
command.
•
Send Data frame: The host initiates an I2C communication as master transmitter, and
sends the needed bytes to the device. The number of transmitted bytes depends on
the command.
Caution:
For I2C communication, a timeout mechanism is implemented which must be respected for
Bootloader commands to be executed correctly. This timeout is implemented between two
I2C frames in the same command. For example, for a Write memory command, a timeout is
inserted between the command-sending frame and address memory-sending frame. Also,
the same timeout period is inserted between two successive instances of data reception or
2. Read protection - When the RDP (read protection) option is active, only this limited subset of commands is available. All
other commands are NACKed and have no effect on the device. Once the RDP has been removed, the other commands
become active.
3. Please refer to STM32 product datasheet and AN2606: STM32 microcontroller system memory boot mode to know which
memory spaces are valid for these commands.
4. No-Stretch commands are available only with I2C protocol V1.1.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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