stm32 h747 uart8 hal_uart_init wrong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-12 4:55 AM
If when i use hal_uart_init(&huart8) get result Details:HAL_ERROR Default:HAL_ERROR,Decimal:1,Hex:0x1,Binary:1,Octal:01.When i use step into ,reach at final while(sets-- !=0u)and no more what does this mean ? how could i solve this problem?
static void MX_USART8_UART_Init(void)
{
/* USER CODE BEGIN USART1_Init 0 */
/* USER CODE END USART1_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
/* USER CODE END USART1_Init 1 */
huart8.Instance = UART8;
huart8.Init.BaudRate = 115200;
huart8.Init.WordLength = UART_WORDLENGTH_8B;
huart8.Init.StopBits = UART_STOPBITS_1;
huart8.Init.Parity = UART_PARITY_NONE;
huart8.Init.Mode = UART_MODE_TX_RX;
huart8.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart8.Init.OverSampling = UART_OVERSAMPLING_16;
huart8.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart8.Init.ClockPrescaler = UART_PRESCALER_DIV1;
huart8.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart8) != HAL_OK)
{
Error_Handler();
}
- Labels:
-
STM32H7 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-12 6:48 AM
The GDB debugger is unable to step through SCB_EnableDCache and other SDB...Cache inline functions. This is a known issue, I don't know the exact reason. Just do not step into these functions, leave them alone.
This is not related to your UART problem. If in doubt, just do not enable the caches yet.
Are there other issues with your UART?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-12 7:11 AM
so what is the posible reason for hal_uart_init(&huart8) get HAL_ERROR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-08-12 7:22 AM
All the source is available, review the exit paths.
Up vote any posts that you find helpful, it shows what's working..
