HI.
I'm trying my new EV-board MCBSTM32E from Keil.
I have copied the STM32_Init.c and .h file from the Blinky demo project to one project and added STM32F10xR.LIB and my one main.c.
#include <stm32f10x_lib.h> // #include "STM32_Init.h" // int main (void) { stm32_Init();// STM32 setup GPIOB->ODR = (GPIOB->ODR & 0xFFFF00FF) | (1 << 8); while(1); }
I can debug the code but the led won't go on. I don't think that's has something to do with the GPIO but more a overall Init problem.
I know that it can be a lot of thing, but I think it's something simple I have missed
Thanks. Soren
I meant to say, of course: I don't know your processor - I can only guess that you have not enabled the clock to the GPIO units or that they are held in reset.
If I look in the peripherals - General Purpose I/O debug window I can see that the I/O pin is toggling, but nothing is happening on my board.
The Pin is configured as a GP output push-pull and with clock enabled.
Any ideas..
thanks.
When I download my code to the flash, no led starts flashing, but if I power cycle my board the led starts flashing. ?!?!
you are saying that after power up your program is working? then all you need to do is reset the board after download (using the checkbox available at "flash download setup" dialog of uVision).
It's a bit like installing software on your PC: after you install the software, you have to Run it before it will actually do anything.
Similarly, on an embedded system, "downloading" simply loads your code into the target hardware - a reset or similar is usually needed to actually start Running the newly-loaded code.
uVision has an option to automatically reset & run the code after a download...
YES!!!!!!!
Thanks alot...