📄 dds_ver2.0.txt.bak
字号:
*-----------------------------------------------------------------------------------*
This document is to describe the communication protocol between MCU and DTE
*-----------------------------------------------------------------------------------*
Firstly, this communication protocol is based on serial link, and to provide
serial communicaiton between MCU and DTE in the project of DDS signal generator.
Following is Frame structure.
---------------------------------
| 0x02 | Content | 0x03 |
---------------------------------
Note: 0x02 means the start of the Frame, and 0x03 means is the end of frame.
Between the start and end, there is content of frame. And it's represented
by HEX ASCII code, and the range is from 0(0x30) to F(0x46).
for example. (0x02)(0x30)(0x46)(0x03), so the content is (0x30)(0x46).
Following is Context structrue.
--------------------------------------------
| Frame_Counter | Frame_Type | Frame_Data |
--------------------------------------------
Following is Reply structrue to ack the Frame received and indicate the expected next frame counter.
----------------------
| Frame_Counter + 1 |
----------------------
Note: Frame_Counter is used for Folw control. configure to 0 in both sides.
Ranged from 0(0x30) - F(0x46), increase when send a Frame successfully.
If equal to F(0x46), then increase to get 0(0x30).
So the Frame_Counter is atteched for every frame between MCU and DTE.
If the recipient receive two same counter Frame, that means one of it
should be discard because of re-sending.
Re-sending: if the original side can't get the reply from another side
after sending the frame, in sometimes, maybe 1 second, then the originator
will re-send the previous frame again, and maybe after 3 times failures,
stop sending and inform ERROR both sides.
So the field of Frame_Counter is used for flow control and resending scheme.
Frame_Type is the type of frame, describe it in detail as following( DTE side ---> MCU side ):
0: Initialize the DDS Driver's buffer( empty the buffer for DDS and do some work to configure it )
1: Provide DDS data to DDS driver
2: Make the DDS driver start to work and output RF signal.
3: Get the status of DDS driver.
4:
5: Make the PLL driver start to work.
6:Provide PLL data to PLL driver
7:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -