• Welcome to Andy's Workshop Forums. Please login or sign up.
 
April 25, 2024, 11:38:32 am

News:

SMF - Just Installed!


STM32F103ZET6 - Blink

Started by PC-maniak, May 12, 2016, 10:29:39 am

Previous topic - Next topic

PC-maniak

May 12, 2016, 10:29:39 am Last Edit: May 12, 2016, 10:32:38 am by PC-maniak
Hi I bought a better Dev board and I have a strange problem and I can not figure out later how to solve it

ADC single sample works as intended

but classic blink LEDs not working .. LED will only light on and remains so not blinking

LED is PG15 here is modified code:
class Blink {

  public:

    void run() {

      // initialise the pin for output

      GpioG<DefaultDigitalOutputFeature<15> > pg;

      // loop forever switching it on and off with a 1 second
      // delay in between each cycle

      for(;;) {

        pg[15].set();
        MillisecondTimer::delay(5000);

        pg[15].reset();
        MillisecondTimer::delay(5000);
      }
    }
};


/*
* Main entry point
*/

int main() {

  // set up SysTick at 1ms resolution
  MillisecondTimer::initialise();

  Blink blink;
  blink.run();

  // not reached
  return 0;
}



board was very cheap 10-12 usd (I can not remember I try to find the link)
on ebay I no longer find it on aliexpress but here is a bit more expensive :
http://www.aliexpress.com/item/1pcs-STM32F103ZET6-Minimum-System-Development-Board-ARM-STM32-Cortex-m3/32337203632.html?ws_ab_test=searchweb201556_7,searchweb201602_4_10037_10017_10021_507_10022_10032_10020_10018_10019,searchweb201603_1&btsid=838ffb73-7c59-468e-8385-20b974990a15

PC-maniak

May 13, 2016, 11:12:50 am #1 Last Edit: May 13, 2016, 11:50:25 am by PC-maniak
aha! even though I have set to build on F1HD .. so in subdir.mk file, it will use the startup F407

But the question now how to fix subdir.mk? the file is automatically generated .. even though it will override the same with the next build will restore the

EDIT:

ok here has deleted the project and re-imported .. Now I use proper startup file

but the problem persists .. LED flashes only when I use F5 to debug cycles