STM32CubeMX unable to transmit over UART6/RS232
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-12-07 5:01 PM
HI,
I have a STM32F07G-Disc1 board attached to a Embest BB board which provides an RS232 Interface. I started the STM32CubeMX, and activated the USART6 in Asynchronous mode and Generated the Default code.
The following is my main function. I am trying
to transmit a single character, in addition to blinking an LED. The Led Blinks just fine, but when i listen to the RS232 on a PC using putty @ baud 115200 (also configured in STM32CubeMx), i dont see any characters coming through.
int main(void){/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();/* Configure the system clock */
SystemClock_Config();/* Initialize all configured peripherals */
MX_GPIO_Init(); MX_I2C1_Init(); MX_USART6_UART_Init();unsigned char ch = 'c';
/* Infinite loop */
while (1) { BlinkLedOnce(RED_LED); HAL_UART_Transmit(&huart6, &ch, 1, 0xFFFF);}
}
#usart-rs232 #usart6- Labels:
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-12-08 7:18 AM
This is all very top level code providing no insight into how the pins, clocks and USART are actually configured, you should review the detail.
Up vote any posts that you find helpful, it shows what's working..
