你好对话框,
我试图完全自动化我的OTP编程过程。对于硬件,我有一个自定义接口板,使用FTDI 230x芯片。对于固件,我有一个我闪烁的十六进制文件和OTP头文件。
我目前能够使用CLI来编程OTP。但是,我想避免使用重置引脚或对我的脚本具有任何类型的用户干预。我使用的FTDI芯片的一个功能之一是它具有GPIO,可以为位敲击编程。可以切换其中一个GPIO以进行重置。有没有方法可以创建自己的裸露编程脚本,消除了对重置按钮的需要,刚刚调用FTDI芯片来执行它?我知道FTDI芯片的命令。我只是不知道如何在对话框中调用它。
谢谢你,
迈克尔
Device:
Hi MikeY,
我不确定我理解你的问题,我想你可以通过在FTDI芯片上使用额外的GPIO来重置580,就像击中重置按钮一样。
谢谢mt_dialog.
Hi MT_dialog,
是的,这就是我想要做的,但我如何使用SmartSnippets CLI或其他方式来这样做?我似乎无法弄清楚在SDK5实用程序中编写该代码的位置(如果这是它的位置)。
Best regards,
迈克
我相信改变needs to happen in the source of /SmartSnippets/resources/programmer_ES5.bin, which is the programmer file I am currently using in my CLI script. Do you have any insight into this?
Hi MikeY,
我们没有尝试过类似于您想要做的事情,但我不认为您需要更改对话框提供的任何工具。ES5.BIN是OTP的程序员,并且在580中下载ES5代码之前需要重置电路板。我想您需要一些将触发FTDI的自动化工具,以便在获得后重置电路板重置后重置电路板并继续在重置后继续批处理文件的指示。
谢谢mt_dialog.
你好,
Yes that is correct. Are you aware of any such tool, or perhaps how I can create one?
From my understanding, SmartSnippets requests for the reset button to be pressed on the board and waits for that. After the reset button has been pressed, there is some communication over UART to tell the PC that the reset button has been pressed. All I would like to do is tell the FTDI chip to pulse one of its GPIOs after Smartsnippets sends a request for reset press.
问候,
Mike Y
Hi MikeY,
Sorry but as previously mentioned we never tried this kind of scheme, i am not able to suggest any specific tool or give you guidance in creating a script for this kind of operation.
谢谢mt_dialog.
嗨MT._Dialog,
我有同样的问题是迈克,我有2个问题
1,我们可以在编程芯片时摆脱重置信号。
2, If Question 1 answer is no, then can we use a scripts to simulate the programming process. Because I have failed to accessing the USB chip while the firmware download is in process. Maybe the only way to get rid of the signal is to simulate the whole download process.
Thanks
Hi lovejoey,
1) How do you program the chip, via JTAG or via UART ? in both cases its recommended to have the reset, if the 580 is programmed and sleeping you wont be able to attach a debugger, in any case its recommended to have the reset pin if something goes wrong due to the programming process.
2) I dont exactly get the second question, what do you mean "scripts to simulate the programming process", can you please be more descriptive ?
谢谢mt_dialog.
嗨MT.
1) We are programming the DA14580 over UART.. Let's go over the process together.:
您打开CLI并调用SmartSnippets.exe以将编程_es5.bin加载到DA14580芯片中
执行命令后,CLI将打印一条消息以便要求您按下船上的重置按钮。
以上反映了我现在的问题。我想通过人类的计算机发送硬件重置信号。因此,正如您所说的,JTAG和UART方法都无法摆脱发送重置信号。我试图使用Python脚本来监视CLI输出并使用与DA14580连接的相同USB芯片发送复位信号。但USB芯片由COM通信占用。所以我无法发送重置信号。
2)模拟SmartSnippets过程不准确。它应该使用Python脚本重写所有芯片编程过程。通过这种方式,我需要知道Smartsnippets在编程DA14580芯片时做了什么。
Thanks
Yangkai
Hi lovejoey,
您无法模拟无重置引脚的重置信号,原因智能片段在通过UART下载时询问重置引脚是为了使引导加载程序运行,然后智能Snippest在跟踪时立即将二进制文件推入UART。STX = 0x02(一旦智能代码段检测到来自引导加载程序的STX字符,它指示在控制台上检测到“重置信号),这表示UART引导过程的开始。因此,在复位信号命中(用户必须推动而不是智能片段)之后,UART引导序列开始和智能代码段遵循关于UART引导过程的AN-B-001文档中描述的过程。只要启用了580中的调试器模块,JTAG不需要重置,因此它可以直接访问580。如果禁用DebaGuger模块(使用睡眠580运行FW),您将再次需要重置按钮,按顺序运行主引导程序和主引导加载程序以重新启用调试器模块。
我明白你想用一个信号来切换重置引脚,但据我所知,智能片段或CLI编程器上没有东西可以为您提供该选项。
谢谢mt_dialog.
Hi MT_dialog,
What we are trying to do is emulate what SmartSnippets does but add a software reset from the FTDI 230X. If we can understand the CLI process, then I think we can create a script in Python that would accomplish the same process, and also use the 230X GPIO function to send a RESET pulse to the DA14580.
我们使用的CLI命令是:
command1 ='smartsnippets.exe -type booter -chip da14580-01 -com_port comnum-gpio p0_4 -uart p0_0 -file%userprofile%/ smartsnippets / compresent / programmer_es5.bin
command2 ='smartsnippets.exe -Type OTP -Chip DA14580-01 -Com_Port Comnum -Baudrate 57600-GPIO P0_4 -UART P0_0 -UART%userProfile%/ smartsnippet / resources / programmer_es5.bin -cmd write_custom_code -file / path / to / otpfirmware / path / to / otpfirmware / path / to / otpfirmware/file.hex -offset 0x0'
command3 = 'SmartSnippets.exe -type otp -chip DA14580-01 -com_port comnum -baudrate 57600 -gpio P0_4 -uart P0_0 -firmware programmer_ES5.bin -cmd write_header -file /path/to/OTPHeaderFIle/file.hex'
第一个命令的目的是什么?是否设置FTDI芯片以了解如何与DA14580通信并在收到STX字节后发送SOH字节?或者是DA14580的指令?二元究竟在做什么?在此命令之后,有必要按硬件重置按钮,我假设我们需要重新启动引导过程,以便引导加载程序。App标志仍为0x0000,因此芯片靴进入DEV模式。
I assume the 2nd command is where we begin the UART boot protocol. The chip sends STX and the PC(?) responds with SOH, the LEN_LSB, and LEN_MSB of the firmware, and the DA14580 send the ACK byte. It then waits for our hex file from the PC and loads it starting at Address 0x20000000. Once this is done, the DA14580 sends the CRC and the host must respond with an ACK byte as well. After this, the SYS_CTRL_REG register is programmed to remap to SysRAM and apply a soft reset.
我们现在可以发送我们的OTP标题,这是在第3个命令中完成的。在我们开始发布此十六进制文件之前,是否需要从DA14580收到任何东西?我们需要遵循什么启动序列吗?这里的过程是什么?
OTP标题已编程后,我们现在可以硬重置DA14580并期望我们的固件加载,这是正确的吗?
Hi MikeY,
第一个命令下载设定的弗兰克-威廉姆斯费尔e option (in your case the ES5_programmer that the 580 should have in order to program the OTP), the bytes that the 580 emmits is when the bootloader is running and the 580 awaits for the fw that will be downloaded. The STX is transmitted by the 580 and when that 0x02 is detected Smart Snippets assumes that the reset has been pressed and starts the indicated sequence. You dont need to invoke both of the commands that you are indicating (the first 2 that you mention), you can apply directly the second command and the programmer will be downloaded and then the -file that you have indicated in the write_custom_code will be written as your image or as your header.
To sum up the -firmware firmware_file that you are indicating to the command will be downloaded before the execution of the specified command if you dont use this parameter in your commands you should use the first command that you have indicated, so that the 580 to be programmed with the ES5_programmer and then you can issue the next commands. So the reset is needed in order for the bootloader to run so that the STX is detected and so that the programmer_ES5.bin to be downloaded into the 580.
You can find all the CLI commands and explanation of what each comman does in the SmartSnippetsHelp.pdf at the command line implementation section, the help file is located in the Smart Snippets directory. You can open the SS and click on help option and choose the UserGuide.pdf
After you have burned the OTP and the application flags in the OTP header, when you hit the reset button the OTP application should be loaded to the sysram.
谢谢mt_dialog.