usart0 interrupt receiver lpc845

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

usart0 interrupt receiver lpc845

186 Views
Sathiya_T
Contributor I

Hi,

am using lpc845, sdk example USART0 transfer interrupt project, data send in the transfer method is working good. But in interrupt method receiver is not work, then the Xfer->rxdata is always 0. please be explain the receiver data register and i just print the data in g_rxbuffer but always I got 0 only.

another one doubt is in transfer interrupt method NVIC  handler is enable,but in receiver function i could not seen any handler,only register(base->INTSET) is present in the example project, i want to know thr receiver NVIC,and receiver buffer for output data.

here i attached my doubt area while debugging, please be explain .

0 Kudos
Reply
1 Reply

154 Views
HangZhang
NXP Employee
NXP Employee

Hi @Sathiya_T 

Q1:

You can add these code to print receives buffer.
for (uint8_t i =0;i<ECHO_BUFFER_LENGTH;i++)

{

PRINTF("g_rxBuffer[%d]=%d\r\n",i,g_rxBuffer[i]);

}

You can refer to the picture.

HangZhang_0-1718071049880.png

And The output of the serial port is shown in the figure.

HangZhang_1-1718071075285.png

Q2:
The 

EXAMPLE_USARTUserCallback

function is the interrupt call back function.
 
HangZhang_3-1718071169118.png

 

When an interrupt is triggered, it will enter the callback function.
Hope this will help you.
 
BR
Hang
0 Kudos
Reply