cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to control HSYNC,VSYNC with different Peripherals other than EXTI?

AbbasR06
Associate

Hi,
I was able to get a frame(result attached below) from Nucleo-WB55RG by controlling HSYNC and VSYNC with the help of EXTI. However, I have faced some pixel loss(pixels from the white color) at the beginning of each HSYNC. I suspected that the issue is due to "void EXTI2_IRQHandler(void)"'s CPU execution time(~5.5us) and it seems to be unavoidable. Thus, I want to solve this without using "External Interrupt Mode". Can I solve this with “External Event Mode” or do I have fast and advantageous (hardware-wise) other peripherals that I solve this issue? Basically, I want to detect an edge signal and do manipulations through Status registers without intervening CPU.

My Interrupt code: (PD1 pin dedicated for Vsync, both rising/falling edge detection. Structure is similar for HSYNC as well))

void EXTI1_IRQHandler(void)

{

               if((__HAL_GPIO_EXTI_GET_FLAG(GPIO_PIN_1))&&(HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_1)==GPIO_PIN_SET))

                              {

                              HAL_NVIC_EnableIRQ(EXTI2_IRQn);

//                           vsyncCount++;

                              __HAL_GPIO_EXTI_CLEAR_FLAG(GPIO_PIN_1);

                              }

               else if((__HAL_GPIO_EXTI_GET_FLAG(GPIO_PIN_1))&&(HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_1)==GPIO_PIN_RESET))

                              {

                              HAL_NVIC_DisableIRQ(EXTI2_IRQn);

                              __HAL_GPIO_EXTI_CLEAR_FLAG(GPIO_PIN_1);

                              }

}

0 REPLIES 0