SparkFun Forums 

Where electronics enthusiasts find answers.

Everything with the AmbiqSuite SDK tools and software are welcome here.
User avatar
By gpiota
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.uFuncSel`to `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`.

Nano Schematics: ... s-Nano.pdf
Thing Plus Schematics: ... ematic.pdf
User avatar
By gpiota
I think the bsp is just configured poorly. Wrote my own blink by setting and clearing the pin.
Code: Select all
#include "am_mcu_apollo.h"

#define LED_BUILTIN 19

int main(void) {

  am_hal_gpio_pinconfig(LED_BUILTIN, g_AM_HAL_GPIO_OUTPUT);

  bool ledOn = false;
    } else {
    ledOn = !ledOn;
User avatar
By turmerik
I had the same problem on the OLA (Open Logger Artemis). My setup:

Board: Artemis OLA
Arduino IDE: 1.8.16
Apollo3 core/library/package/whatever: 2.1.1

All I did was redefine LED_BUILTIN at the top of blink.ino like this:

#define LED_BUILTIN (19)

I got a redefinition warning at compile time, but the STAT LED blinks now!

Thanks @gpiota!
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]