STM32F4 Hardware Flow Control
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-08-19 7:39 PM
Posted on August 20, 2014 at 04:39
I am communicating with an STM32F407 from a computer via Serial. I would like to implement flow control, but I have some questions.
1) Can I manually control the RTS line, so that I can receive a command from the PC and process it, then be ready to receive data, rather than get swamped by data2) How would I set/reset this pin?Cheers #discovery #flowcontrol #stm32f4
Labels:
- Labels:
-
STM32F4 Series
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-08-19 8:11 PM
Posted on August 20, 2014 at 05:11
Configure it as a GPIO pin (instead of Alternate Function), and drive it high/low as you would any other GPIO pin.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-08-19 8:26 PM
Posted on August 20, 2014 at 05:26
/* GPIOG Peripheral clock enable */
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE);
/* Configure PG6 in output pushpull mode */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; // Something appropriate
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOG, &GPIO_InitStructure);
GPIO_ResetBits(GPIOG, GPIO_Pin_6); // PG6 Low
GPIO_SetBits(GPIOG, GPIO_Pin_6); // PG6 High
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
