Skip to main content
mushfiq
Associate II
October 6, 2016
Question

UART communication issue

  • October 6, 2016
  • 1 reply
  • 573 views
Posted on October 06, 2016 at 06:30

is there any way so that i can know whether my uart is active or not ,i wanna send an AT Command to a gsm module such as ''AT+CCLK?'' in return of this command the GSM module will give the time and date from nearest gsm tower as reply to that AT Command, actually i want a function just like Serial.available()>0 in arduino. I'm using Keil 5 and a beginner so please help me out.

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    October 6, 2016
    Posted on October 06, 2016 at 14:15

    You'll need to accumulate characters in a USART RXNE interrupt, and count them.

    ie buffer[available++] = USART_ReadData

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..