REDBOARD ARTEMIS NANO BLINKY DOESN'T BLINK?

I’m trying to run the blinky example provided with the sparkfun bsps. The code uploads successfully with either bootloader, but nothing blinks. As a note, I am able to run the UART example successfully.

Looking at the code it shows am_bsp_pins.c to have

  • am_bsp_pins.h sets AM_BSP_GPIO_LED_BLUE to 37

  • am_bsp_pins.c sets g_AM_BSP_GPIO_LED_BLUE.uFuncSelto AM_HAL_PIN_37_GPIO

Looking at the Nano schematics we see pad 19 maps to GPIO 19 which is assigned to LED and printed next to the LED. This makes me think 37 is incorrect the above values should be 19 and AM_HAL_PIN_19_GPIO respectively but this does not work either.

It seems the Thing Plus is set up this way (assuming it can run blinky…). Looking its schematics we see pas 26 maps to GPIO 18 which is assigned to the LED and also printed on the PCB next to the LED. In its respective files it has AM_BSP_GPIO_LED_BLUE set to 26 and g_AM_BSP_GPIO_LED_BLUE.uFuncSel set to AM_HAL_PIN_26_GPIO.

Hi. Thanks for the report.

I can’t seem to replicate your issue.

I am using v1.1.1 of the Arduino core, running in Arduino 1.8.12

All the latest source code suggests that the pin for LED_BUILTIN / LED_BLUE is correctly configured to be pin 19:

Can you please provide more details about your issue? For example what version of the core you are using. It would also be helpful if you could share some links / photos that demonstrate where you found usage of pin ‘37’ for the RedBoard Artemis Nano.

I was able to run the ‘Examples->Basics->Blink’ sketch on the RBA Nano successfully.

In the ‘blinky’ example found in the ‘boards_sfe’ repository the pin configuration uses g_AM_HAL_GPIO_OUTPUT:

am_hal_gpio_pinconfig(ui32GPIONumber, g_AM_HAL_GPIO_OUTPUT);

This global variable is defined in ‘am_hal_gpio.c’ as:

const am_hal_gpio_pincfg_t g_AM_HAL_GPIO_OUTPUT =
{
    .uFuncSel       = 3,
    .eDriveStrength = AM_HAL_GPIO_PIN_DRIVESTRENGTH_2MA,
    .eGPOutcfg      = AM_HAL_GPIO_PIN_OUTCFG_PUSHPULL
};

Why is the call to ‘am_hal_gpio_pinconfig()’ not using ‘g_AM_BSP_GPIO_LED_BLUE’ from the ‘am_bsp_pins.c’ (for the right board)? For the artemis_thing_plus ‘g_AM_BSP_GPIO_LED_BLUE’ is defined as:

const am_hal_gpio_pincfg_t g_AM_BSP_GPIO_LED_BLUE =
{
    .uFuncSel            = AM_HAL_PIN_26_GPIO,
    .eDriveStrength      = AM_HAL_GPIO_PIN_DRIVESTRENGTH_12MA
};

I tried this and it doesn’t work.

  • 'AM_HAL_PIN_26_GPIO' is defined with a value of (3) which is the same value used in ' g_AM_HAL_GPIO_OUTPUT' for 'uFuncSel'.
  • - The drive strengths are different. Why? 12MA seems wrong in the BSP version.
  • - And eGPOutcfg isn't defined at all.
  • Is this correct or an error with the BSP definition? It seems like I should be able to use ‘g_AM_BSP_GPIO_LED_BLUE’ on the Artemis Thing Plus?