This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280039C: Question about adding delay after SCI_writeCharArray()

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi,

I used SCI_writeCharArray(uint32_t base, const uint16_t * const array, uint16_t length); function that is reference code in C2000ware.

I programmed that MCU send total 197 bytes by using SCI_writeCharArray() function.

If I didn't put 'DEVICE_DELAY_US(120)' after 'SCI_writeCharArray()', MCU sent total 196 bytes(missing last byte) and parrity error occured 

Below is my code and picture of measured waveform by Logic Analyzer

switch(LFU_Rev_Block_Status)
{
    case RECEIVE_BLOCK_HEADER: //xBL_Image_Header:
        SCI_writeCharArray(SCIB_BASE, (uint16_t *)xBL_Update_Data_Info.All, sizeof(xBL_Update_Data_Info));// BL_IMAGE_HEADER_SIZE
        DEVICE_DELAY_US(120);
        bUART_CMD_Frame_Tx_Request_Flag = 0;

        break;


    case RECEIVE_BLOCK_DATA: //xBL_Update_Data_Info:
        xBL_Update_Data_Info.byte.cmd = 0xD7;
        memcpy(&xBL_Update_Data_Info.byte.Receive_Block_Size, wbuffer, RECEIVE_BLOCK_SIZE_IN_ONE_BLOCK);
        SCI_writeCharArray(SCIB_BASE, (uint16_t *)xBL_Update_Data_Info.All, sizeof(xBL_Update_Data_Info));//RECEIVE_BLOCK_SIZE_IN_ONE_BLOCK+1
        DEVICE_DELAY_US(120);
        bUART_CMD_Frame_Tx_Request_Flag = 0;

        break;


    default:
        bUART_CMD_Frame_Tx_Request_Flag = 0; //Clear
        //Clear to the first CMD byte.
        break;

} // End Switch

Please advice why this problem occur if I didn't put DEVICE_DELAY_US(120) after SCI_writeCharArray.