Page 1 of 1

Basic Flash LED doesn't work with Planet Debug

Posted: 19 Jul 2022 15:19
by RowanMo
I do not own a Mikroe Dev board, but I am trying to test them out for a potential project. When following the Basic Embedded Kit tutorial from YouTube, running the LED blink on Clicker 2 for STM (arbitrary choice of board), nothing seems to be happening. Here is my code :

Code: Select all

#include "board.h"
#include "drv_digital_out.h"

static digital_out_t led_pin1;
static digital_out_t led_pin2;

void application_init(){
    digital_out_init(&led_pin1, PE12);
    digital_out_init(&led_pin2, PE15);

}

void application_task(){
    digital_out_toggle(&led_pin1);
    Delay_ms(500);
    digital_out_toggle(&led_pin1);
    Delay_ms(500);

}

int main(void)
{
    /* Replace with your application code */
    application_init();
    while (1)
    {
        application_task();
    }

    return 0;
}
main();

Re: Basic Flash LED doesn't work with Planet Debug

Posted: 20 Jul 2022 15:53
by frank.malik
Hello Rowan,

tested your identical code on a Fusion for STM32.
LED on PE12 is blinking.

Sorry, I do not own a Clicker 2 for STM board, but the code seems to be ok.
Kind regards
Frank

PS: I'm using necto studio 2.0 and had to enable Board and GPIO out in the library manager

Re: Basic Flash LED doesn't work with Planet Debug

Posted: 21 Jul 2022 11:00
by filip
Hi,

I have tested your on Clicker 2 for STM32 - 6 board on Planet Debug and it works OK.

Are you sure that your configuration is OK ?

Regards,
Filip.

Re: Basic Flash LED doesn't work with Planet Debug

Posted: 21 Jul 2022 16:59
by RowanMo
frank.malik wrote:
20 Jul 2022 15:53


PS: I'm using necto studio 2.0 and had to enable Board and GPIO out in the library manager
this seems to have fixed the problem, I had enabled Board and Driver but not GPIO. I changed my application task to this

Code: Select all

void application_task(){
    digital_out_toggle(&led_pin1);
    digital_out_toggle(&led_pin2);
    Delay_ms(500);
    digital_out_toggle(&led_pin1);
    digital_out_toggle(&led_pin2);
    Delay_ms(500);

}
but only one pin is flashing.

Re: Basic Flash LED doesn't work with Planet Debug

Posted: 27 Jul 2022 14:03
by filip
Hi,

Have you correctly set the LED2 pin as output ?

Regards,
Filip.

Re: Basic Flash LED doesn't work with Planet Debug

Posted: 27 Jul 2022 14:53
by RowanMo
If you check my application init i have initialized both pins the exact same way.