Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

main.h / main.c - initializes and calls drivers

At this point, I recommend making sure your program can compile by running:

Code Block
$ make

in the “DAQStarterProjectMCU” directory.

Reading and writing to serial terminal:

Code Block
  /* USER CODE BEGIN WHILE */
  uint8_t msg[] = "Test 0x01 :: COMMS\n\r";
  while (1) {
    HAL_UART_Transmit(&huart1, (uint8_t *)msg, sizeof(msg), 100);
    /* USER CODE END WHILE */
  
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 

Make sure you have an appropriate program to read from devices, such as PuTTY (Windows) or Minicom (Linux). Bind the program to the appropriate port, maintaining the same baud rate and formatting you configured using the STM32Cube IDE.

Once you confirm this works, try modifying the code to send a different message!

setup stm

generate hal

dev firmware

...