arjun.a
rename files
6c7b14a
Ticket Name: RTOS/TDA2EVM5777: Uart data missing
Query Text:
Part Number: TDA2EVM5777 Other Parts Discussed in Thread: TDA2 Tool/software: TI-RTOS Hi, I register Uart ISR in IPU1, to receive data from external device. it works well when data size not more than FIFO size, but will fail when data size more than FIFO size. the FIFO trigger level is set to 1, and we tried several baud rate (230.4k / 460.8k / 921.6k), the symptoms are the same. could you give me some help. Thanks~~~
Responses:
Hi, Can you set the FIFO trigger level to half the FIFO size and try? Also check with baudrate of 115.2K. Regards, Prasad
Hi, I haven't heard back from you, I'm assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out). Regards, Rishabh
Hi, sorry to reply late. baud 115200 also not works. I found some symptoms. I register ISR in one task. when ISR can be processed, the data transmission seems already finished. so we always can receive less than FIFO size. does it mean ISR not be processed immediately ? and the INT priority is already set to 1. Thanks~~~
Hi Markii, Did you try setting the FIFO threshold as suggested above? Regards, Rishabh
Hi, yes, we also check FIFO threshold to 8/16/32, but it seems no much difference. Thanks~
Hi Markii, I did not get from your previous reply what you mean by - "I register ISR in one task. when ISR can be processed, the data transmission seems already finished. so we always can receive less than FIFO size." Are you receiving the data from external device before the UART in SoC is configured? Regards, Prasad
Hi, Uart config and ISR register in task's drvcreate function, before receiving the data from external device. if external device send more than 64 bytes to TDA2, I always can receive only the first 64 bytes data. that is why I think the data transmission had already finished when ISR was called. Thanks~~
Hi, Can you tell what version of software you are using? Also share the sequence of APIs you are using to configure UART? Regards, Prasad
Hi, SDK version is 03_04 UART configure flow as below ***************************************************************************************************** HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_UART2_CLKCTRL,0x2); PlatformUnlockMMR(); PlatformUART2SetPinMux(); UARTConfigInit(SOC_UART2_BASE, 921600, UART_WORD_LENGTH_8, UART_STOP_BIT_1, UART_NO_PARITY, UART13x_OPER_MODE); UARTRegConfigModeEnable(SOC_UART2_BASE, UART_REG_CONFIG_MODE_B); HW_WR_REG32(SOC_UART2_BASE+UART_TLR, 0x0); UARTRegConfigModeEnable(SOC_UART2_BASE, UART_REG_OPERATIONAL_MODE); HW_WR_REG32(SOC_UART2_BASE+UART_FCR, 0x41); HW_WR_REG32(SOC_UART2_BASE+UART_LCR, 0x3); HW_WR_REG32(SOC_UART2_BASE+UART_SCR, 0x81); BspOsal_irqXbarConnect(CSL_XBAR_INST_IPU1_IRQ_60, CSL_XBAR_UART2_IRQ); BspOsal_registerIntr(CSL_XBAR_INST_IPU1_IRQ_60, (BspOsal_IntrFuncPtr)UARTIsr, NULL); Hwi_enableInterrupt(CSL_XBAR_INST_IPU1_IRQ_60); UARTIntEnable(SOC_UART2_BASE, UART_INT_RHR_CTI); ***************************************************************************************************** Thanks~~
Hi, Can you try to use the UART driver and check if you can receive the data? Driver handles the interrupts and fifo etc properly and its tested in multiple use cases. The uart driver is present in "<pdk_install_dir>\packages\ti\drv\bsp_lld\uart". You can refer the example provided. Regards, Prasad
Hi, I am trying to understand this UART driver and use it. I have 2 questions. 1. Does this UART driver can be used in TI RTOS? 2. What's wrong of my flow and configuration? why it can not work? Thanks~~~
Hi Markii, This driver can be used in RTOS. The issue here is that you are trying to use CSL based UART code in Vision SDK context. Regards, Rishabh
Hi, I haven't heard back from you, I'm assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out). Regards, Rishabh
Hi, I found the problem of my configuration. It can work now. Thanks~~
Hi Markii, Glad that your issue is resolved. Can you please post the solution for future references. Regards, Rishabh