cancel
Showing results for 
Search instead for 
Did you mean: 

trying to flash the STM32F030F4P6TR with the stlink v2 the official one. i can get the code to go onto the mcu but wen i try to debug with stm32cubeide it says this Error in executing 'cont' command ... Target is not responding, retrying...

Franksterb92
Associate III
1 ACCEPTED SOLUTION

Accepted Solutions
Franksterb92
Associate III

just answed my own question so to explain ill post the test code to toggle PA5.the problem is line 8 where im setting GPIOA->MODER to 0 i deleted that and line 5 and it works now i think that the problem is that line set GPIOA MODE to all 0s and the swd pins are on PA13 PA14 so it was messing the debug up

#include "stm32f030x6.h"
 
int main(void){
 
	RCC->AHBENR = 0x00;
	RCC->AHBENR |= (1U<<17);
 
	GPIOA->MODER = 0x00;
	GPIOA->MODER &= ~(1U<<11);
	GPIOA->MODER |= (1U<<10);
 
	while(1){
 
	GPIOA->ODR ^= (1U<<5);
	for(int i = 0; i < 200000; i++){}
	}
}

View solution in original post

1 REPLY 1
Franksterb92
Associate III

just answed my own question so to explain ill post the test code to toggle PA5.the problem is line 8 where im setting GPIOA->MODER to 0 i deleted that and line 5 and it works now i think that the problem is that line set GPIOA MODE to all 0s and the swd pins are on PA13 PA14 so it was messing the debug up

#include "stm32f030x6.h"
 
int main(void){
 
	RCC->AHBENR = 0x00;
	RCC->AHBENR |= (1U<<17);
 
	GPIOA->MODER = 0x00;
	GPIOA->MODER &= ~(1U<<11);
	GPIOA->MODER |= (1U<<10);
 
	while(1){
 
	GPIOA->ODR ^= (1U<<5);
	for(int i = 0; i < 200000; i++){}
	}
}