cancel
Showing results for 
Search instead for 
Did you mean: 

Write multiple GPIO pins on the same port

Ofer Ebert
Associate
Posted on June 25, 2017 at 17:04

My code is written in C and I am using your HAL library I need to set/Reset 6 GPIO pins on the same port now I iam doing it by calling 6 times to HAL_GPIO_WritePin which take too much time how can I do it in one cpmmand since all pins are of the same port.

4 REPLIES 4
Posted on June 26, 2017 at 14:44

Look at using GPIOx->BSRR more directly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 26, 2017 at 14:53

https://community.st.com/0D50X00009XkXdlSAF

AvaTar
Lead
Posted on June 26, 2017 at 14:56

Or more generally, a study of the Reference Manual (GPIO section) won't hurt.

Posted on June 26, 2017 at 18:11

Millennial Kryptonite...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..