Forums - Enabling UART interrupt

3 posts / 0 new
Last post
Enabling UART interrupt
nidhinmshani
Join Date: 1 Aug 16
Posts: 1
Posted: Mon, 2016-08-01 01:36

Hi,

I am using UART for CSR board to PC communication. I need to send a command to PC and receive its response in AppProcessLmEvent. Basically I need to wait in a while loop in AppProcessLmEvent and wait for command to be recived over UART. But it seems UART is disabled in AppProcessLmEvent.

Is there any way to receive UART data in such situation..

Thanks for help..

Thanks,

Nidhin MS

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Wed, 2016-08-03 00:47

never use endless look with CSR1010

UART RX generates an event on incoming UART message. 

save that message until seeing CR

on CR send all message to RF part. 

  • Up0
  • Down0
cbs
Profile picture
Join Date: 4 Mar 15
Location: IoT consultant, Cambridgeshire, UK
Posts: 21
Posted: Thu, 2016-08-11 03:59

Have a look at UartInit() where you can specify a callback function whenever a character is received on the UART. Note that this function is called from an interrupt so don't loop in there: either store the character for later or forward to wherever it needs to go.

The SDK is event driven, so you should never loop waiting for something to happen (that's the uEnergy stack's job)

Chris

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.