I'm new in KDS and Kinetis FRDM, but I wanna use a interruption for receive data from UART.
I'm using fsl_uart component whit the Rx configuration in the image.
Can someone tell me, how and when is the UART_RxCallback(uint32_t instance, void * uartState) works?
or if I can use it as interrupt for mi program?.
Hi.
you can find api RxCallback() usage in Kinetis SDK v.1.3 API Reference Manual.pdf under KSDK1.3 install folder.
you can also refer thread:
https://community.nxp.com/message/567462#comment-567462
can this help you?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks ZhangJennie!
I saw the example and it looks easy, but if I wanna send back the information I can't visualize that information.
I have checked the uart_non_blocking example and it works when I send/receive information directly from main.c but my purpose is use interupts to receive and send the information I received to another or the same uart.
the code I used is:
void UART_1_RxCallback(uint32_t instance, void * uartState)
{
uint8_t rxChar[5]={0};
UART_DRV_ReceiveData(instance, rxChar, 1);
UART_DRV_SendData(instance, rxChar, 1u);
}
yes, you can use interrupt with KSDK. I suggest you refer this document
Interrupt handling with KSDK and Kinetis Design Studio
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------