This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why STM32F407 descovery flashed software takes effect after replugging the cable

I am using Keil to flash the software to my stm32f407 discovery. But the software only starts working when i pullout the JLINK cable and plug it again. Why is that? Thanks.

Parents
  • Hello Andy, I have a really big problem with KEIL setting to run my BLINKING LED program for my STM32F407  which photo shown bellow.
    I have defined KEIL 5.0 with the following settings shown bellow

    My flashilng LOG  and the code i tried to flash is shown bellow.
    I get absolutly nothing on the board no blinking no even LED turning ON where did i go wrong?
    Thanks.

    Build started: Project: try1
    *** Using Compiler 'V6.15', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
    Build target 'Target 1'
    compiling bob.c...
    compiling system_stm32f4xx.c...
    linking...
    Program Size: Code=432 RO-data=408 RW-data=0 ZI-data=1632
    ".\Objects\try1.axf" - 0 Error(s), 0 Warning(s).
    Build Time Elapsed: 00:00:00
    Load "C:\\Keil_v5\\less01\\Objects\\try1.axf"
    Erase Done.
    Programming Done.
    Verify OK.
    Application running ...
    Flash Load finished at 13:30:06

    #include "stm32f407xx.h"
    
    int main()
    { 
    	 
    	
    	RCC->AHB1ENR|=(1uL<<3); //set thirdbit
    	//GPIOD->MODER&=~(1uL<<31);//reset 0 on 31 01 to gpio_moder 31,30 bits in register 
    	//GPIOD->MODER|=(1uL<<30);//set 1 on 30 output mode for pin 15 port D
    	GPIOD->MODER=0x55000000;
    	
    	
    	GPIOD->OTYPER=0; //all register is push pull
    	GPIOD->OSPEEDR=0;//speed low
    	 //GPIOD->ODR|=(1<<15); //Sets pin 15 
    
    
    	while(1)
    		
    	{
    		 GPIOD->BSRR=(1uL<<15);
    			for(uint32_t i=0;i<500000;i++){}
         GPIOD->BSRR=(1uL<<(15+16));		
    
    
    	}
    }
    












Reply
  • Hello Andy, I have a really big problem with KEIL setting to run my BLINKING LED program for my STM32F407  which photo shown bellow.
    I have defined KEIL 5.0 with the following settings shown bellow

    My flashilng LOG  and the code i tried to flash is shown bellow.
    I get absolutly nothing on the board no blinking no even LED turning ON where did i go wrong?
    Thanks.

    Build started: Project: try1
    *** Using Compiler 'V6.15', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
    Build target 'Target 1'
    compiling bob.c...
    compiling system_stm32f4xx.c...
    linking...
    Program Size: Code=432 RO-data=408 RW-data=0 ZI-data=1632
    ".\Objects\try1.axf" - 0 Error(s), 0 Warning(s).
    Build Time Elapsed: 00:00:00
    Load "C:\\Keil_v5\\less01\\Objects\\try1.axf"
    Erase Done.
    Programming Done.
    Verify OK.
    Application running ...
    Flash Load finished at 13:30:06

    #include "stm32f407xx.h"
    
    int main()
    { 
    	 
    	
    	RCC->AHB1ENR|=(1uL<<3); //set thirdbit
    	//GPIOD->MODER&=~(1uL<<31);//reset 0 on 31 01 to gpio_moder 31,30 bits in register 
    	//GPIOD->MODER|=(1uL<<30);//set 1 on 30 output mode for pin 15 port D
    	GPIOD->MODER=0x55000000;
    	
    	
    	GPIOD->OTYPER=0; //all register is push pull
    	GPIOD->OSPEEDR=0;//speed low
    	 //GPIOD->ODR|=(1<<15); //Sets pin 15 
    
    
    	while(1)
    		
    	{
    		 GPIOD->BSRR=(1uL<<15);
    			for(uint32_t i=0;i<500000;i++){}
         GPIOD->BSRR=(1uL<<(15+16));		
    
    
    	}
    }
    












Children