📄 flip_um.htm
字号:
</DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013319"></A>Programming the BLJB fuse</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013320"></A>Syntax : setupBljbFuse <value></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013325"></A>Example : setupBljbFuse 1 (*)</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013330"></A>Programming the X2 fuse</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013331"></A>Syntax : setupX2Fuse <value></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013340"></A>Example : setupX2Fuse 1 (*)</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013307"></A> </LI></UL><P CLASS="BT-Body-Text"><A NAME="pgfId-1013280"></A>The above commands do not actually perform the described operations, they only setup them. In order to execute the described operations, you must select the File > Execute Configuration File command or press the F5 key.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-1013306"></A>You may comment out a line of the configuration file by inserting a "#" character at the beginning of the line.</P></DIV></DIV><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1013346"></A>Configuration file example</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1013347"></A>Putting all this together, we can build a full configuration file :</P><P CLASS="BT-Body-Text"><A NAME="pgfId-1013461"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1013391"></A># --------------- Configuration file example -------------------</P><P CLASS="C-Code"><A NAME="pgfId-1013463"></A>#</P><P CLASS="C-Code"><A NAME="pgfId-1013462"></A># Device selection and communication setup</P><P CLASS="C-Code"><A NAME="pgfId-1013422"></A>selectDevice T89C51RC2</P><P CLASS="C-Code"><A NAME="pgfId-1013423"></A>set port COM1</P><P CLASS="C-Code"><A NAME="pgfId-1013424"></A>set baud 57600</P><P CLASS="C-Code"><A NAME="pgfId-1020426"></A>initProtocol RS232Standard</P><P CLASS="C-Code"><A NAME="pgfId-1013425"></A>connectRS232 Standard</P><P CLASS="C-Code"><A NAME="pgfId-1013464"></A>#</P><P CLASS="C-Code"><A NAME="pgfId-1013426"></A>parseHexFile "D:/Labo/dev/app/Flip_dev/bin/2kisp.hex"</P><P CLASS="C-Code"><A NAME="pgfId-1013465"></A># Erase 3 blocks</P><P CLASS="C-Code"><A NAME="pgfId-1013427"></A>setupEraseBlock0</P><P CLASS="C-Code"><A NAME="pgfId-1013428"></A>setupEraseBlock1</P><P CLASS="C-Code"><A NAME="pgfId-1013429"></A>setupEraseBlock2</P><P CLASS="C-Code"><A NAME="pgfId-1013466"></A># Blank checking requires 3 lines</P><P CLASS="C-Code"><A NAME="pgfId-1013430"></A>setupBlankCheckDevice</P><P CLASS="C-Code"><A NAME="pgfId-1013431"></A>set blankCheckAddr(start) 0010</P><P CLASS="C-Code"><A NAME="pgfId-1013432"></A>set blankCheckAddr(end) 07FF</P><P CLASS="C-Code"><A NAME="pgfId-1013467"></A># Program the device with the above loaded HEX file</P><P CLASS="C-Code"><A NAME="pgfId-1013433"></A>setupProgramDevice</P><P CLASS="C-Code"><A NAME="pgfId-1013468"></A># Verify proper device programming</P><P CLASS="C-Code"><A NAME="pgfId-1013434"></A>setupVerifyDevice</P><P CLASS="C-Code"><A NAME="pgfId-1013469"></A># Program the special bytes</P><P CLASS="C-Code"><A NAME="pgfId-1013435"></A>setupSBV FB</P><P CLASS="C-Code"><A NAME="pgfId-1013436"></A>setupBSB 81</P><P CLASS="C-Code"><A NAME="pgfId-1013437"></A>setupOscFuse 1</P><P CLASS="C-Code"><A NAME="pgfId-1013438"></A>setupBljbFuse 0</P><P CLASS="C-Code"><A NAME="pgfId-1013439"></A>setupX2Fuse 1</P><P CLASS="C-Code"><A NAME="pgfId-1013440"></A>setupSecurityLevel 1</P><P CLASS="C-Code"><A NAME="pgfId-1041052"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041053"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041054"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041055"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041056"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041057"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041058"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041059"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041060"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041061"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041062"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041063"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041064"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041065"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041066"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041067"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041068"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041069"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041070"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041071"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041072"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041073"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041074"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041075"></A> </P><P CLASS="C-Code"><A NAME="pgfId-1041076"></A> </P><DIV><H6 CLASS="N-Note"><A NAME="pgfId-1013375"></A>(*) Please read the device data sheet to determine if the "on" value is 1 or 0.</H6></DIV></DIV></DIV><DIV><H4 CLASS="SHNP-Section-Head-New-Page"><A NAME="pgfId-974400"></A>Troubleshooting</H4><P CLASS="BT-Body-Text"><A NAME="pgfId-962601"></A>It may happen that FLIP prompts you with warning or error messages; this chapter lists these messages and explains where they come from.</P><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1015904"></A>Global messages</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1015905"></A> </P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-962605"></A>Time Out Error</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-962606"></A>Check the communication medium connections and the target hardware power supply.<BR>If everything is allright, reset the target hardware and select a smaller baud rate from the FLIP communication medium dialog box. For maximum performance purpose, FLIP and its software companion (the bootloader) do not perform any data flow control (no XON/XOFF). Therefore, at high baud rates, it may happen that the bootloader has no time enough to perform data management and does not answer properly to the FLIP commands or the answer comes too late.</LI></UL><P CLASS="BT-Body-Text"><A NAME="pgfId-962600"></A> </P></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015852"></A>Software Security Bit set. Cannot access device data.</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015860"></A>The major part of the target device is protected against writing operations when the device is set to the security level 1 and protected against reading operations when the device is set to the security level 2. The above message means that the operation performed by FLIP is not legal.</LI></UL></DIV></DIV><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1015861"></A>CAN messages</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1015906"></A> </P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015833"></A>CAN interface error</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015838"></A>The PC parallel port to CAN hardware interface did not execute the FLIP command properly.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015848"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015843"></A>Unexpected CAN response data length</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015849"></A>The length of the CAN message sent by the bootloader is unexpected.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015842"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-973571"></A>The bootloader did not understand the FLIP command</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015826"></A>The CAN protocol stack specification mentions that while sending programming frames to the device, the bootloader may answer with a data byte of 0x00 if it got all data from FLIP, 0x02 if it expects more data from FLIP and 0x01 if the bootloader failed to execute the write command.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015862"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015865"></A>Got an error message ID from the bootloader but the CAN message data value is not correct.</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015873"></A>The bootloader has detected an error condition and signals it by an error message which is itself corrupted.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015874"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015877"></A>Got an error message ID from the bootloader but the CAN message data length is not correct.</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015885"></A>The bootloader has detected an error condition and signals it by an error message which length is not correct.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015892"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015883"></A>The CAN message ID is not correct.</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015893"></A>The bootloader answer contains an incorrect identifier.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015894"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015895"></A>Invalid bootloader answer on blank check</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015900"></A>During the device blank check operation, the bootloader has sent an incorrect answer to FLIP.</LI></UL></DIV></DIV><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1015907"></A>RS232 messages</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1015908"></A> </P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015909"></A>The board reply is not correct</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015914"></A>Probably a framing error detected by the microcontroller UART.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015929"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015915"></A>The RS232 port could not be opened</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015921"></A>The selected serial port does not exist or has not been closed properly. Quit FLIP and start it again.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015933"></A> </LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1015934"></A>Check sum error</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1015939"></A>The bootloader has received from FLIP a frame which checksum is not correct.</LI></UL><P CLASS="BT-Body-Text"><A NAME="pgfId-1040632"></A> </P></DIV></DIV></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -