tao_z
2022-05-31 41f087b7183a5730e46b7eaa322b6852d602babf
Application/source/uds_modules/uds.c
@@ -1773,11 +1773,15 @@
                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
                    }
@@ -1914,7 +1918,7 @@
        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();
@@ -2184,6 +2188,7 @@
    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)
    {