Problem running adaptor board example code


I’m trying to write some text to a sdcard with the Navspark adaptor board. With my Navspark GPS I tried to run this example code:

Compiling and uploading works fine, but when I run it nothing is written to the sdcard.

After some quick debugging I’ve noticed the code crashes when it tries to make a folder on the sdcard:

  • FRESULT res = fatFsAgent.make_dir(folderName);

I’ve connected al the pins of the adaptor board directly to the Navspark.

Does somebody have an idea what goes wrong?

You need to be a member of NavSpark Community to add comments!

Join NavSpark Community

Email me when people reply –


  • Hi Edwin, 

       The underlying SPI interface access method for NavSpark is different from standard Arduino, thus likely the Arduio SD-Card library cannot directly be used even if pins are mapped.

       NavSpark GPIO[31:28] are connected to the SD card as seen in the Adapter Board schematic:

       The NavSpark SD-Card library is modified from this,, if it helps.

  • The SD_Card_Access_Example is quite complicated and not easily adaptable for my modest purposes. If i want to use the standard SD card library for arduino (, what pins do i use? Standard in the SD library pins 4 and 11 to 13 are used, SD card attached to SPI bus as follows:

    • MOSI - standard pin 11 (slave out, master in), seems to match GPIO30 on Navspark
    • MISO - standard pin 12 (master in, slave out), seems to match GPIO31
    • CLK - standard pin 13 (clock), seems to match 29
    • CS - standardpin 4 (select), seems to match 22 or is it 28?

    Is this right?

  • You're welcome.  No problem, here is a picture on how I connected the adapter board with NavSpark.

  • Hi Kuo Hsu,

    Thank you for your response. I’ve already tried to reformat my sd card. I’ve tried different sd cards with FAT and FAT32 formatting. Same result every time. Could you show me how you connected the adaptor board to the Navspark? I think I might be a connection/hardware problem.

  • I tested the SD_Card_Access_Example, and I didn't run into any problems.  You can try reformatting your SD card before inserting it into the NavSpark Adaptor Board.  I hope that solves the problem.

This reply was deleted.