usart0 interrupt receiver lpc845

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

usart0 interrupt receiver lpc845

260 次查看
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 项奖励
回复
1 回复

228 次查看
Harry_Zhang
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 项奖励
回复