Basic Flash LED doesn't work with Planet Debug

General discussion on IDE.
Post Reply
Author
Message
RowanMo
Posts: 5
Joined: 18 Jul 2022 18:05

Basic Flash LED doesn't work with Planet Debug

#1 Post by RowanMo » 19 Jul 2022 15:19

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();

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

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

#2 Post by frank.malik » 20 Jul 2022 15:53

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
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

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

#3 Post by filip » 21 Jul 2022 11:00

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.

RowanMo
Posts: 5
Joined: 18 Jul 2022 18:05

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

#4 Post by RowanMo » 21 Jul 2022 16:59

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.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

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

#5 Post by filip » 27 Jul 2022 14:03

Hi,

Have you correctly set the LED2 pin as output ?

Regards,
Filip.

RowanMo
Posts: 5
Joined: 18 Jul 2022 18:05

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

#6 Post by RowanMo » 27 Jul 2022 14:53

If you check my application init i have initialized both pins the exact same way.

Post Reply

Return to “IDE General”