Problem Interfacing SAM M8Q GPS Module with ATSAMD21 Controller

Hi Everyone,

I have designed a custom board containing UBLOX- SAM M8Q and ATSAMD21 Controller. I have been trying for days to interface the SAM M8Q with the controller without any luck. What is confusing is that I can get the data of GPS Module using echo code which I am also sharing. However, when I run a professional Library’s example code, I get no data at all.

The Echo code image along with received data is shared. I am using SERCOM1 Pins PA18 and PA19 of ATSAMD21 for connection with GPS Module’s via UART

PA18 → TX of GPS
PA19 → RX of GPS

I have tried following libraries

  1. Bolderflight UBLOX library.
  2. Sparkfun UBLOX exmple library
  3. Also tried sample code from this video (10Hz U-blox binary GPS data in 66 lines of code (arduino) - YouTube)

Please help me in resolving this issue. I would be really thankful.

  1. The Echo Code that I uploaded which gives output data from GPS
#include <Arduino.h>
#include "wiring_private.h"
#include "UBLOX.h"

Uart Serial2 (&sercom1, 12, 10, SERCOM_RX_PAD_3, UART_TX_PAD_2);

void SERCOM1_Handler()

UBLOX gps(Serial2,9600);

void setup() {

  pinPeripheral(10, PIO_SERCOM);
  pinPeripheral(12, PIO_SERCOM);



  Serial.println("Communication Started");


void loop() {
  if (Serial2.available()) {


  if (Serial.available()) {

  1. The output that I am getting on Serial Monitor using this code
Serial Monitor Output


Can you say if you get a fix? A few gps libraries are only do something in case of a fix. Could you upload your test code with the libraries? maybe there is a problem with the SERIAL2

Try to use this library:

Its very superior and even can decode ublox messages, i use it alot of times

Did you get it working? I did some work with this module recently.