Hi all!
I'm facing a problem with my UART on a STM32F207IG under CMSIS.
When I try to initialize the UART the processor disappears in the HardFault_Handler.
I think the problem is somehow related to the clock settings which I left untouched until now.
Does anyone have had the same problem in the past?
Every idea is very welcome
The UART section looks like this:
ARM_DRIVER_UART UART1; ARM_UART_STATUS uart_status; uart_status = UART1.Initialize(NULL, 0); //<-- HardFault_Error!! uart_status = UART1.PowerControl(ARM_POWER_FULL); uart_status = UART1.Configure(9600, 8, ARM_UART_PARITY_NONE, ARM_UART_STOP_BITS_1, ARM_UART_FLOW_CONTROL_NONE);
Thank you in advance
Benjamin
The most likely issue is that the clock control for the UART hasn't been enabled.
I haven't try this chip, but some other STM32 which has a unit called RCC (Reset and Clock Control).
You need to enable some clocks to the peripherals before you use them.
You can also ask the question on STM32 forum:
https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32
Hope this help.