This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我使用不同的控制器作为 PGA460的主控制器。(UART 以115200波特率进行初始化、具有2个停止位、8个数据位、UART_DIAG = 1)
从 PGA460EnergiaLibrary_v1.0.2中、我获得了.cpp 和.h 驱动程序文件、我将.cpp 驱动程序转换为.c 驱动程序。 我能够写入阈值、读取阈值、写入 EEPROM、从 EEPROM 读取、写入影子寄存器、 从影子寄存器读取,但当我使用系统诊断程序时,PGA460将在这个回复后以40 00 00 00 00进行回复,当我尝试执行任何操作(读取影子寄存器)时,它将以00 00 00进行回复。 如果是拉动回波数据转储、PGA460将以4C 00 00进行回复、之后不会处理读取或写入命令。
以下是调用的函数
initBoostXLPGA460 (0、115200、0);
initThresholds (3); //3 -自定义阈值
readThresholds();
defaultPGA460 (2); //2 -自定义默认值
burnEEPROM();
initTVG (3、3); //3 -自定义 TVG 值
read_shadow_register();
runEchoDataDump (0); //ultrasonicCmd (1、1);
//ultrasonicCmd (0、1);
//runDiagnostics (1、0);
pullEchoDataDump (0);
read_shadow_register();
对于 超声波 Cmd (0、1); 传输的 UART 数据为;55 00 01 FE
对于 超声波 Cmd (1、1); 传输的 UART 数据为;55 01 01 FD
对于 runDiagnostics (1、0); 传输的 UART 数据为;55 08 F7 在执行此命令后,应答40 00 00 00,其它命令不能正常工作(读取和写入命令)。
在 GUI 界面模式下、我能够从 PGA460获得所有命令的有效回复。
您能帮我解决这个问题吗
谢谢、此致、