SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By dykesc
I just received a Redboard Artemis Nano and need to understand the following before I proceed.

For the Redboard Artemis NANO:

Do all GPIO pins both source and sink current?
What are the individual pin source and sink current limits?
What is the maximum total of all pins current limit (both source and sink)?

Thanks for any replies.
By paulvha
The information you are looking for is in the Apollo3 datasheet : ... 0_15_0.pdf, chapter 22.23.

Chapter 11 provides a detailed description of the GPIO pin setting. The Sparkfun library is setting the GPIO pins for 12mA output.

There are pads that can be set as power switch. They can do up to 100mA (source) or 100mA (Sink), but these are not connected / not used on an Artemis Nano.
User avatar
By dykesc
Thanks Paul.

Having read your reply, it sounds like I need to steer clear of any hardware configurations or code that would attempt to sink current to an Apollo pad. I'll use the 12mA individual pad source current limit you provided. The datasheet is very detailed. Most of it well beyond my knowledge level at this point, but an excellent reference nonetheless.

On another topic, I'm trying to run the Apollo I2C example code but I'm getting a "no pinmap for peripheral" error at runtime when I define the Nano pins associated with I2C SDA and SCL. Is this error stating that the Nano isn't supported, at least from this approach to I2C functionality? If so, is there another way to go about it?

Again thanks for your help.
By paulvha
hmm.. can you share the sketch or point out the example you use. i have just compiled the I2C example and did not get that error on my Nano
User avatar
By dykesc
Here is the I2C example code as I am attempting to run it. Note the #define comment. The code compiles fine, but when it runs I get the following runtime error.

++ MbedOS Error Info ++
Error Status: 0x80010130 Code: 304 Module: 1
Error Message: pinmap not found for peripheral
Location: 0x218CB
Error Value: 0x11

#include "Wire.h"

void testPortI2C(TwoWire &i2c);

// This thread will create its own MbedI2C object using IOM pins
// Define your own pins below to try it
#define mySDA 17 This line and the next line were commented out in the example. I deleted // and added
my SDA and SCL pin numbers from underside of Nano below QWIIC connect.

#define mySCL 18
#if (defined mySDA) && (defined mySCL)
TwoWire myWire(mySDA, mySCL);

void testPortI2C(TwoWire &i2c){
Serial.printf("Scanning... (port: 0x%08X), time (ms): %d\n", (uint32_t)&i2c, millis());
uint8_t detected = 0;
for(uint8_t addr = 1; addr < 127; addr++ ){
// use endTransmission to determine if a device is present at address
uint8_t retval = i2c.endTransmission();

if(retval == 0){
Serial.printf("\t0x%02X detected\n", addr);
Serial.printf("\tNo device detected!\n");

void setup() {
Serial.println("Apollo3 - I2C");


#if (defined mySDA) && (defined mySCL)

void loop() {
#if (defined mySDA) && (defined mySCL)

digitalWrite(LED_BUILTIN, LOW);
digitalWrite(LED_BUILTIN, HIGH);
By paulvha
The Apollo3 processor has six I2C/SPI high-speed Master Modules (IOM).
On an Nano :
IOM0 is used for SPI communication (pins 11, 12,13),
IOM2 is used for I2C/Wire/QWIIC
IOM3 is used for I2C1/ Wire1 (pin 6 and 7).

You could still assign IOM1, IOM4 and IOM5. However the output of each IOM can only be assigned to certain pads. A pad is a connection to the processor and a pin is a connection on the side of the board. In the case of Nano, not all pads are connected to a pin. Thus you can not use IOM1 (pads are not connected) and not use IOM5 (the UART is connected there). In case of a Nano you can only use IOM4, but you have to define the correct pads / pins. You can NOT use 17 and 18.
Code: Select all
Either set : 
#define mySDA D10  // use pin definition
#define mySCL D9
#define mySDA 40  // use pad definition
#define mySCL 39
User avatar
By dykesc
Thanks Paul. That did it! No errors and the code detected an INA219 current sensing unit I have running on the I2C bus! I was mistakenly trying to define my SDA and SCL in terms of Nano pins. Understand now that definitions need to be in terms of available Apollo pins or pads that the Nano has connections with.
Many thanks for helping me out on Thanksgiving. Mighty nice of you.
By paulvha
From other post( ... 74#p237274)
Could this explain why, after defining my SDA and SCL as D10/D9 in the Apollo 3 I2C example, my INA219 sensor is detected when it is wired to Nano pins 6/7?
No, on a Artemis nano there are 2 wires predefined in the library :
Wire for qwiic
Wire1 on pin 6 /7

There is actually no need to define another one unless you want to use it.

In the sketch you used it is testing Wire, Wire1 and (if defined) your own wire. I bet the INA219 was detected on Wire1.
 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