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.

DRA829V: UART Transmission Delay

Part Number: DRA829V
Other Parts Discussed in Thread: DRA829

Hi Team,

we are developing custom Application on R5 core of DRA829 processor but we are observing delay of 1 ms in Transmission of each byte could you please suggest the reason we want continuous data transmission

we used "UART_write(uart, (void *)(uintptr_t)addrDataPrint, strlen(dataPrint)"  driver APIs to transmit the data. we observed the transmitted data on serial terminal using UART to USB converter but in logic analyzer we observed a delay of 1ms in data transmission between each byte of data

i am attaching the image of Analyzer

Regards 

Divyanshu

  • Hi Divyanshu,

    Are you using UART in interrupt mode or polling mode? 

    Regards,
    Parth

  • Hi Parth,

    I am using UART in polling mode.

  • Hi Divyanshu,

    There is some delay in the polling mode by design. You can see UART_charPut_v1  at <pdkInstallPath>\packages\ti\drv\uart\src\v1 is using UART_osalDelay.

    You can use interrupt mode your application.

    Regards,
    Parth

  • hi parth,

    I tried it using interrupt mode UART communication  worked fine for UART instance 0 but when i am changing UART instance other than 0 it is not working no data is transmitted. could you please suggest anything extra need to configure to use other UART instance in interrupt mode. In polling mode other UART Instance worked fine.

    Regards

    Divyanshu

  • Hi Divyanshu,

    There should not be any other configuration required. 

    but when i am changing UART instance other than 0

    Are these other instances from the same SOC domains as UART instance 0?

    Regards,
    Parth

  • Hi path,

    I am testing the code on MAIN_R5_core0(mcu2_0)

    I am using  UART of Main Domain from 0 to 9. and using UART_Baremetal_DMA_Test application for reference but in that i changed the UART instance in UART_board.h from 0 to 3 the code hangs at UART_initConfig function. 

    The code works fine for UART_instance 0,1,2 but for UART_instance 3-9 it hangs in UART_initConfig function. i think some problem with UART Interrupt only. because when i am disabling the interrupt it is working fine. could you please test it on EVM and provide some suggestion.

    Regards

    Divyanshu

  • I'll try this, meanwhile, can you please share the code snippet where you are configuring the interrupt?

  • Hi parth,

    I have not done much changes in the demo code to enable the interrupt. but while debugging through CCS i found the code is hanging in below assembly line.

      

    you can check the UART_Baremetal_DMA_Test Application in mcu2_0 core by changing UART_instance in pdk/package/ti/drv/uart/test/src/UART_board.h from 0 to3.

    Regards

     Divyanshu

  • Hi Parth,

    Any update on the issue waiting for your response.

    Regards

    Divyanshu

  • Hi Divyanshu,

    Apologies for delay in response. Are all the 10 UART instances in your board connected to your peripheral? Can you please share how the connections are made between your UART instances and the peripheral?

    Regards,
    Parth

  • Hi Parth,

    In my board total 10 UART is connected to DB9 connector. please find the below block diagram and schematics

    The same code works fine for UART_Instance:0,1,2 but it not work for UART_Instance 3-9.

    For initial testing I am using ttl converter and connected to serial port of pc to observe the output. 

    Regards 

    Divyanshu

  • Divyanshu,

    Looks like there might be some issue with the interrupt mapping for mcu2_0 core. Can you try your application on A72 core and see if it is working?
    This will help us isolate the issue.

    Regards,
    Parth

  • Hi Parth,

    For A72 core also not getting the output the code stuck at below place

    Regards 

    Divyanshu

  • Is A72 working in polling mode?

  • Hi Divyanshu,

    We are tracking this as a bug in and working on it. 

    Regards,
    Parth

  • Hi Parth,

    i am messaging on behalf of Divyanshu.

     code is working on A72 core both in interrupt and polling mode.

    For R5 core(mcu2_0) it not worked.

    Thanks for feedback we will wait for the response. please provide as soon as possible. 

  • Hi Parth,

    Any update we are waiting for your inputs

    please provide us the feedback asap

    Regards

    Divyanshu

  • Hi Divyanshu,

    As I mentioned this is being taken up as a bug. Will check with the SDK team and get back with updates.

    Regards,
    Parth

  • Hi Parth,

    We understand that Divyanshu and his team are interested to know when a potential fix could be offered here.

    Could you please comment?

    Thank you,
    Chris

  • Hi Divyanshu,

    Please add the code below to configure the interrupt router from your application for UART Instances 3-9:

    struct tisci_msg_rm_irq_set_req      rmIrqReq;   
    struct tisci_msg_rm_irq_set_resp     rmIrqResp;   
    int32_t ret = UART_SUCCESS;
    
    (void)memset (&rmIrqReq, 0, sizeof(rmIrqReq));   
         
    rmIrqReq.secondary_host = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST;     
    rmIrqReq.src_id = TISCI_DEV_UARTx; /* 'x' can be '3' to '9', depending on UART instance */       
    rmIrqReq.src_index = 0; 
            
    /* Set the destination interrupt */     
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_ID_VALID;     
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;
    
    /* Set the destination based on the core */      
    rmIrqReq.dst_id       = TISCI_DEV_R5FSSx_COREy; /* 'x'='0'/'1' 'y'='0'/'1', depending on MAIN R5F core */       
    rmIrqReq.dst_host_irq = <intNum>; /* intNum can be any # from '256' to '383' for "CORE0", and from '384' to '511' for "CORE1". This is related to the resource partitioning in BoardCfg. */
    
    retVal = Sciclient_rmIrqSet((const struct tisci_msg_rm_irq_set_req*)&rmIrqReq, &rmIrqResp, SCICLIENT_SERVICE_WAIT_FOREVER);
    /* Make sure retVal is success */

    Please modify the above code according to the comments.

    Also, add the lines below, after UART_init is called:

    UART_socGetInitCfg(<UART_Instance>, &uart_cfg);

    uart_cfg.intNum= <intNum>; /* This should be same as that used for rmIrqReq.dst_host_irq */

    UART_socSetInitCfg(UART_Instance>, &uart_cfg);

    I have tried this on my end for UART instance 4 and it works fine.

    Regards,
    Parth

  • Hi Path,

    Thanks for the support.

    Now all UART ports are working fine in interrupt mode.