下面是BOOTLOADER中的部分内容
Communication safety
All communications from the programming tool (PC) to the device are verified by:
1. checksum: all received 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.
2. for each command the host sends a byte and its complement (XOR = 0x00)
3. UART: parity check active (even parity)
第二条我不太明白:是不是命令的代码和它的complement相异或?要是这样的话,入命令GET,他的代码是0x00,它的complement是0xFF,这样0x00和0xFF异或结果不是0呀?
括号里的内容(XOR = 0x00),是对its complement的一个注释,而不是真正的操作。
谢谢版主,
明白了括号里的内容是注释,但是its complement和注释(XOR = 0x00)有什么关系呢?一个数据怎么异或?
请问你引用的这段的原文出处在哪里?
你的疑问是有道理的,原文这里可能错了。
原文是从官网上下的,文件名是AN2606
Application note
STM32F101xx, STM32F102xx and STM32F103xx
system memory boot mode