2016-02-19 02:56 PM
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
2016-02-20 08:03 AM
Ok, assume we can't see how you have this wired up, or how you have configured the USART or the pins.
PA2/PA3 on most Nucleo's goes to the VCP, and you need to change the solder bridges for the D0/D1 Shield pins.2016-02-23 12:35 PM
Clive1 is right.
They say that every pin in a Nucleo board is accessible, so are the Moon or Mars. There are jumpers below the board, I rather go the Moon and back than find out which jumper is which. Have you checked that you really have connected your signals to the CPU?