[stm32f4] uartStart on UARTD2 causes crash
Posted: Wed Jan 21, 2015 2:40 am
I've been using Chibios for several years on the STM32F4x7 devices and it's been working great.
I'm about to implement a ModBus handler over RS-485 and I want to use the UART device driver on USART2.
However, the call to initialise the driver always causes the program to crash. The config is below.
If I enable the the serial driver on SD2, it works great. I've checked there are no DMA conflicts, and expanded the stack sizes beyond any reasonable limit.
Any ideas?
Craig
I'm about to implement a ModBus handler over RS-485 and I want to use the UART device driver on USART2.
However, the call to initialise the driver always causes the program to crash. The config is below.
If I enable the the serial driver on SD2, it works great. I've checked there are no DMA conflicts, and expanded the stack sizes beyond any reasonable limit.
Any ideas?
Craig
Code: Select all
UARTConfig config = {
&Modbus_TxEnd1, // uartcb_t txend1_cb; // End of transmission buffer callback.
&Modbus_TxEnd2, // uartcb_t txend2_cb; // Physical end of transmission callback.
&Modbus_RxEnd, // uartcb_t rxend_cb; // Receive buffer filled callback.
&Modbus_RxOOB, // uartccb_t rxchar_cb; // Character received while out if the @p UART_RECEIVE state.
&Modbus_RxTO, // uartecb_t rxerr_cb; // Receive error callback.
9600,
0,
USART_CR2_STOP1_BITS | USART_CR2_LINEN,
0
};