| поискавой системы для электроныых деталей |
|
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. |
|
|
ссылки 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 |