Hello
I have the “SparkFun GPS-RTK Dead Reckoning ZED-F9R Kit” and also a “SparkFun IoT RedBoard - ESP32” (selected because has already an SD Card). The two are then connected through Qwiic connection.
First started using the GPS board with the U-Center and worked fine, also with some library example of the “SparkFun_u-blox_GNSS_Arduino_Library” with the Readboard-ESP32.
Also the example for the SD Card worked fine once adapted with the Redboard in Arduino IDE: log file are properly created.
I so wanted to increase the default measurement rate from 1 to 5/10/20 Hz. In U-Center it works once also the UART and internal register settings are adapted with an higher rate of the default. I so can create some proper log file.
Problem came once I went back to the coding with the Redboard-Arduino IDE: there I noticed that when the rate is not more just 1 Hz but higher then the buffer between GPS and Redboard started to get full until it crashes. with the i2c protocol set to 400’000 kbs it works only for little longer.
I so unterstood I need to work with the SPI which has much higher speed and should be enough.
So I tried to use and adapt the SPI code example for the GPS ZED-F9R (after soldering the SPI jumper). unfortunately also trying to use the second SPI (because the first is hardwired and used from the SD Card) I couldn’t never start a connection with the GPS.
https://docs.espressif.com/projects/esp … aster.html
I tried to implement the HSPI so defined
SPIClass hspi = SPIClass(HSPI); // HSPI: according to esp32-hal-spi.h HSPI is 2
#define HSPI_MISO 12
#define HSPI_MOSI 13
#define HSPI_SCLK 14
#define HSPI_SS 15
later in setup
...
//spiPort.begin();
hspi.begin(HSPI_SCLK, HSPI_MISO, HSPI_MOSI, HSPI_SS); //SCLK, MISO, MOSI, SS
pinMode(hspi.pinSS(), OUTPUT); //HSPI SS
...
while (!myGNSS.begin(hspi, GNSS_CS, 4000000, 20)) {
...
I set these pins because from the schematic the other SPI is only accessible in the JTAG pins and yet I have not solder or connect it.
I left the Qwiic for the supply (anyway the i2c should be disabled because I soldered the SPI jumper).
I searched between the hookup guide and forum but there isn’t much about the ZED-F9x and SPI, just this topic
viewtopic.php?f=116&t=56532&hilit=zed+f9+spi&start=15
but also if I tried to use the example codes suggested still never seen a reply from the GPS.
thought that maybe I do something wrong in using the ESP32 so wanted to test it on a simple Arduino Uno (just the SPI without logging) with his proper SPI default pins. but also there nothing and maybe isn’t the best way because also if I supply the GPS with the +3.3 V then the MISO output stil at TTL level… anyway tested the GPS in U-Center and still works fine.
So maybe can someone point me if I’m doing something wrong, is the Redboard ESP32 not the best board for this application?
Thank you in advance
Dan