2023-07-05 11:44 PM
Hello,
I am following tutorial and the file does not compile, what is wrong? https://www.youtube.com/watch?v=5i-Gw7OC7oo&list=PLnMKNibPkDnGtuIl5v0CvC81Am7SKpj02&index=48
/* USER CODE BEGIN PV */
uint8_t buffer_tx[10] = {10,11,12,13,14,15,16,17,18,19};
uint8_t buffer_rx[10];
/* USER CODE END PV */
/* USER CODE BEGIN 0 */
HAL_UART_Receive_IT(&huart1, buffer_rx, 10);
HAL_UART_Transmit_IT(&huart1, buffer_tx, 10);
/* USER CODE END 0 */
2023-07-06 12:06 AM
Hello. Insert these lines:
HAL_UART_Receive_IT(&huart1, buffer_rx, 10);
HAL_UART_Transmit_IT(&huart1, buffer_tx, 10);
Inside of some function (main for example). Now these are treated as function prototypes since they seems to be missplaced.
2023-07-06 12:27 AM
Hello @JZaya.1 ,
I advise you to take a look at this wiki: Getting started with UART
This article explains what is UART and how to use it through examples using NUCLEO-L476RG boards
This wiki can help you to set up UART and generate code with STM32CubeIDE and to use HAL functions.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.