| 数据搜索系统,热门电子元器件搜索 |
|
UM0541 数据表(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0541 数据表(HTML) 5 Page - STMicroelectronics |
|
5 / 19 page ![]() UM0541 Architecture 5/19 1.2 Communication mechanism 1.2.1 Introduction This section describes the transmission mechanism and the reception mechanism between CPU commander and a target device. 1.2.2 Transmission To send data, the sender must build a DCP frame and insert information in each field. The sender has to perform these steps: 1. Insert the CommandID. 2. Set the correct flags for the functionality requested (SYS, ACK, CRC). 3. Insert the Length of the bytes of the data. 4. Insert the data. 5. Calculate the CRC if the CRC flag is set and insert the value at the end of the frame. 6. Call the function SendFrame(frame). 1.2.3 Reception The reception is interrupt implemented. Using UART communication, the receiver receives one byte at a time, so the number of the byte received depends from the properties of each frame. If the acknowledge management is activated, the first seven bytes (FrameID, CommandID, Flags, Length) are mandatory. If the acknowledge management is not activated the first six bytes are always present (CommandID, Flags, Length). After the reception of the Length, it is possible to know how many bytes of data the receiver has to receive. After the receiver has received all data, it waits for CRC flag if the CRC flag is set, otherwise the reception is complete. When the frame is complete, the receiver can pass the frame to the DCP protocol for the parsing calling DCP_ProcessFrame() function. If the frame is a system (SYS) frame, DCP protocol executes the task programmed for the specific SYS. If the frame is an acknowledge frame (ACK), the protocol checks if the FrameID of the frame received corresponds to the expected FrameID. If the FrameID does not match, an error occurs. If the CommandID of the frame is a user CommandID, the management of this frame is passed to the CallBack function managed by the user. In fact, the user has to insert the managed frame into the Callback function with a CommandID which is specific to the application. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |