Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216579

Forum Post: RE: TMS570LS1114: @QJ WANG Summarizing Bootloader issues and thank you

$
0
0
Dear QJ Wang, My PC Code about send data as follows. /*============================================================================== * COMMAND Sent Data *===============================================================================*/ Get_BinaryData( filename ); ulAddress = 0x00010100; ZeroMemory(&frameinfo,sizeof(CAN_OBJ)); frameinfo.DataLen= 8; frameinfo.RemoteFlag = 0; frameinfo.ID = CAN_COMMAND_SEND_DATA; ulLength = image_size; //#3, Loop through the data in the code to be downloaded. for(ulOffset = 0; ulOffset ulLength) { frameinfo.DataLen = ulLength - ulOffset; // Send the send data command with the remainder of the data to be downloaded. //Sleep(1); send_one_FrmFlag=Transmit(USBCAN2,0,0,&frameinfo,1); // canTxstateFlag=ReadCANStatus(USBCAN2,0,0,&vcs); } else { frameinfo.DataLen = 8; send_one_FrmFlag=Transmit(USBCAN2,0,0,&frameinfo,1); Sleep(20); do{ recieve_FrmFlag=Receive(USBCAN2,0,0,ReceiveBuf,50,100); } while (recieve_FrmFlag < 0); if (send_one_FrmFlag < 0) { ShowInfo("write fail",2); } rcvID = ReceiveBuf[0].ID; rcvData = ReceiveBuf[0].Data[0]; rcvDataLen = ReceiveBuf[0].DataLen; if((rcvID != 0x05a6) && (rcvData != 0)) { printf(" - COMMAND_SEND_DATA failed!\n"); } } recieve_FrmFlag=Receive(USBCAN2,0,0,ReceiveBuf,50,10); canRxstateFlag=ReadCANStatus(USBCAN2,0,0,&vcs); rcvID = ReceiveBuf[0].ID; rcvData = ReceiveBuf[0].Data[0]; rcvDataLen = ReceiveBuf[0].DataLen; if((rcvID != 0x07F4) && (rcvData != 0)) { printf(" - COMMAND_SEND_DATA failed!\n"); } } Thanks and Regards Qiuchi

Viewing all articles
Browse latest Browse all 216579

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>