(window.webpackJsonp=window.webpackJsonp||[]).push([[266],{588:function(t,e,l){"use strict";l.r(e);var i=l(10),_=Object(i.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"c-c-mcu"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#c-c-mcu"}},[t._v("#")]),t._v(" C/C++/MCU")]),t._v(" "),e("p",[e("strong",[t._v("FDILink USART 使用手册")])]),t._v(" "),e("fdi-img",{attrs:{width:"100%",alt:"FDILink USART",src:"/developers/03-fdilinksdk/UART/图片23.png",caption:""}}),t._v(" "),e("h2",{attrs:{id:"_1-简介"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-简介"}},[t._v("#")]),t._v(" 1. 简介")]),t._v(" "),e("p",[t._v("USART(Universal Synchronous/Asynchronous Receiver/Transmitter)是一种通用串行通信接口,支持全双工、同步或异步传输,便于高效获取模块数据。")]),t._v(" "),e("p",[t._v("FDISYSTEMS 通过 USART 提供三类能力:")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("主动发送模式")]),t._v(":模块按设定频率主动向主机输出数据")]),t._v(" "),e("li",[e("strong",[t._v("数据帧请求模式")]),t._v(":按需发送请求,获取对应数据帧")]),t._v(" "),e("li",[e("strong",[t._v("指令配置模式")]),t._v(":通过串口指令完成参数配置")])]),t._v(" "),e("p",[t._v("三种模式可灵活组合,适配不同数据获取与配置场景。")]),t._v(" "),e("h2",{attrs:{id:"_2-使用方法"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-使用方法"}},[t._v("#")]),t._v(" 2. 使用方法")]),t._v(" "),e("h3",{attrs:{id:"_1-主动发送模式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-主动发送模式"}},[t._v("#")]),t._v(" (1) 主动发送模式")]),t._v(" "),e("ol",[e("li",[t._v("若电脑尚未安装串口驱动,请先下载:"),e("a",{attrs:{href:"/pdfs/%E8%BD%AF%E4%BB%B6%E9%A9%B1%E5%8A%A8.zip"}},[t._v("串口驱动下载")]),t._v("。")]),t._v(" "),e("li",[t._v("在 FDIGroundStation 上位机中配置目标 COM 口及输出频率:\n"),e("ol",[e("li",[t._v("配置输出 COM 口波特率")]),t._v(" "),e("li",[t._v("按 FDILink 协议手册配置数据包输出频率")]),t._v(" "),e("li",[t._v("保存设置参数")]),t._v(" "),e("li",[e("strong",[t._v("重启设备使配置生效")]),t._v("(必须先保存再重启)")])])]),t._v(" "),e("li",[t._v("结合本公司例程与通信协议手册,在 USART 总线上接收串口数据。")]),t._v(" "),e("li",[t._v("各数据包字段定义见 "),e("RouterLink",{attrs:{to:"/developers/02-fdilink/03-data-packets/"}},[t._v("FDILink 数据包")]),t._v(";本节仅说明获取方法与步骤。")],1)]),t._v(" "),e("fdi-img",{attrs:{width:"100%",alt:"主动发送模式示意",src:"/developers/03-fdilinksdk/UART/图片24.png",caption:""}}),t._v(" "),e("h3",{attrs:{id:"_2-数据帧请求模式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-数据帧请求模式"}},[t._v("#")]),t._v(" (2) 数据帧请求模式")]),t._v(" "),e("p",[t._v("用户可通过问答方式获取导航系统数据:发送目标数据帧的 ID 与偏移(Offset),系统返回当前时刻对应数据。若该数据帧已配置为固定频率输出,则会持续实时返回。")]),t._v(" "),e("p",[t._v("帧格式定义("),e("code",[t._v("MSG_REQUEST_PACKET")]),t._v(",Packet ID = "),e("code",[t._v("0xA0")]),t._v("):")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("Offset")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("Size")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("Format")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("Field")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("Unit")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("0")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("1")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("uint8_t")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("ID")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}}),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("数据帧的 ID 编号")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("1")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("1")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("uint8_t")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("CMD")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}}),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("请求时填 0,其他未定义")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("2")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("2")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("uint16_t")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("Reserved")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}}),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("保留")])])])]),t._v(" "),e("p",[t._v("更多说明见 "),e("RouterLink",{attrs:{to:"/developers/02-fdilink/03-data-packets/MSG_REQUEST_PACKET.html"}},[t._v("MSG_REQUEST_PACKET")]),t._v("。")],1),t._v(" "),e("h3",{attrs:{id:"_3-指令配置模式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-指令配置模式"}},[t._v("#")]),t._v(" (3) 指令配置模式")]),t._v(" "),e("p",[t._v("可通过串口调试助手或 MCU 串口命令进行主要功能配置。下文示例分别以串口助手发送与 MCU 指令函数调用说明;完整步骤见 "),e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html"}},[t._v("FDILink 指令配置说明")]),t._v("。")],1),t._v(" "),e("h4",{attrs:{id:"串口助手常用命令"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#串口助手常用命令"}},[t._v("#")]),t._v(" 串口助手常用命令")]),t._v(" "),e("p",[t._v("与 "),e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#指令一览"}},[t._v("FDILink 指令一览")]),t._v(" 一致(点击指令名可跳转详细说明):")],1),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("序号")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("配置命令")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("功能")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("1")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fconfig-指令"}},[t._v("#fconfig")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("进入配置模式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("2")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fdeconfig-指令"}},[t._v("#fdeconfig")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("退出配置模式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("3")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#freboot-指令"}},[t._v("#freboot")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("热重启")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("4")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#freset-指令"}},[t._v("#freset")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("恢复出厂默认配置")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("5")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fsave-指令"}},[t._v("#fsave")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("保存设置到 Flash")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("6")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fante-指令"}},[t._v("#fante")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询 / 配置天线相关参数")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("7")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fimucal-指令"}},[t._v("#fimucal")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("IMU 调平 / 零偏校准")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("8")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fmsg-指令"}},[t._v("#fmsg")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("数据包查询与设置")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("9")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fparam-指令"}},[t._v("#fparam")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("参数读取与设置")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("10")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fmagcal2d-指令"}},[t._v("#fmagcal2d")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("磁力计 2D 平面校准")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("11")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fmagcal3d-指令"}},[t._v("#fmagcal3d")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("磁力计 3D 空间校准")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("12")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("RouterLink",{attrs:{to:"/developers/02-fdilink/config-command/FDILink指令配置说明.html#fdgnss-指令"}},[t._v("#fdgnss")])],1),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("差分账号 / RTCM / NTRIP 配置")])])])]),t._v(" "),e("h4",{attrs:{id:"mcu-指令配置函数参照表"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mcu-指令配置函数参照表"}},[t._v("#")]),t._v(" MCU 指令配置函数参照表")]),t._v(" "),e("p",[t._v("以下示例与 SDK 例程 "),e("code",[t._v("Core/Src/main.c")]),t._v(" 及 "),e("code",[t._v("FDI_config.h")]),t._v(" / "),e("code",[t._v("FDILink.h")]),t._v(" 一致。")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("序号")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("指令函数")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("功能")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("形参")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("1")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigBaud(COM1, COMM_BAUD_921600);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置设备数据口波特率")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(COM 口, 波特率)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("2")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigType(COM1, COMM_STREAM_TYPE_NAV);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置设备数据口功能")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(COM 口, 数据口功能)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("3")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigUserDefine(USER_DEFINE_CAN_ID, 1);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 USER_DEFINE 数据")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(USER_DEFINE_ID, NUM)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("4")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigGPIOs(GPIO2, GPIOS_1PPS_OUTPUT);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 GPIO 功能")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(GPIO 口, 模式)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("5")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigAID(AID_ACCEL_GRAVITY, ENABLE);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 AID 开关")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(AID 功能, 开关)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("6")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComGetAxis();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询轴安装方向")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("7")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v('fdiComSetConfigAxis("x", 0);')])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置轴角度方向")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(轴, 角度)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("8")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComGetAxis();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询轴安装方向")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("9")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComGetAnte();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询双天线航向与载体前向夹角")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("10")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigAnteHeadbias(0);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置双天线航向偏角")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(航向偏角)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("11")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigAnteBaseline(0);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置双天线基线长度")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(基线长度)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("12")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigAnteArm(0, 0, 0);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 GNSS 主天线到 IMU 的杆臂")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(x, y, z)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("13")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComGetAnte();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询双天线航向与载体前向夹角")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("14")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigImucailed(Gyro);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 IMU 校准")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(IMU 校准项)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("15")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComSetConfigPacketSentMsg(MSG_UNIX_TIME, 20);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置发送数据包及频率")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(数据包, 频率)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("16")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v('fdiComGetParam("MSG_IMU");')])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询参数")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(参数名)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("17")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v('fdiComGetParam("COMM_BAUD3");')])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询参数")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(参数名)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("18")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v('fdiSetParam("COMM_BAUD3", 8);')])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置参数数值")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(参数名, 数值)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("19")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v('fdiComGetParam("COMM_BAUD3");')])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("查询参数")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(参数名)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("20")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiComConfigAIDmag3DMagetic(Enable);")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("配置 AIDmag3DMagnetic 开关")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("(开关)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("21")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiSetSave();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("保存配置")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("22")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[e("code",[t._v("fdiSetReboot();")])]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("重启设备")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}})])])]),t._v(" "),e("blockquote",[e("p",[e("strong",[t._v("参数写法说明(以 SDK 为准):")])]),t._v(" "),e("ul",[e("li",[e("code",[t._v("char*")]),t._v(" 字符串实参需加引号,如 "),e("code",[t._v('"x"')]),t._v("、"),e("code",[t._v('"COMM_BAUD3"')]),t._v("(见 "),e("code",[t._v("fdiComSetConfigAxis")]),t._v(" / "),e("code",[t._v("fdiComGetParam")]),t._v(" / "),e("code",[t._v("fdiSetParam")]),t._v(")。")]),t._v(" "),e("li",[t._v("枚举 / 宏常量不加引号,如 "),e("code",[t._v("COM1")]),t._v("、"),e("code",[t._v("Gyro")]),t._v("、"),e("code",[t._v("Enable")]),t._v("、"),e("code",[t._v("GPIOS_1PPS_OUTPUT")]),t._v("。")]),t._v(" "),e("li",[e("code",[t._v("MSG_UNIX_TIME")]),t._v(" 等在头文件中已定义为字符串宏(如 "),e("code",[t._v('"51"')]),t._v("),调用时"),e("strong",[t._v("不再")]),t._v("加引号。")]),t._v(" "),e("li",[e("code",[t._v("fdiComSetConfigAID(..., ENABLE)")]),t._v(" 中的 "),e("code",[t._v("ENABLE")]),t._v(" 来自 STM32 HAL;磁力计开关请用 SDK 宏 "),e("code",[t._v("Enable")]),t._v(" / "),e("code",[t._v("Disable")]),t._v("。")]),t._v(" "),e("li",[t._v("函数名 "),e("code",[t._v("fdiComSetConfigImucailed")]),t._v("、"),e("code",[t._v("fdiComConfigAIDmag3DMagetic")]),t._v(" 与头文件拼写一致(含既有拼写)。")])])]),t._v(" "),e("h2",{attrs:{id:"_3-测试效果"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-测试效果"}},[t._v("#")]),t._v(" 3. 测试效果")]),t._v(" "),e("p",[t._v("下图仅说明:USART 数据包经配置后,会按约定格式对外发送。可依据 FDILink 协议手册与例程接收代码,自行编写所需数据包的接收逻辑。")]),t._v(" "),e("fdi-img",{attrs:{width:"100%",alt:"USART 测试效果",src:"/developers/03-fdilinksdk/UART/图片25.png",caption:""}})],1)}),[],!1,null,null,null);e.default=_.exports}}]);