Getting Started with the Artemis Development Kit
Introduction
- Window 10 (or later) is required for almost all the additional software required for the ADK.
- Currently (7/7/20), there are no limitations for Mac OS due to their required OS updates.
- For Linux users, we have tested our instructions on Ubuntu 18.04.4 LTS desktop. Users may need to verify the software compatibility for their Linux distribution. In addition, users may need to adapt our instructions to their flavor of Linux.
The Artemis Development Kit and Artemis Development Kit (with Camera) are the latest development kit from our Artemis family of products. If you are looking to push the edge of your software development skills, the Artemis Development Kit is what you have been waiting for!
This guide will cover the general design of the development board and the installation of the recommended software used to program the Artemis DK. The primary development programs are the AmbiqSDK, Mbed™ OS, and the Arduino IDE. In addition, we have provided basic examples to verify the operation of the board. For more advanced functionalities, we have software development guides for each of the recommended software platforms that users can reference.
Users may need to watch the video on YouTube.
Note: We do NOT recommend novices begin with this board. There are a lot of details and fundamental knowledge involved with the use of this board. The content of this hardware guide alone can be daunting; not to mention, the three software development guides associated with this board, which can also be overwhelming for a first-time user.
Those who have become familiar with programming and electronic hardware will have an easier time developing with the Artemis DK as various components of this tutorial are geared towards the professional software developer.
Required Materials
To get started, users will need a few items. Now some users may have a few of these items, feel free to modify your cart accordingly.
- SparkFun Artemis Development Kit or SparkFun Artemis Development Kit (with Camera)
- USB 3.1 Cable A to C - 3 Foot - The USB interface serves two purposes: it powers the board and allows you to upload programs to it. (*If your computer doesn't provide a USB-A slot, then you will need to choose an appropriate cable or purchase an adapter as well.)
- Himax CMOS Imaging Camera - HM01B0 - The camera is optional, but is recommended for users interested in visual recognition applications. (* The camera is included in the SparkFun Artemis Development Kit (with Camera).)
- Computer with the an operating system (OS) that is compatible with all the software installation requirements.
Jumper Modification
If you would like to modify the jumpers, you will need soldering equipment and/or a hobby knife.
Programming Firmware
Users interested in modifying or updating the firmware on the NXP chip will need an Arm® Programmer and need to solder on a JTAG header. The same programmer and an additional header can also be used to program and debug the Atermis module. We recommend these programmers from our catalog:
Suggested Reading
As a more professionally oriented product, we will skip over the more fundamental tutorials (i.e. Ohm's Law and What is Electricity?). However, below are a few tutorials that may help users familiarize themselves with various aspects of the board.
Serial Communication
Serial Peripheral Interface (SPI)
Installing an Arduino Library
Artemis Development with the Arduino IDE
Artemis Development with Arduino
Using SparkFun Edge Board with Ambiq Apollo3 SDK
Designing with the SparkFun Artemis
Programming the SparkFun Edge with Arduino
Artemis Development on Arm® Mbed™ OS (Beta)
Getting Started with the micro:bit
Installing Arduino IDE
Installing Board Definitions in the Arduino IDE
One of the new, advanced features of the board is that it takes advantage of the Qwiic connect system. We recommend familiarizing yourself with the Logic Levels and I2C tutorials. Click on the banner above to learn more about Qwiic products.
Hardware Overview
Board Operation /Functionality
The functionality of this board can be broken up into 3 different systems: the USB interface, microcontroller (MCU), and the sensors and input/output (I/O) pins.
- MCU: The Artemis module serves as the brains of the board.
- All the pins on the Artemis module are utilized either by the sensors, camera connector, or I/O pins.
- Sensors and I/O Pins: There are two built-in sensors, with the option to add a camera, a Qwiic connector, and the breakout pins are relatively straight forward in their operation.
- The first sensor is the SPH0641LM4H-1 PDM microphone, that can be used for speach recognition.
- The second sensor is the LIS2DH12TR MEMS accelerometer, attached to the "Qwiic" I2C bus.
- The third psuedo-sensor is the camera connector, where an optional HM01B0 Himax camera can be attached.
- The I2C pin connections for the camera utilize the same bus as the "Qwiic" I2C bus.
- Any other Qwiic sensors attach to the same "Qwiic" I2C bus.
- The breakout pins all have their own dedicated connections to pads from the Artemis module. (i.e. The I/O pins do not share any connections to the sensors listed above.)
- USB Interface: The USB interface IC is the heart of the board's operation, which provides a link between the USB port and the Artemis module.
- Utilizing the provided DAPLink firmware, the IC enumerates as a composite device, with the following device classes:
- Mass Storage Device (MSD): Used to provide drag and drop programming.
- Human Interface Device (HID): Used for the debugging interface.
- Communication Port (COM): Used to provide a serial communication UART between the Artemis and the USB connection.
- Utilizing the provided DAPLink firmware, the IC enumerates as a composite device, with the following device classes:
Board Dimensions
The board dimensions are illustrated in the drawing below. The primary highlight in the layout are the breakout pins, which provide both a .1" pitch spacing for headers and a .08" pitch spacing for IC-hooks, used by most logic analyzers.
USB-C Connector
The USB connector is provided to power and program the board. For most users, it will be the primary programing interface for the Artemis module. A more detailed description of that functionality with the interface chip, is documented in the next section.
Interface Chip
Similar to the CH340, FTDI, or 32U4 chips on the SparkFun RedBoard or Arduino Uno; the MKL26Z128VFM4 Arm® Cortex®-M0+ MCU, from NXP, operates as an interface chip to the Artemis module. (*More advanced developers may recognize this DAPlink and the USB interface from the micro:bit.)
The MKL26Z128VFM4 microcontroller is connected to the software debug (SWD), reset, and UART pins of the Artemis module. To operate as an interface chip, it utilizes firmware from Arm® Mbed™ OS called Arm Mbed DAPLink
(link), which a bootloader is pre-programmed through the intfc
JTAG pins (see details in the Firmware section below). The firmware enables the board to enumerate as a composite USB device, when connected to a computer; this allows the interface chip to serve multiple functions:
- As a mass storage device (MSD), the interface chip provides drag and drop programming of a target MCU (i.e. the Aretemis module) and a USB bootloader for updating the firmware of the interface chip, itself.
- As a communications device class (CDC), the interface chip enumerates as a virtual com port and operates as a pass-through for serial communication between the target MCU to a PC.
- As a WEBUSB human interface device (HID), the interface chip functions as a bridge to the debug access port of the target MCU (the Aretemis module) and provides a CMSIS-DAP compliant debug channel.
Do I need to install any drivers?
If your computer is running Windows 10, Mac OSX or Linux and using DAPLink firmware version 0240 or later then drivers are not needed. If your computer is running Windows 7 (only), you will need to install the serial port driver. The board running DAPLink must be connected to your computer to install this driver.
Further instructions and details on installing the serial port driver can be found in the Mbed™ OS documentation. (*As the Mbed™ OS documentation is continually updated, so are the links. Therefore, users may find it useful to look under the Tutorials > Serial Communication section of the (updated) Mbed™ OS documentation for the serial port driver information.)
Firmware: Arm® Mbed™ DAPLink
DAPLink, previously known as CMSIS-DAP, is a standardized protocol for interfacing with an Arm® microcontroller's debug access port (DAP). It was developed as part of the Arm® Mbed™ OS and is maintained as an open source project. The DAPLink firmware runs on a secondary (interface) MCU that is attached to the (SWD or JTAG) debug port of the (target) Arm® MCU. On the Artemis DK, the MKL26Z128VFM4 inteface IC is the secondary MCU and the Artemis module is the target MCU, to be programmed or debugged.
Debug probe to the target MCU through its SWD port. (Photo courtesy of Arm® Mbed™.)
When a computer is connected to the USB interface, the DAPLink firmware enumerates the secondary MCU as a composite USB device; and implements a debug probe through the SWD or JTAG connection to the target MCU. As a result, the secondary MCU serves as bridge between the USB interface and the target MCU. Depending on the type of USB debug probe that is accessed, the following functions are all available to developers:
-
USB Drag and Drop Programming
DAPLink debug probes appear on the host computer as a USB disk. Program files in binary (.bin) and hex (.hex) formats can be copied onto the USB disk, which then programs them into the memory of the target system.- USB Mass Storage Device class (MSD)
- Drag and drop programming of the target chip (i.e. the Aretemis Module).
- USB bootloader for updating the interface firmware itself.
- Drag and drop programming of flash memory to update firmware.
- USB Mass Storage Device class (MSD)
-
USB Serial Port
The DAPLink debug probe also provides a USB serial port, which can be bridged through to a TTL UART on the target system. The USB serial port will appear on a Windows machine as aCOM
port, or on a Linux machine as a/dev/tty
interface.- USB Communications Device Class (CDC)
- For Serial Communication with the target chip.
- Virtual COM port for log, trace and terminal emulation.
- Serial passthrough from the target MCU to the PC. This is how messages get from the code you write onto the PC.
- USB Communications Device Class (CDC)
-
USB HID Debug Channel
The HID endpoint creates a tunnel to the target MCU's debug access port. This enables all the leading industry standard toolchains to program and debug the target system. Arm® Mbed™ has also developed pyOCD, an open-source, python based on-chip debugger and gdb-server that runs on Windows, Mac OSX and Linux.- USB Human Interface Device class (HID)
- WEBUSB HID - CMSIS-DAP compliant debug channel.
- This is useful if you want to use advanced debuggers like GDB or Keil to understand what’s happening (or not happening!) on the target MCU.
- Supported tools include:
- Keil MDK
- pyOCD
- USB Human Interface Device class (HID)
For more information on DAPLink, check out the documentation from Mbed™ OS:
- Debugging Methods for Arm® Mbed™ OS Applications
- DAPLink FAQ Page
- GitHub Repository
- DAPLink User's Guide
Users may also find these articles on the debug access port, informative:
Additional Resources: Since the DAPLink firmware operates similarly on the Micro:Bit, here are additional resources users can also reference.
Programming the Interface Chip
On the Artemis DK, the MKL26Z128VFM4 inteface IC is the secondary MCU and the Artemis module is the target MCU. Instructions for programming the MKL26Z128VFM4 microcontroller with the DAPLink firmware to operate as an interface chip, can be found in the SparkFun_Apollo3_AmbiqSuite_BSPs repository and the associated files are located in the artemis_dk/intfc directory. It is important to understand that the DAPLink consists of two functional parts, the underlying DAPLink bootloader and the DAPLink application interface firmware.
-
The DAPLink bootloader must first be initially flashed on a secondary (interface) MCU through its JTAG (or SWD) pins with a debug programmer. The bootloader configures the pin connections of the secondary MCU that allow it to interact with a target MCU (through the SWD connection of the target MCU) and enumerate as a storage device.
-
During production, the bootloader for the MKL26Z128VFM4 MCU is programmed through the
INTFC
JTAG pins with a SEGGER J-Link (offset 0x00000000). This is also the only method to update or modify the bootloader.
Interface IC for the Artemis Development Kit and its JTAG pins. (Click to enlarge) -
To program the interface MCU, users will need one of the
kl26z_bl*.*
bootloader files from the artemis_dk/intfc directory of the SparkFun_Apollo3_AmbiqSuite_BSPs repository. Any of the.hex
or.bin
files (with or without aCRC
) can be used. -
Once programmed, the bootloader will enumerate board as a mass storage device, labeled
MAINTENANCE
when connected to a computer. The board will continue to appear theMAINTENANCE
storage device, while the secondary interface firmware hasn't been programmed.
The Artemis DK enumerating as a USB drive, namedMAINTENANCE
. (Click to enlarge) -
When the board enumerates as the
MAINTENANCE
storage device, it is referred to as maintenance mode or bootloader mode.
-
-
Once the bootloader is programmed, the DAPLink interface firmware can be programmed on the interface MCU. The DAPLink interface firmware contains programming algorithms, specific for the target MCU. This works in conjunction with the underlying bootloader and allows the interface MCU to operate as a debug probe and access the target MCU, through its SWD (or JTAG) pins.
-
During production, the interface firmware, to target the Artemis module, is programmed on the MKL26Z128VFM4 MCU through the USB connection. On a computer, the interface firmware file is copied to the
MAINTENANCE
storage device.
The Artemis DK enumerating as a USB drive, namedMAINTENANCE
. (Click to enlarge) -
The MKL26Z128VFM4 MCU can also be programmed through the
INTFC
JTAG pins with a SEGGER J-Link. This method still requires the bootloader to be previously flashed and an offset must be used to avoid overwriting the bootloader.
Interface IC for the Artemis Development Kit and its JTAG pins. (Click to enlarge) -
To program the interface MCU, users will need one of the
kl26z_artemis_dk_if*.*
interface firmware files from the artemis_dk/intfc directory of the SparkFun_Apollo3_AmbiqSuite_BSPs repository. Any of the.hex
or.bin
files can be used. -
Once a secondary interface firmware is successfully programmed, the board will no longer appear as the
MAINTENANCE
storage device. The drive will instead be labeledARTEMIS
and will allow users to drag-and-drop compiled.bin
or.hex
files to program the Artemis module. -
When the board enumerates as the
ARTEMIS
storage device, it is referred to as interface mode.
-
During production, the interface firmware, to target the Artemis module, is programmed on the MKL26Z128VFM4 MCU through the USB connection. On a computer, the interface firmware file is copied to the
Status LEDs
Attached to the interface chip are three indicator LEDs. These LEDs will flash according to the device class the Artemis DK enumerates as.
COM
, HID
, and MSD
status LED indicators. (Click to enlarge) Maintenance Mode
Also known as bootloader mode, this mode accesses the bootloader and is used to update the interface firmware on the MKL26Z128VFM4, without using the JTAG pins. To enter maintenance mode, users need to hold down the RESET
button, while plugging in the Artemis development kit into the computer. The board will enumerate as a mass storage device named MAINTENANCE
.
MAINTENANCE
. (Click to enlarge) Interface Mode
The interface mode is used to program the target MCU, the Artemis module. In this mode, the board will enumerate as a mass storage device, labeled ARTEMIS
. Users can then drag and drop .bin or .hex files, which are written to the flash of the Artemis module.
ARTEMIS
. (Click to enlarge) Virtual File System
The file system presented within the storage drive is virtual and not stored in flash memory, as it would on a USB flash disk. When a file is dropped onto the storage drive, the DAPLink firmware streams the data through the debug probe to program the target MCU; which is why the drive ejects itself after new files are written. Below are the virtual files for the Artemis DK:
DETAILS.TXT
: This file contains diagnostic information and details on the version of DAPLink installed on the interface chip.ARTEMIS.HTML
: This is a link to SparkFun's Artemis module webpage, to help users get started.FAIL.TXT
: This file may appear, after a flashing error occurs; it will contain details on the cause of failure. Users can reference error.c file from the DAPLink repository to help diagnose the errors.
Why DAPLink? The reason for using this programming interface method was to provide full support for the Arduino BLE library, on the Artemis module.
Specifically, Mbed™ was needed to implement the Bluetooth functionality; and although DAPLink wasn't required for Mbed™, it was required to verify the pull request of our implementation of the Bluetooth functionality into Mbed™ OS. For more information about the reason Mbed™ was required to implement the Bluetooth functionality in the Arduino IDE, check out this article from Arduino, "Why we chose to build the Arduino Nano 33 BLE core on Mbed OS."
Reset Button
This button serves two functions: to reset the program running on the Artemis module and to enter into maintenance mode, for updating the firmware on the interface MCU.
Maintenance Mode
As mentioned earlier, maintenance mode is used to update the firmware on the MKL26Z128VFM4, without using the JTAG pins. To enter maintenance mode, users need to hold down the RESET
button, while plugging in the Artemis development kit into the computer. The board will enumerate as a mass storage device named MAINTENANCE
. Users can then drag and drop in the updated firmware .hex file.
MAINTENANCE
mode. (Click to enlarge) Power
The Artemis Development Kit only requires 3.3V to power the board. However, the simplest method to power the board is with the USB-C connector. The power header consists of voltage supply pins, which are traditionally used as power sources for other peripheral hardware (like LEDs, potentiometers, and other circuits).
- 1.8V - A regulated 1.8V voltage source.
- Regulated from the 3.3V power.
- Used to power the camera connector.
- 3.3V - A regulated 3.3V voltage source.
- Regulated from the USB 5V power.
- Used to power the interface chip, Artemis module, Qwiic I2C bus (including the accelerometer and camera connector), and PDM microphone.
- USB - The input voltage from the USB-C connector, usually 5V.
- GND - The common ground or the 0V reference for the voltage supplies.
Power Status LED
The POWER
LED will light up once 3.3V is supplied to the board; however, for most users, it will light up when 5V is supplied through the USB connection.
POWER
status LED indicator. (Click to enlarge) Artemis Module
The Artemis module is the primary microcontoller on the Artemis Development Kit.
For details on the Artemis module, users should refer to the Designing with the SparkFun Artemis hookup guide. Additionally, users can reference the following resources for more technical information:
Designing with the SparkFun Artemis
June 20, 2019
Hardware Information:
- Artemis Integration Guide (PDF)
- Ambiq MCU Product Page
- Apollo3 DataSheet (PDF)
- Pin Function Map (PDF)
- Artemis GitHub Repository
Development Platforms:
Note: While most users will utilize the interface chip for drag-and-drop programming, the Artemis module can also be programmed through its JTAG or SWD pins. This might is useful for individuals developing and testing firmware that would be flashed directly onto the Artemis module, such as in production for commercial applications. For more details on programming, please check out our ARM Programming tutorial
Prior to programming the Artemis module, users will want to cut the TGT SWD CLK
and TGT BOOT
jumpers to isolate the Artemis module from the interface chip. Please feel free to reference our jumper modification tutorial for more instructions.
TGT SWD CLK
and TGT BOOT
jumpers on the Artemis Development Kit. (Click to enlarge)
Breakout Pin Connections
The pins from the Artemis module are broken out into logical connections and available power connections are also broken out.
Note: The layout of the PTH connections for the breakout pins include both a .1" pitch spacing for headers and a .08" pitch spacing for IC-hooks, used by most logic analyzers.
Connecting IC hooks to the Artemis Development Kit. (Click to enlarge)
Power Connections
The power header and pins aren't really I/O (Input/Output) connections for the microcontroller; however, they are pertinent to the board. (*For details on the pin connections to the peripherals, check out the next section.)
The power I/O mostly consists of voltage supply pins. These pins are traditionally used as power sources for other pieces of hardware (like LEDs, potentiometers, and other circuits).
- 1.8V - A regulated 1.8V voltage source.
- 3.3V - A regulated 3.3V voltage source.
- USB - The input voltage from the USB-C connector, usually 5V.
- GND - The common ground or the 0V reference for the voltage supplies.
I/O Pins
There are 24 I/O pins broken out on this board, which can be used as digital inputs to or outputs from the Artemis module.
All of the Artemis Development Kit pins are broken out to 0.1" spaced female headers (i.e. connectors). There are also two rows of breakout pins with .1" pitch spacing for headers; and a .08" pitch spacing to clip on IC-hooks, used by most logic analyzers. It is best practice to define the pinMode()
(link) in the setup of each sketch (programs written in the Arduino IDE) for the pins used.
Input
When configured properly, an input pin will be looking for a HIGH or LOW state. Input pins are High Impedance and takes very little current to move the input pin from one state to another.
Output
When configured as an output the pin will be at a HIGH or LOW voltage. Output pins are Low Impedance: This means that they can provide a relatively substantial amount of current to other circuits.
Additional Functions
There are several pins that have special functionality in addition to general digital I/O. These pins and their additional functions are listed in the tabs below. For more technical specifications on the I/O pins, you can refer to the Apollo 3 datasheet and Artemis Integration Guide.
Analog Input Pins
The Artemis module offers a 14-bit ADC input for eight of the breakout I/O pins. This functionality is accessed in the Arduino IDE using the analogRead(pin)
function. (*There is also a quick reference table for the available pin functionalities, labeled on the back of the board.)
Note: Be aware that the ADC input range is from 0 - 2V. Although connecting a sensor with an output to 3.3V is safe for the Artemis module, it will saturate the ADC at 2V.
analogRead()
returns a 10-bit value. To change the resolution of the value returned by the analogRead()
function, use the analogReadResolution(bits)
function.
Note: To learn more about analog vs. digital signals, check out this great tutorial.
Analog vs. Digital
July 18, 2013
Pulse Width Modulation (PWM) Output Pins
The Artemis module provides 16-bit PWM output for eighteen of the breakout I/O pins. This is accessed in the Arduino IDE using the analogWrite(pin, value)
function or the Servo library. (*There is also a quick reference table for the available pin functionalities, labeled on the back of the board.)
Note: By default, in the Arduino IDE, analogWrite()
accepts an 8-bit value. To change the resolution of the PWM signal for the analogWrite()
function, use the analogWriteResolution(bits)
function.
(*The PWM output is the result of the Artemis module's signal generator clock functionality and is not a true analog signal.)
Serial Communication Pins
The Artemis module provides one dedicated UART port and two UART modules that can all function independently of each other. All of the breakout I/O pins, except pins 24
, 32
, 33
, support this functionality. By default, the dedicated UART port to the USB connection is accessed through the Arduino IDE using the serial communication module. (*There is also a quick reference table for the available pin functionalities, labeled on the back of the board.)
TGT_RX
and TGT_TX
pins on UART0
, to the USB connection. In order to utilize the serial communication on the breakout pins, users will need to create a custom serial port object and declare which pins to access.The breakout pins listed in the tables below can be utilized to create additional UART modules (UART0
and UART1
). The available breakout pins are listed for each serial communication channel (TX and RX). For additional details on implementing the additional UART modules, please refer to the software guides (linked in the next section).
-
Only one of the available breakout pins can be selected for each communication channel; users cannot utilize multiple pins for a single communication channel. (i.e. The TX channel for
UART0
can't operate on pins16
and39
simultaneously.) -
Likewise, some pins are available on both UART modules and therefore, can only operate with a single UART module at a time. (i.e. Pin
39
can only operate as th TX channel forUART0
orUART1
; not both simultaneously.)
Note: To learn more about serial communication, check out this great tutorial.
Serial Communication
December 18, 2012
SPI Communication
The Artemis module provides five I/O Master modules (IOM0
to IOM4
); all of which, can function independently of each other as SPI or I2C bus.
IOM0
is dedicated to the camera interface.IOM1
is utilized by the Qwiic connector, accelerometer, and the I2C interface of the camera.IOM4
is the default SPI bus that is accessed through the Arduino IDE using the SPI module.
The breakout pins listed in the table below can be utilized to create SPI ports for each of the available IOM modules. By default, in the Arduino IDE, the SPI module is configured to utilize IOM4
(pins 39
, 40
, and 44
). In order to utilize the other IOM modules as SPI ports, users will need to create a custom SPI object and declare which pins to access. For additional details on implementing SPI modules, please refer to the software guides (linked in the next section). (*There is also a quick reference table for the available pin functionalities, labeled on the back of the board.)
MOSI
signal on a controller has been replaced with the title SDO
. Please refer to this announcement on the decision to deprecate the MOSI/MISO terminology and transition to the SDO/SDI naming convention.
IOM2 | IOM3 | IOM4 | |
---|---|---|---|
SCK | 27 |
42 |
39 |
SDI or CIPO | 25 |
43 |
40 |
SDO or COPI | 28 |
38 |
44 |
CS | ANY |
ANY |
ANY |
Note: To learn more about the serial peripheral interface (SPI) protocol, check out this great tutorial.
Serial Peripheral Interface (SPI)
January 14, 2013
I2C Communication Pins
The Artemis module provides five I/O Master modules (IOM0
to IOM4
); all of which, can function independently of each other as SPI or I2C bus.
IOM0
is dedicated to the camera interface.IOM1
is utilized by the Qwiic connector, accelerometer, and the I2C interface of the camera. It is the default I2C bus that is accessed through the Arduino IDE using the Wire module.IOM4
is a peripheral IO master module.
The breakout pins listed in the table below can be utilized to create I2C ports for each of the available IOM modules. By default, in the Arduino IDE, the I2C module is configured to utilize IOM1
with the Qwiic connector. In order to utilize the other IOM modules as I2C ports, users will need to create a custom I2C object and declare which pins to access. For additional details on implementing I2C modules, please refer to the software guides (linked in the next section). (*There is also a quick reference table for the available pin functionalities, labeled on the back of the board.)
IOM1 | IOM2 | IOM3 | IOM4 | |
---|---|---|---|---|
SCL | Qwiic Connector | 27 |
42 |
39 |
SDA | Qwiic Connector | 25 |
43 |
40 |
Note: To learn more about the inter-integrated circuit (I2C) protocol, check out this great tutorial.
I2C
July 8, 2013
Pin Connections for Peripheral Devices
The following peripherals have dedicated pin connections.
STAT LED
The STAT
LED is typically used as a test LED to make sure that a board is working or for basic debugging. This indicator is connected to pin 23
, which can also be referenced as D23
or LED1
in the Arduino IDE (*use LED1
in Mbed™ OS).
STAT
LED indicator for the Artemis Development Kit. (Click to enlarge) Camera Connector
There is a 24-pin (FPC) camera connector intended for a Himax (HM01B0) camera, which can be used for visual recognition applications. Technical specifications for the camera can be found in the datasheet. The pin connections for the camera connector are detailed in the table below. (*Make sure to attach the camera in the correct orientation, as shown below.)
Camera connector on the Artemis Development Kit. (Click to enlarge)
Camera attached to the Artemis Development Kit. (Click to enlarge)
Pin Number
(Camera Connector) |
Connection Name |
Pad Number
(Artemis Module) |
---|---|---|
4 |
AVDD |
3.3V |
10 |
IOVDD |
1.8V |
2 |
GND |
GND |
6 |
FVLD
VSYNC
|
D15 |
16 |
LVLD
HSYNC
|
D17 |
8 |
MCLK |
D18 |
17 |
PCLK |
D19 |
7 |
TRIG |
D14 |
18 |
INT |
D10 |
21 |
SCL |
D8 |
22 |
SDA |
D9 |
14 |
D0 |
D0 |
3 |
D1 |
D1 |
9 |
D2 |
D2 |
5 |
D3 |
D3 |
12 |
D4 |
D4 |
20 |
D5 |
D5 |
19 |
D6 |
D6 |
13 |
D7 |
D7 |
PDM Mic
There is a SPH0641LM4H-1 PDM microphone, which can be used for voice recognition applications. Technical specifications for the microphone can be found in the datasheet. The pin connections for the microphone are detailed in the table below.
Connection | CLK |
DATA |
---|---|---|
Pad Number
(Artemis Module) |
AD12 |
AD11 |
Note: In the Arduino IDE, a library is not required for users to utilize the PDM microphone. Additionally, there are exanples built-in with the installation of the board definitions. Users can access a list of examples from the File > Examples > PDM (under Examples for the Artemis Dev Kit) drop down menu.
Note: Currently, with the latest revision to the Arduino core, the examples will not compile due problems with the math
library. For more details, users can track the issue in the GitHub repository.
Primary I2C Bus
An accelerometer and a Qwiic connector are attached to the primary I2C bus. The primary I2C bus for this board utilizes the pin connections, detailed in the table below:
Connection | VDD |
GND |
SCL |
SDA |
---|---|---|---|---|
Pad Number
(Artemis Module) |
3.3V | GND | D8 |
D9 |
Accelerometer
There is an LIS2DH12 3-axis accelerometer, which can be used for gesture recognition. Technical specifications for the accelerometer can be found in the datasheet.
Note: In the Arduino IDE, users can utilize the SparkFun LIS2DH12 Arduino Library. Also, the orientation of the sensor's axes is labeled on the back of the board.
Silk marking the orientation of the accelerometer's axes, in reference to the Artemis Development Kit. (Click to enlarge)
Qwiic Connector
A Qwiic connector is provided for users to seamlessly integrate with SparkFun's Qwiic Ecosystem.
What is Qwiic?
The Qwiic system is intended a quick, hassle-free cabling/connector system for I2C devices. Qwiic is actually a play on words between "quick" and I2C or "iic".
Features of the Qwiic System
Keep your soldering iron at bay.
Cables plug easily between boards making quick work of setting up a new prototype. We currently offer three different lengths of Qwiic cables as well as a breadboard friendly cable to connect any Qwiic enabled board to anything else. Initially you may need to solder headers onto the shield to connect your platform to the Qwiic system but once that’s done it’s plug and go!
Qwiic cables connected to Spectral Sensor Breakout
Minimize your mistakes.
How many times have you swapped the SDA and SCL wires on your breadboard hoping the sensor will start working? The Qwiic connector is polarized so you know you’ll have it wired correctly, every time, from the start.
The PCB connector is part number SM04B-SRSS (Datasheet) or equivalent. The mating connector used on cables is part number SHR04V-S-B or equivalent. This is a common and low cost connector.
1mm pitch, 4-pin JST connector
Expand with ease.
It’s time to leverage the power of the I2C bus! Most Qwiic boards will have two or more connectors on them allowing multiple devices to be connected.
Software Overview
Drivers
As mentioned in the hardware section, a driver is not required for any of the recommended operating systems (Mac OSX, Linux, Windows 10). However, there is a serial port driver available for Windows 7 (only), which is provided by Mbed™. We will not be providing support for Windows 7; a forum is available from Mbed™, for users that run into issues with their driver.
Integrated Development Environments (IDEs)
The Artemis DK was designed to be utilized with three primary development environments. The Apollo3 MCU in the Artemis module is now fully supported in the Arduino IDE, including it's BLE functionality. In order to implement compatibility with the Arduino's built-in BLE library, we needed to
Artemis Development with the Arduino IDE
September 10, 2020
Artemis Development on Arm® Mbed™ OS (Beta)
September 10, 2020
Using SparkFun Edge Board with Ambiq Apollo3 SDK
March 28, 2019
Installation Requirements
Depending on the application (i.e. development environment) users want to work with, there may be additional software required. Below, is a list of additional software that we recommend installing for each development environment:
- Arduino IDE
- Install Arduino IDE
- Install the SparkFun Apollo3 Boards Board Definitions
- Install the ArduinoBLE Arduino Library
- Install the SparkFun LIS2DH12 Arduino Library
- Install Arduino IDE
- Ambiq SDK
- Python 3 (required for install)
- GCC Arm® Toolchain (version: 8-2018-q4-major)
- (compiling source code)
- Make (building projects)
Bash (Windows Only)
Although a Bash isn't required, it is a user friendly interface to pull GitHub repositories and navigate through a file system. For those that are unfamiliar, Bash is a Unix Shell (i.e. a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems).
On most Mac and Linux computers, the Terminal program uses bash by default; otherwise, if you are accessing the shell, it is bash. For Windows computers, users will need to install a Bash shell emulator that has access to your file system.
We highly recommend Git Bash. For more information, please check out the following resources to get started with installing and utilizing Git Bash.
bash
, users will need to add it to the operating system's file path.Make
Make is an automated build tool - you give it information about source locations and dependencies and it will automatically call a sequence of commands to compile or re-compile your project based only on the changed files. This can speed up compilation significantly in large projects. Make is a time-tested tool.
make
, users will need to add it to the operating system's file path.Python 3
Users will need to install Python 3 to utilize the pyOCD
debugging package; as well as, to install Mbed™ OS and AmbiqSDK development environments. For more information, please check out the following resources from the Python Software Foundation to get started with installing and utilizing Python 3.
Python Package Installer
pip3
is the package installer for Python 3. It should be natively installed with Python 3. For more information Python Package Installer, check out the online documentation.
GNU Arm® Embedded Toolchain
The GNU Arm® Embedded Toolchain is an open-source suite of tools for C, C++ and assembly programming. Designed to program target Arm® Cortex®-A, Arm® Cortex®-M, and Arm® Cortex®-R processors, the toolchain includes the GNU Compiler (GCC) and and other tools necessary for bare-metal software development. The GNU Arm® Embedded Toolchain is provided by Arm® for embedded software development on Windows, Linux, and Mac OS X operating systems.
gcc
, users will need to add it to the operating system's file path.Arduino IDE
Most users will be familiar with the Arduino IDE and it's use. As a point of reference for professional developers who aren't aware, the Arduino IDE is an open-source development environment, written in Java, that makes it easy to write code and upload it to a supported board. For more details, feel free to check out the Arduino website.
To get started with the Arduino IDE, check out the following tutorials:
Installing an Arduino Library
What is an Arduino?
Installing Arduino IDE
Installing Board Definitions in the Arduino IDE
Software Dependencies
- Install the SparkFun Apollo3 Boards Board Definitions in the Arduino IDE
Installing Board Definitions in the Arduino IDE
September 9, 2020
Note: Users will need to install the board definitions for our development boards with an Artemis module.
For more instructions, users can follow this tutorial on Installing Additional Cores provided by Arduino. Users will also the .json
file for the SparkFun Ambiq Apollo3 Arduino Core:
https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json
- Install the associated Arduino libraries for the board's features:
- The ArduinoBLE Arduino Library
- The SparkFun LIS2DH12 Arduino Library
Installing an Arduino Library
January 11, 2013
AmbiqSuite SDK
The Ambiq Suite SDK is a collection of software enablement for the Apollo, Apollo2, Apollo2-Blue, and Apollo3-Blue MCUs. The SDK includes a hardware abstraction layer (HAL), device drivers, and example applications to speed the understanding of the operation of the MCUs. Third party software including Arm®’s Cordio BLE Host stack and FreeRTOS v10.1.1 and v9.0 are distributed along with debugging tools and other support. This is the most ‘raw’ option - you can write C or C++ code that runs pretty close to ‘bare metal’ in a ‘professional’ software development kit.
For more information on the Apollo3 MCU and the AmbiqSDK, check out the resources below:
- Apollo MCU Product Page
- Apollo 3 Blue Product Page (used in Artemis module)
- Ambiq Documentation
- AmbiqSuite SDK Getting Started Guide (v1.1 June 2017)
- AmbiqSDK maintained by SparkFun
Software Dependencies
- Python (uploading code to board)
- Make (building projects)
- GCC Arm® Toolchain (compiling source code)
- Git (sort of - you could just download a ZIP from github)
Programming the Board
The programming process for the Artemis DK is straight forward. Once users build or compile a binary file for their code with the Artemis DK as the target, the file can be dragged-and-dropped (or copied) into the ARTEMIS
mass storage drive on the computer.
Hardware Assembly
USB Programming
Most users will utilize the USB connection for the drag-and-drop programming interface, serial communication, and debugging. Users only need to plug their Artemis DK into a computer using a USB-C cable.
ARTEMIS
, in the displayed window. (Click to enlarge) Camera
Attaching the Himax camera should be straight forward. However, steps and pictures are provided below as a reference for users. (*It should be noted that the proper technique for closing the camera connector, should be with two hands and with each finger on either side of the snap-in tab. Unfortunately, the process proved difficult to get a clean shot of and we had to improvise, as shown.)
- To attach the camera, carefully pop open the snap-in tab on the camera connector.
- Seat the camera's ribbon cable, fully into the camera connector, with the lens pointing towards the bottom of thet board.
- Close the snap-in tab from the sides, with both fingers.
Qwiic Devices
The Qwiic system allows users to effortlessly prototype with a Qwiic compatible I2C device without soldering. Users can attach any Qwiic compatible sensor or board, with just a Qwiic cable. (*The example below, is for demonstration purposes and is not pertinent to the board functionality or this tutorial.)
Arduino Examples
Blink
With full Arduino support, users will be able to implement the built-in examples of the Arduino IDE on the Artemis DK. To begin, let's start with the most basic example: Blink.
- From the drop down file menu, pull up the Blink sketch:
- Since users will need the compiled binary code in order to program the Artemis DK, save this example somewhere that is easily accessible; the desktop is a good option. (*Remember to use Save As, so that you retain the original example within the Arduino IDE.)
- Next, you will want to select the Artemis Dev Kit board from the tools drop down menu: Tools > Board: > Artemis Dev Kit
- Finally, you will need to acquire the compiled binary code using the sketch drop down menu: Sketch > Export compiled Binary (Ctrl + Alt + S)
- Now, the compiled binary will be located in the same location that the example was saved, from the previous step.
- All that is left is to drag and drop (or copy) the compiled binary file into the mass storage device for the Artemis DK. The interface chip will take care of the rest.
- The storage drive will automatically eject once the programming is complete. To verify that the board is working and that the programming was successful, users should see the
STAT
LED blinking in a ~1 sec. interval.
STAT
LED blinking. (Click to enlarge) Hello World
In this example, users will create their own sketch, compile and export the binary file, program the Artemis DK, and view the serial communication in a terminal emulator. (*Most of the steps below are illustrated the procedure of the previous example.)
- Open a new sketch in the Arduino IDE from the drop down file menu: File > New.
Copy the example code below into the sketch:
language:c // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { // print out "Hello World" Serial.println("Hello World"); delay(500); }
Save the sketch (File > Save As...) using the file drop down menu.
- Select the then, export the compiled binary code (Sketch > Export compiled Binary) using the sketch drop down menu.
- Drag and drop (or copy) the binary
.bin
file into theARTEMIS
mass storage drive. The storage drive will automatically eject once the programming is complete. - To verify that the board is working and that the programming was successful, open a terminal emulator, such as TeraTerm or the Serial Monitor in the Arduino IDE. Connect to the serial port for the Artemis DK; don't forget to set the baud rate to 9600 bps.
Bluetooth: LED
Note: Users will need to download the NRF Connect app onto their phone. We highly recommend utilizing an Android phone as we have had difficulties with device connections in the app for Apple phones.
As in the prior examples, these steps will follow a similar procedure.
- From the drop down file menu, open the LED sketch: File > Examples > ArduinoBLE > Peripheral > LED.
- Save the sketch (File > Save As...) using the file drop down menu.
- Select the then, export the compiled binary code (Sketch > Export compiled Binary) using the sketch drop down menu.
- Drag and drop (or copy) the binary
.bin
file into theARTEMIS
mass storage drive. The storage drive will automatically eject once the programming is complete. - To verify that the board is working and that the programming was successful, open a terminal emulator, such as TeraTerm or the Serial Monitor in the Arduino IDE. Connect to the serial port for the Artemis DK; don't forget to set the baud rate to 9600 bps.
- Click the reset button to begin the program. Users should see a
BLE LED Peripheral
message in the terminal emulator. - Follow the steps and video below to control the
STAT
LED on the Artemis DK.- Unlock the phone and enable the Bluetooth.
- Open the NRF app.
- Click on the Scan button on the upper right corner.
- In the results, locate the device labeled
LED
. Click on the CONNECT button to the right of the device name.- In the terminal emulator, users should see a
Connected to central:
message followed by the mac address of the phone.
- In the terminal emulator, users should see a
- Once connected, locate the
Unknown Service
. It will have the following service UUID:19B10000-E8F2-537E-4F6C-D104768A1214
. - Click on the service. Then, locate and click on the upload button (up arrow).
- A dialog box will open. We want to write a value, so locate the
New Value
text field, under the Write value drop-down menu option. Based on the control inputs to the LED, anLED on
orLED off
message will appear in the terminal emulator.- Enter
01
to turn the LED on. Then click the SEND button. - Enter
00
to turn the LED off. Then click the SEND button.
- Enter
More Advanced Examples and Features
For more advanced examples and features of the Artemis DK with the Arduino IDE, check out the Arduino IDE software development tutorial. We also just released a blog post on streaming data over Bluetooth to a computer.
Artemis Development with Arduino
June 20, 2019
Additionally, since the Arduino core for the Artemis module is built upon the Mbed™ OS, the API can also be utilized within the Arduino IDE. For more information, check out the Mbed™ software development tutorial.
Artemis Development on Arm® Mbed™ OS (Beta)
September 10, 2020
Troubleshooting
Below, we have also included some additional troubleshooting tips for issues that you may come across with the Artemis Development Kit.
- One of our employees compiled a great list of troubleshooting tips based on the most common customer issues. This is the perfect place to start.
- For any Arduino IDE specific issues, we recommend starting with their troubleshooting guide.
If neither of the troubleshooting guides above were able to help, here are some tips you might have missed. (Most of this material is summarized from the tutorial.):
Are You Using a Recommended Computer OS?
This board is not compatible with the Arduino Web IDE. We do NOT recommend using a Chromebook, Netbook, tablet, phone, or the Arduino Web IDE in general. If you are here, try a RECOMMENDED operating system (refer to the notice in the Introduction).My Board Isn't Working:
Every Artemis DK gets tested before getting packaged up. That being said, let's try a basic test to see if just the board is working. Disconnect everything that you have attached to the board; we just want to test the board.- Inspect the board:
Check the board to make sure everything looks about right. Use the pictures on the product page to verify component placement or alignment, and bad solder joints, or damage. - Power and check the status LEDs:
Using a known good USB-C cable, plug your board in to the computer. Do any of the status LEDs turn on (see Hardware Overview)?- New boards, out of the bag, will come programmed with a test sketch that blinks that status LED at a rate of approximately 2 blinks per second.
- Test a Blink sketch:
Try to program the blink sketch. Why blink? It is simple, known to work (from the example files), and you have an indicator LED.- Double check that you have the proper Board selected prior to exporting the compiled binary.
- For boards that are already running the blink example, I recommend changing the timing parameters to check for a change in the board's response.
I Don't See My Board on a Serial/COM Port:
If you don't see your board as an available COM port on the Arduino IDE:- Try to re-open the Arduino IDE.
- Check the Device Manager to verify that your computer recognizes the board.
- The issue might be related to your USB cable. Check that you are using a USB cable capable of data transfers. Some cables only have the power pins connected for charging. A good way to test this is to plug in a device to your USB cable (like a phone). If it doesn't show up as a device or drive, then try a new USB-C cable.
- This rarely happens, but it is easy to check. If you are using a USB 3.0 port (you will see a blue "tongue" in the USB jack or bad USB port, try a different USB port. You can also try to test the board on a different computer to double check for a hardware incompatibility (usually with expansion boards).
Additional Tips:
- If an input pin is read and that is floating (with nothing connected to it), you may see random data/states. In practice, it is useful to tie an input pin to a known state with a pull-up resistor (to VCC), or a pull-down resistor (to GND).
- The maximum current an I/O pin can source (provide positive current) or sink (provide negative current) is 50 mA (milliamps). You can power small sections of LED strips or small motors, but will run into issue with high power devices.
- The pins on the Artemis DK use 3.3V logic and aren't directly compatible with 5V devices.
Resources and Going Further
For more on the Artemis Development Kit, check out the links below:
- Schematic (PDF)
- Eagle Files (ZIP)
- Board Dimensions (PDF)
- Software Guides:
- Artemis Development with the Arduino IDE
- Artemis Development with Arm® Mbed™ OS (Beta)
- Artemis Development with Arm® Mbed™ OS (Pending release)
- Artemis Development with the AmbiqSDK
- Hardware Component Information:
- Artemis Module:
- Apollo3 Datasheet (PDF)
- Apollo3 Pad Mapping (PDF)
- Artemis Integration Guide (PDF)
- Ambiq Home Page
- Interface Chip:
- Himax Camera (HM01B0) Datasheet (PDF)
- PDM Microphone (SPH0641LM4H-1) Datasheet (PDF)
- Accelerometer (LIS2DH12) Datasheet (PDF)
- SparkFun Qwiic Connect System
- Artemis Module:
- GitHub Hardware Repository
- GitHub Repository for Apollo3 Board Support Packages (BSP)
- Development Platforms for Artemis Module:
- SparkFun Ambiq Apollo3 Arduino Core
.json
file needed for the SparkFun Ambiq Apollo3 Arduino Core:
https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json
- Mbed™ OS (Ported)
- AmbiqSDK (Ported)
- pyOCD (Ported)
- SparkFun Ambiq Apollo3 Arduino Core
- SFE Product Showcase
- Product Live Stream with Mbed™
Need some inspiration for your next project? Check out some of these related tutorials:
SparkFun Tutorials
Installing an Arduino Library
What is an Arduino?
Installing Arduino IDE
Installing Board Definitions in the Arduino IDE
Arduino Tutorials
Arduino Board Comparison Guides
Choosing an Arduino for Your Project
Standard Arduino Comparison Guide
RedBoard vs. Uno
Click the buttons above for tutorials relating to the board functionality based on topic difficulty.
Beginner
Serial Communication
Analog to Digital Conversion
Analog vs. Digital
Data Types in Arduino
How to Work with Jumper Pads and PCB Traces
Artemis Development with Arduino
Intermediate
Serial Peripheral Interface (SPI)
Processor Interrupts with Arduino
Advanced
Integrated Circuits
Reading and Writing Serial EEPROMs
Designing with the SparkFun Artemis
Software Development Guides
Using SparkFun Edge Board with Ambiq Apollo3 SDK
Artemis Development with Arduino
Artemis Development with the Arduino IDE
Artemis Development on Arm® Mbed™ OS (Beta)
Example Projects
Programming the SparkFun Edge with Arduino
Or check out this blog post for ideas.