Re: UART and Thread

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: UART and Thread

1,164 Views
ajaykr
Contributor I

Hi all,

Just now i tried the Uart-polling example with the same project,which is

working.I think the issues is with the interrupt.

 

On Mon, Dec 26, 2016 at 3:20 PM, Ajay K R <ajay.kr@erislabs.com> wrote:

 

Hi,

Thanks for reply.I'm using FRDM-64f board.First I checked my code alone

using the project uart non blocking,with interrupt and which is working

perfect.Then I moved the same code into the lwip tcp echo demo

project,which is now showing some issues.

 

      nRet = UART_DRV_Init(BOARD_DEBUG_UART3_INSTANCE, &uartState,

&uartConfig);

      pFunc = (uart_rx_callback_t *)uart_Callback;

      UART_DRV_InstallRxCallback(BOARD_DEBUG_UART3_INSTANCE

,(uart_rx_callback_t)pFunc ,&rxChar, 0, NULL);

      NVIC_SetPriority(I2C0_IRQn, 3U);

    while(true)

    {

     ReceiveCommandFromSerial();

     UART_DRV_ReceiveData(BOARD_DEBUG_UART3_INSTANCE , &rxChar , 8u);

    }

 

}

void uart_Callback()

{

__asm("nop");

}

If I use UART_DRV_SendData() function the whole board is getting hanging.

--

Regards

AJAY K R

 

 

 

 

--

Regards

AJAY K R

Labels (1)
0 Kudos
Reply
3 Replies

1,062 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello AJAY K R,

Thanks for your sharing.

So now one hand you can use the polling method,

on the other hand, if you must use interrupt, you need debug and analysis it

step by step , for example check whether the data have send , debug into

the function to check it hang which code ...

BR

Alice

0 Kudos
Reply

1,062 Views
ajaykr
Contributor I

Hi,

I conducted a step by step analysis,which shows a  UART_DRV_SendData() function is showing blocking the entire code.Suggest some solution to solve the issue with interrupt method.Polling method is not suitable for my application.

0 Kudos
Reply

1,062 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

 You can share your project, then i debug on my side and check the problem.

BR

ALice

0 Kudos
Reply