2023-03-16 11:29 AM
2023-03-17 09:00 PM
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++){}
}
}
2023-03-17 09:00 PM
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++){}
}
}