| | |
| | | if (transferType == DOWNLOAD_FLASH) |
| | | { |
| | | UDS_L_CRCCheckFail_b = !MEM_PartitionCRCOK((uint8_t)MEM_PARTITION_CODEFLASH); |
| | | if (UDS_L_CRCCheckFail_b == false) |
| | | { |
| | | NVM_ReInitFlashDriveRam(); // CLEAR FLASH DRIVE IN RAM |
| | | } |
| | | } |
| | | else |
| | | { |
| | | UDS_L_CRCCheckFail_b = !MEM_PartitionCRCOK((uint8_t)MEM_PARTITION_RAM); |
| | | if (UDS_L_CRCCheckFail_b == false) |
| | | if (UDS_L_CRCCheckFail_b == true) |
| | | { |
| | | NVM_ReInitFlashDriveRam(); // CLEAR FLASH DRIVE IN RAM |
| | | } |
| | |
| | | UDS_L_tx_msg_buffer[1] = 0x01; |
| | | UDS_L_tx_msg_buffer[2] = 0xff; |
| | | UDS_L_tx_msg_buffer[3] = 0x00; |
| | | UDS_L_tx_msg_buffer[4] = (uint8_t) true; |
| | | UDS_L_tx_msg_buffer[4] = 0; // 0:ok 1£ºerror |
| | | /* Specify the send payload size */ |
| | | UDS_L_tx_msg_size = 5; |
| | | UDS_RespTxMessage(); |
| | |
| | | operation_write.current_sequenc = expectedSequenceCnt; |
| | | operation_write.prev_seqence = currentSequenceCnt; |
| | | |
| | | UDS_SendNegResp(NRC_SERVICE_BUSY); // first send busy |
| | | write_result = NEM_WriteData(&operation_write); // todo write all data at this function |
| | | if (write_result == OP_STATUS_OK) |
| | | { |