0

(I am able to successfully initialize CAN-Bus shield and SD-card module w/ card in it.)

Now I have removed all code related to the SD-card module, yet I left the module (without the card in it) physically connected. This results in the CAN-Bus shield initialization failing.
When I insert the card into the SD-card module the CAN-Bus shield initializes successfully. (I am still not doing SD-card module initialization.)

Of course, I can just disconnect the SD-card module or leave the card in it... But I am trying to understand this black magic.

I have connected the SD-card module CS to pin 8, the CAN-Bus shield clone CS is connected to pin 10. I tried to set the SD-card module CS pin to OUTPUT and to HIGH. That had no effect.

the CAN-Bus shield + schematics: http://www.elecfreaks.com/estore/can-bus-shield.html [Resource -> Schematics]
the SD-card module: https://ebay.com/itm/161366316226?_trksid=p2057872.m2749.l2649

asked Mar 7, 2017 at 11:10
10
  • 1
    Maybe it have similarity to this: arduino.stackexchange.com/questions/31924/… - the uninitialized device can brind the bus to some bad state, as it does not care about the bus at all Commented Mar 7, 2017 at 11:20
  • 2
    Would need a reference/link to the shield and schematics to answer that. Commented Mar 7, 2017 at 13:17
  • I think the SD-Card and the CAN Bus shield use the same pin and that is the problem. I read that on a post on here last week. Commented Mar 7, 2017 at 13:30
  • @MikaelPatel elecfreaks.com/estore/can-bus-shield.html This is the product; there is Resource tab with Schematics link Commented Mar 7, 2017 at 13:59
  • 1
    J. Z., please edit the info from your first two comments here and from your comments to Majenko's answer into the question ... more likely to get upvoted if question is more complete Commented Mar 7, 2017 at 17:03

1 Answer 1

2

Without seeing schematics this is purely supposition:

My guess is that the SD shield contains bi-directional level shifting. The MISO pin, which connects the DO pin of the SD card to the MCU, will have a 3.3V -> 5V level translator on it. This, with no SD card inserted, will be floating (flapping around in the breeze) causing the output of the level translator to randomly produce digital signals on the MISO pin. These signals interfere with the MISO signals from your CAN shield.

How best to cure the problem very much depends on what level shifting is in the circuit and how it is controlled and wired. For that we will need to see schematics of both the CAN and SD card shields.

answered Mar 7, 2017 at 13:49
6
  • CAN-Shield: elecfreaks.com/estore/can-bus-shield.html [Resources -> Schematics] Commented Mar 7, 2017 at 14:03
  • SD-card: ebay.com/itm/161366316226?_trksid=p2057872.m2749.l2649 I can't seem to find more info on this little bugger. Commented Mar 7, 2017 at 14:05
  • Need a schematic of the SD card to know how the 74LVC125A is wired up - is it buffering the DO pin of the SD card or not? Commented Mar 7, 2017 at 14:07
  • Unfortunately I can't find any vendor name on that thing, or a product page... The link above is all I could find. Commented Mar 7, 2017 at 14:37
  • 1
    Then you would have to reverse engineer it. Shouldn't be hard with a DMM. Commented Mar 7, 2017 at 15:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.