SD cards do not release DO when -CS goes inactive (=1)
Cluso99
Posts: 18,069
I found when sharing the SD pins (DI, DO, CLK) on my TriBlades and RamBlades that I had to modify the sdspiFemto.spin and the fsrw26 routines (lonesock put optional code in fsrw26 for me ).
This would also apply to multiple SPI devices on the SPI bus.
IMHO this is probably an error in the SD cards as I would expect that if -CS becomes inactive then it should release driving DO.·Obviously there is no chance of getting this changed in the SD card, so the drivers need this modification. In the latest fsrw, lonesock/rokicki have made an option for this (IIRC called Cluso's tristate mod).
I found that using the eeprom bootloader to load and boot a file from the SD card, it left the DO being driven by the SD card. The binary file I loaded was a test program to test the RamBlade hardware and this is how I discovered the problem. While it may not manifest as a problem, it nevertheless is a bug and I will be fixing it.
In light of my latest discovery, IMHO this disable modification should be in all SD·drivers.
Just thought I would post this in case anyone starts going around in circles looking for a similar bug.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
This would also apply to multiple SPI devices on the SPI bus.
IMHO this is probably an error in the SD cards as I would expect that if -CS becomes inactive then it should release driving DO.·Obviously there is no chance of getting this changed in the SD card, so the drivers need this modification. In the latest fsrw, lonesock/rokicki have made an option for this (IIRC called Cluso's tristate mod).
I found that using the eeprom bootloader to load and boot a file from the SD card, it left the DO being driven by the SD card. The binary file I loaded was a test program to test the RamBlade hardware and this is how I discovered the problem. While it may not manifest as a problem, it nevertheless is a bug and I will be fixing it.
In light of my latest discovery, IMHO this disable modification should be in all SD·drivers.
Just thought I would post this in case anyone starts going around in circles looking for a similar bug.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Comments
Certainly worth trying anyway.
http://elm-chan.org/docs/mmc/mmc_e.html
(section "Cosideration on Multi-slave Configuration")
a single dummy read after CS release should do... but it sounds too easy to be true, I guess it depends on the card brand also
That would be a nice feature actually, for pin starved situations, so you can share data lines...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My driver follows the SD card spec pretty much to the letter but I also included polling in my driver so it infact never shuts down the SD card clock and is constantly sending data to see if the card is there. I'll just have to roll a custom version for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
So, I think it should be the default in the driver if -CS is released, not an option. This could also cause problems with removing cards with power attached. If the card is never shut down, then it is OK to allow DO to remain active.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm