How can I use RxCallback for fsl_uart component

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I use RxCallback for fsl_uart component

2,116件の閲覧回数
sergiosaucedo
Contributor I

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?.

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,476件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,476件の閲覧回数
sergiosaucedo
Contributor I

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);

}

0 件の賞賛
返信

1,476件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信