AnsweredAssumed Answered

Question regarding execution speed and interrupts optimization

Question asked by karpavicius.linas on Aug 12, 2015
Latest reply on Aug 19, 2015 by karpavicius.linas
Hello
At the moment i am facing problem that my interrupt routine is too long for camera, and it fails to work.
Idea that HSYNC interrupt will should change DMA adress, and even with high degree of optimization/over clocking, it just take too long, and HSYNC rises before interrupt is complete.

Does any one know how to seed up my interrupt code ?
As example, i would like to use global variable that is kept inside RX register, so i will save few cycles. but i can't declare global as register, any workaround ?

I am also modifying functions, so it will not check if passed parameters are valid, and only works with that line, like DMA INIT, DMA deinit, and so on.

Is is H SYNC interrupt, i made it as simple GPIO interrupt instead of DCMI line interrupt, since is is 50ns faster to execute.

void DCMI_IRQHandler(void)
{
  if(DCMI_GetFlagStatus(DCMI_FLAG_LINERI) == SET)
  {
    GPIOB->BSRRL=2;
    //register uint32_t address ;
    //DMA_DeInit_DCMI_SHORT(DMA2_Stream1);
    //address = LINE*binning_addr;
    //DMA_InitStructure.DMA_Memory0BaseAddr =(uint32_t)((SRAM_BANK_ADDR+address));
    //DMA_Init_DCMI_SHORT(DMA2_Stream1, &DMA_InitStructure);
    //DMA2_Stream1->CR |= (uint32_t)DMA_SxCR_EN;
    LINE++;
    DCMI->ICR = DCMI_FLAG_LINERI;
    GPIOB->BSRRH=2;
  }
 
void EXTI4_IRQHandler(void)
{
 
  if ((EXTI->PR & EXTI_Line4) != (uint32_t)RESET)
  {
  //if(EXTI_GetITStatus(EXTI_Line4) != RESET)
  //{
    GPIOB->BSRRL=2;
    LINE++;
    DCMI->ICR = DCMI_FLAG_LINERI;
    GPIOB->BSRRH=2;
    //EXTI_ClearITPendingBit(EXTI_Line4);
    EXTI->PR = EXTI_Line4;
  }
}

This should work so much faster on STM32F7 that i soldered into same hardware, but is such a shame that i can't get even simple programs working.

Any one want to help me out with SPI running in circular mode, and DCMI that handles data transfer to SRAM ? i mean, it should be 10min job for any good programmer, but not for me, more than a month , and nothing, only basic functionality is copied from STM32F429 to STM32F746






Outcomes