Question
stm32f0 nucleo , no receiving gps data
Posted on February 19, 2016 at 23:56
I really need help, This is my first time working with STM32 micro-controllers , I have a gps modulelocosys ls20031, at this point Im only trying to receive data from the gps and display on my terminal (realterm) but im no getting anything. Can anyone please help, I been working on it for days and still no able to receive data. If anyone can tell me what I'm doing wrong, please.
this is my code :void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
uint8_t in[50];
in[0] = '0';
char * nl = ''Just testing!\n\r'';
uint8_t inSize;
volatile HAL_StatusTypeDef status;
/* Infinite loop */
for(;;)
{
HAL_UART_Transmit(&huart2, (uint8_t *)nl, 6, 0x1000);
// Receive
for (inSize = 0; inSize < 7; inSize++)
{
status = HAL_UART_Receive(&huart1, &in[inSize], 1, 0x500);
if(in[inSize] == '\n') break;
}
// Send result to PC (opt)
HAL_UART_Transmit(&huart2, (uint8_t *)in, inSize-1, 0x1000);
osDelay(150);
}
}
#no-hablo-hal #gps #selective-cut-n-paste