Hello!
I have recently assembled my custom STM32 board, and after a day of work, was finally able to program and debug it through JTAG.
However, my first program, that turns on 2 LEDs, isn't working.
I can trace the code running on the chip through gdb, so compiling/flashing/JTAG seem to not be the problem. The only problem is, the GPIO pin voltages aren't actually changing. The LEDs (on PB8 and PB9) don't light up, and I also verified with a scope (both are at DC 0V).
This is what I have -
#include "stm32/stm32f2xx.h"
void assert_failed(uint8_t* file, uint32_t line)
{
}
int main()
{
GPIO_InitTypeDef gpio_init;
GPIO_StructInit(&gpio_init);
gpio_init.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9;
gpio_init.GPIO_Mode = GPIO_Mode_OUT;
gpio_init.GPIO_OType = GPIO_OType_PP;
GPIO_Init(GPIOB, &gpio_init);
GPIO_SetBits(GPIOB, GPIO_Pin_8 | GPIO_Pin_9);
for(;;);
}
Can anyone see what I'm doing wrong?
Thanks!