Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 55 of 55

Thread: SD card on a 4.0

  1. #51
    Senior Member
    Join Date
    Sep 2019
    Posts
    233
    OK. I thought I was explaining my issue well enough, but I will endeavour to draw out the circuit later tonight and put that up.
    To be fair, this thread is the whole project and not just this issue!

    I will return

  2. #52
    Senior Member
    Join Date
    Sep 2019
    Posts
    233
    I am completely re-breadboarding the whole project, and drawing the circuit diagram as I go to post here.

    I decided maybe the better option was to utilise the SPI1 and SPI2 ports on the Teensy 4, but now not so sure that will be a good idea.

    First off, I didn't realise the pads for the SPI2 (34-37) were so ridiculously small. For a processor that will plug into a PCB (no room for a 4.1), I can't see any easy way of accessing those pins. I can only think of thin wires with a 4 pin plug on the end.

    Secondly, I assume it will take some library adjustment to make the SD card utilise SPI2 and the flash to use SPI1 (The screen in on the default SPI pins).

    I don't see how you tell the SD card routine to use a different SPI bus.

    I will continue to tinker and then report back with the new circuit (if indeed, I find one that is better)

  3. #53
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,748
    With the SD library with SPI1 and SPI2...

    Look at the Examples->SD->SdFat_Usage example

    It shows some example on how to do things like that, including:
    //ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI, SD_SCK_MHZ(16), &SPI1));

  4. #54
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,543
    Quote Originally Posted by SteveSFX View Post
    Secondly, I assume it will take some library adjustment to make the SD card utilise SPI2 and the flash to use SPI1 (The screen in on the default SPI pins).

    I don't see how you tell the SD card routine to use a different SPI bus.
    To use other SPI ports, see lines 54-57 in the SdFat_Usage example:

    https://github.com/PaulStoffregen/SD..._Usage.ino#L54

  5. #55
    Senior Member
    Join Date
    Sep 2019
    Posts
    233
    Thought I should update on this thread.

    Been working a lot of hours, so only got back to it this morning. DEAD. Teensy 4.0 appears to be zapped and I have no idea why. Barely anything on the breadboard.

    So, I have decided that after more years than I can remember to park electronics as a hobby. It doesn't bring me joy any more and I certainly cannot afford to fry Teensy's twice a month.
    Planning to sort through my vast electronics workshop tomorrow and start selling off my processors, screens, modules, switches etc (and there are LOT - about 100 compartmented sorter boxes full).
    I think I will do a mass Ebay sell off.

    Thanks for everyone's help and assistance over the years.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •