Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeduino LoRaWAN SPI - SD Card Library #24

Closed
benbodan opened this issue Jul 24, 2020 · 7 comments
Closed

Seeduino LoRaWAN SPI - SD Card Library #24

benbodan opened this issue Jul 24, 2020 · 7 comments

Comments

@benbodan
Copy link

It seems that the SPI it's not working properly with the SD Card Library. For Example I run the CardInfo.ino example on another Arduino Clone and it works fine , when I run the same code on Seeeduino LoRaWAN the card can't be initialized same thing happens with other SPI Peripherals for example ADC (mcp3008). Almost two years ago it used to work on Seeeduino LoRaWAN too.

@jiacheng-lu
Copy link

The hardware structure of lorawan is different from other Zero series, so we have to change the pin configuration code in the software, so that lorawan can be used later.

@LynnL4
Copy link
Member

LynnL4 commented Aug 5, 2020

Hi,
dev-1.7.9 May help you.
Please replace the original ArduinoCore with the following command:
git clone -b dev-1.7.9 https://github.com/Seeed-Studio/ArduinoCore-samd 1.7.9 --recursive

@benbodan
Copy link
Author

benbodan commented Aug 5, 2020

Hello ,
I replaced the ArduinoCore-samd with the version 1.7.9 but it doesn't solved the problem either.

Using library SPI at version 1.0 in folder: C:\Users\benbo\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.9\libraries\SPI

@LynnL4
Copy link
Member

LynnL4 commented Aug 6, 2020

Hi,
This is very strange. In our test, SPI is working. Can it be the problem of CS? Can you provide more details? We want to reproduce this problem

@benbodan
Copy link
Author

benbodan commented Aug 7, 2020

Using a Logic Analyzer I can see that the SPI pins are working , I will check the v 1.7.9 with a different SD Card tomorrow , right now for some reason the SD Card stopped working with my other Arduino clone too . I am sure it's not the CS because the Card Info with the same shield worked on my other Arduino uno clone one week before.

@benbodan
Copy link
Author

I just tested another SD Card Shield with an Arduino Uno clone is initializing the SD Card using cardInfo example with chipSelect = 10, but with Seeduino LoRa WAN it won't initialize the Card .

The new shield is using the pins below :
13 SCK
12 MISO
11 MOSI
10 SS

@LynnL4
Copy link
Member

LynnL4 commented Aug 14, 2020

Hi,
In fact, the SPI of the zero series is not in pin 13 12 11 & 10. So you When I run SD card library directly, it works.

Initializing SD card...Wiring is correct and a card is present.

Card type:         SDHC
Clusters:          485936
Blocks x Cluster:  64
Total Blocks:      31099904

Volume type is:    FAT32
Volume size (Kb):  15549952
Volume size (Mb):  15185
Volume size (Gb):  14.83

Files found on the card (name, date and size in bytes): 

@LynnL4 LynnL4 closed this as completed Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants