Samd21 Sparkfun Dev Board programing I2C bus

Hello Everyone,

I am new to SAMD21 based developement boards and I am trying to conect an MPU6050 and I2C FRAM from Adafruit. But I am confused about how to Program it because I understand that i need to run Serial1, but then I'm unable to troubleshoot thru serial monitor because this board don't debbuger IC. Dose anyone have any exampes or at least to be able to guide me into any examples or something similar that would get me on the right track. Because I was unable to find anything that would explain more accept the Adafruit tutorial.

This is the link to board that I'm using: SparkFun SAMD21 Dev Breakout - DEV-13672 - SparkFun Electronics

I2c on SAMD21

Hi thanks for reply
I saw this forum before but it didn't work for me I'm going to try to tamper with tomorrow, and this still doesnt explain how would I be able to debug the FRAM because I'm unable to see anything thru Serial Monitor. Because it is Usually stuck at Initializing.

Did you see the example on the website?

Here's a quick example demonstrating the differences between Serial Monitor and Serial1

SAMD21 Mini/Dev Breakout Hookup Guide - Example: Serial Ports

SAMD21 Mini/Dev Breakout Hookup Guide - Introduction

ldker:
I'm unable to troubleshoot thru serial monitor because this board don't debbuger IC.

Arduino users typically just add Serial.println() statements at strategic points in their sketch to get debug output.


If you want to do "ICE" debugging, the latest release of the Arduino Pro IDE has support for this. Unfortunately, debugging support hasn't been added to the SparkFun SAMD Boards platform yet. It is a pretty simple change to make:

You might be able to just use your SparkFun board with one of the Arduino SAMD Boards selected from the Arduino IDE's Tools > Board menu, but I don't have any experience with this board so I can't say for sure whether that will work.

You will need a debugger connected to the SWD port of your board. If you don't own a debugger, here's one that is reasonably priced and open source:

If you solder a 0.05" pitch 2x5 male header on your SparkFun SAMD21 board, the debugger will plug right in.

pert:
Arduino users typically just add Serial.println() statements at strategic points in their sketch to get debug output.


If you want to do "ICE" debugging, the latest release of the Arduino Pro IDE has support for this. Unfortunately, debugging support hasn't been added to the SparkFun SAMD Boards platform yet.

Thanks I will try I have two speare boards I can try to upload bootloader from arduino and then I will try to just run some stuff by just soldering directly on the pins.

It's pretty cool. I spent some time trying to get a cheap JTAGICE debugger clone working with my AVR boards and could never get it to work. The software seemed like it had been abandoned long ago and I couldn't tell whether the problem was with my hardware or the software.

So I was expecting at least a little bit of difficulty getting debugging working on the SAMD boards. Turned out it was simply a matter of plugging the debugger in and everything worked perfectly right away. It was even easier with my Arduino Zero, since it has a built-in EDBG debugger. So far, I am restricted to using the debugger with my MKR1000 because it has the 0.05" pitch SWD header. The other MKR boards have the footprint for a 0.1" pitch SMD header, so I need to solder up an adapter to make it easy to connect them. You're fortunate that SparkFun provided the footprint for the 0.05" pitch header on your boards (in addition to the SWD pins being broken out to 0.1" pitch headers too).