allanvv
Advanced Member level 4
- Joined
- Oct 23, 2010
- Messages
- 108
- Helped
- 14
- Reputation
- 28
- Reaction score
- 12
- Trophy points
- 1,298
- Location
- USA
- Activity points
- 2,078
I made a board with an STM32F103C8T6. I can successfully use the UART to program and verify the on-board flash memory with the built-in bootloader. But then when I reset and I boot into flash, nothing works.
My code just turns on/off a GPIO that I'm monitoring with a scope. I've verified that the external clock is operating properly (8MHz).
It seems by default that it uses the internal oscillator, so I tried to set it to use the external oscillator by uncommenting "#define SYSCLK_FREQ_HSE HSE_Value" but still nothing happens on reset.
Here's my code:
edit: This is with an arm gcc 4.5.2. I've used this toolchain successfully on an STR7 board in the past. I've also tried with CodeSourcery's toolchain but still no results.
My code just turns on/off a GPIO that I'm monitoring with a scope. I've verified that the external clock is operating properly (8MHz).
It seems by default that it uses the internal oscillator, so I tried to set it to use the external oscillator by uncommenting "#define SYSCLK_FREQ_HSE HSE_Value" but still nothing happens on reset.
Here's my code:
Code:
int main(void) {
SystemInit();
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_WriteBit(GPIOA, GPIO_Pin_15, 1);
while (1) {
GPIO_WriteBit(GPIOA, GPIO_Pin_15, 1);
GPIO_WriteBit(GPIOA, GPIO_Pin_15, 0);
}
}
edit: This is with an arm gcc 4.5.2. I've used this toolchain successfully on an STR7 board in the past. I've also tried with CodeSourcery's toolchain but still no results.
Last edited: