AnsweredAssumed Answered

stm32f405 strange behavior

Question asked by Angelo Dureghello on Apr 3, 2014
Latest reply on Apr 3, 2014 by Clive One
Dear,
i am proceeding over a development of a quiet simple application (23K of code now), increasing complexity, everything was working fine, but from some recent code improvements and builds, i started to have the application behavior corrupted.

I am driving am SSD1289 lcd / touch, and driving also some gpio.
Increasing the code size, LCD started to be non responsive to the graphic commands, so i commented out the great part of the code, and let only a small code working.

If i just init the gpio, and make a relay click on and off each second, it works.

/**
  * @brief  This function handles SysTick Handler.
  * @param  None
  * @retval None
  */
void SysTick_Handler(void)
{
        delay_decrement();
 
        prescaler--;
        if(prescaler == 0)
        {
                prescaler = 200;
        }
}
void delay_decrement(void)
{
        if (time_preload != 0x00) time_preload--;
}

void delay_ms(volatile uint32_t t)
{
        time_preload = t;

        while(time_preload != 0);
}

void run ()
{
 for(;;)
        {
               
                gpio_relay_on_off(i);
                i=!i;
 
                delay_ms(1000);
        }
}


But, if i start to enable the FSMC controller, with the line:


        RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);

Then i hear the relay clicking on or off each 4 seconds.

Very strange. Could i have some hardware issue ?

Many thanks
Angelo









Outcomes