Skip to main content
Visitor II
December 5, 2023
Question

writing to gpios on two different ports at the same time?

  • December 5, 2023
  • 1 reply
  • 624 views

Hi.

I'm testing gpios on many different ports at the same time.

I'm testing buttom code.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

__HAL_TIM_CLEAR_IT(&htim12, TIM_IT_CC1);
GPIOE->BSRR = Pattern_gen_D10[Pattern_cnt1];
GPIOD->BSRR = Pattern_gen_D11[Pattern_cnt1];
GPIOA->BSRR = Pattern_gen_D12[Pattern_cnt1];
GPIOI->BSRR = Pattern_gen_D13[Pattern_cnt1];
GPIOB->BSRR = Pattern_gen_D14[Pattern_cnt1];
GPIOH->BSRR = Pattern_gen_D15[Pattern_cnt1];
GPIOJ->BSRR = Pattern_gen_D16[Pattern_cnt1];
Pattern_cnt1++;
if(Pattern_cnt1 > Pattern_gen_Cnt_D1)
{
Pattern_cnt1 = 0;
HAL_TIM_OC_Stop_IT(&htim12, TIM_CHANNEL_1);
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

How could i control gpios at the same time?

 

Thank you.

    This topic has been closed for replies.

    1 reply

    Super User
    December 5, 2023

    You can't control them at the exact same time. There will always be a small but finite delay.