Coder Social home page Coder Social logo

Comments (6)

greiman avatar greiman commented on July 22, 2024

I don't have a 8 MHz MightyCore so I can't help you.

I no longer test SdFat with 1284P boards.

from sdfat.

SrikanthBala avatar SrikanthBala commented on July 22, 2024

Thank you sir for your prompt response. I am designing a new device which requires more pins than a ATMega 328. Hence I chose the 1284P. The other option I have is a Maple Mini like STM32 board. It is fast, has the pins I need and is cost effective.
However I tried SdFat today on SPI1 using a LC MicroSd Shield bypassing the 5V regulator and using direct 3.3 V. However the level converter IC is not bypassed (its datasheet mentions it will work correctly for all voltages above 2.6v)

However the STM32 card returns failure to find the card using the SdInfo.ino. Pin connections made for SP1 and checked multiple times. No sketch works for SD card indicating a basic fault in my system. Does your SdFat support STM32 Core ?

from sdfat.

greiman avatar greiman commented on July 22, 2024

Arduino STM32 requires the old Arduino IDE 1.6.12.

SdFat no longer works reliably on STM32 and I don't want to fix it for 1.6.12.

from sdfat.

SrikanthBala avatar SrikanthBala commented on July 22, 2024

Ok

from sdfat.

stevstrong avatar stevstrong commented on July 22, 2024

A short comment:
Arduino_STM32 code works with both SdFat and SdFat beta, with Arduino 1.6.9 or later.
But: it only works with SD card modules designed for 3.3V, without 5V->3.3V regulator, see:
http://www.stm32duino.com/viewtopic.php?f=13&t=20, section "Known problems".

from sdfat.

SrikanthBala avatar SrikanthBala commented on July 22, 2024

Thank you stevstrong.
I closed this issue earlier thinking I should just give up on the 1284p and the Mighty Core for Software SPI. I just got back here to see your comment. I AM using a 3.3V modified microSD module (as my 1284p is also running at 3.3V). I'll definitely give it a go with my Black Pill STM32 board.

Meanwhile I reopened this because I finally found the problem with my code for the 1284P.

First to solve the compiling problem. I needed to modify the GpioPinMap.h file. The original GpioPinMap.h file in the SDfat library under "SdFat/SdFat/src/SdSpiCard/boards/GpioPinMap.h" has the following two lines which need to be changed to compile under the MCUDUDE MightyCore :

Near the end of the file :
#elif defined(ARDUINO_1284P_BOBUINO)
needs to be changed to #elif defined(BOBUINO_PINOUT)
and
#elif defined(ARDUINO_1284P_STANDARD)
needs to be changed to #elif defined(STANDARD_PINOUT)

After this the code compiled and uploaded but no luck. SD card could not be read.

After nearly 24 hrs of breaking my head on multiple SD card adapters and finally fixing one 'impossible to see' internally broken jumper wire, and trying a zillion other combinations, I found in a 2012 Arduino forum that SdFat SoftwareSpi assumes a Standard or Sanguino pinout and not Bobuino pinout. So I switched to Standard pinout names in the code and BINGO ! it worked !
In fact it does not matter whether I select Bobuino board or Standard board under the boards selection for the Mighty Core. It still works on the Standard Pin names only as if the Standard Pins were somehow hardcoded into the SDFat SoftwareSPI code ignoring the definitions in Gpio.h. I dont currently know how to modify SDFat to use the right pins so I'll leave it at that, as I know how to get the the code to work.

Thanks Greiman for the library once again. And incidentally I tried it at both 16MHz and 8Mhz too and it works GREAT !
I hope this helps someone else struggling on similar lines. Bye

from sdfat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.