2019-10-30 03:43 AM
Hello,
i have problem for using STM32H743VI. start from the basic problem, that is transmit UART standard. i use latest firmware of STM32H7 version 1.5.0, latest update STM32CUBEIDE 1.1.0 and latest update STM32CUBEMX 5.3.
here the code:
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_UART8_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_UART_Transmit( &huart8, (uint8_t *)"test send data \n", sizeof("test send data \n"), 1000 );
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
the output is showed by image that i attach here. please any help?
Thankyou very much.
Solved! Go to Solution.
2019-10-30 05:47 AM
Thanks guys for the answer..
i got the problem. First, yes timing/clock problem. So, i switch manually from HSI to HSE for clock source. little bit tricky, but nice learn. Thank you.
2019-10-30 03:53 AM
Timing looks close.
Hows this all connected from STM32 to PC?
The STM32 doesn't output RS232 compatible voltages, needs MAX3232 or similar to do voltage conversion/inversion.
2019-10-30 03:59 AM
Thank you for the response.
i use IC ft232rl for converting UART to USB. and the USB plug into laptop and receive data with software (Realterm and Serial Monitor Arduino). i have done with this method for another STM32 IC like STM32F3 on another project. but, it stuck here for STM32H7.
2019-10-30 05:20 AM
I had uart trouble with an f7 after switching from hsi to hse oscillators. Turns out hal was not calculating the baud rate correctly, so i just wrote my own initialization routine with the correct baud rate hard coded. I don't trust hal.
2019-10-30 05:47 AM
Thanks guys for the answer..
i got the problem. First, yes timing/clock problem. So, i switch manually from HSI to HSE for clock source. little bit tricky, but nice learn. Thank you.