AnsweredAssumed Answered

UART Communication for STM32L4 in KEIL

Question asked by sachin singh on Mar 28, 2018
Latest reply on Mar 29, 2018 by AvaTar

Hi,

I am newbie to this STM32L4 Controller. I am working on GPS device to get the location of the location and i am using the CubeMax and Keil software for programming. As i have mention that i am newbie, I dont know how do I move forward.

I want to Learn the programming in Keil and with their HAL Drive and all. I am using the UART-2 in STM32L4 controller to communicate between the GPS and controller. Here I have used the UART HAL Driver for communication, but i properly dont know that how i should pass argument i that HAL driver function for communication. 

So please share and guide for this UART Communication using HAL Driver in keil. And also share if their is any study material available for this.

 

I my code HALL function defined like this:

"HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);"

 

And i have pass the argument like this:

"HAL_UART_Transmit(&huart2 ,(uint8_t*)&buffer,20,1000); "

 

In buffer i have assigned the AT+QGPSCFG to send the AT command to communicate between the GPS and the Controller.  If their is any problem in code please let me know.

Please share me the proper details for this.

 

Thanks 

Sachin

Outcomes