SC131 not finding SD card (or reader)

259 views
Skip to first unread message

MT

unread,
Mar 7, 2021, 12:02:12 PM3/7/21
to retro-comp
Hi;

I've been putting together the SC131 Pocket-sized Z180 RomWBW CP/M computer kit (purchased off Tindie, incl. component kit) and was congratulating myself on a clean build working on the first attempt after I successfully booted into CP/M (ROM/Flash installed only).

However, as I was moving on to install the SD card reader included with the kit, I found that either with or without the reader installed, I got the same startup message suggesting the SD card has not been mounted:


RomWBW HBIOS v3.0, 2020-03-27

SC131 Z8S180-N @ 18.432MHz IO=0xC0
0 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: NO MEDIA

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      SD0:        SD Card           --


In the card reader is a SanDisk Ultra 16GB but there's no visible difference with or without inserting the SD card.


Basic sanity check (DC measurements):
* Power rails to SD card adaptor fine.
* CS: +5V
* SCK: +5V
* MOSI: +5V
* MISO: +3.3V (?)


AC measurement summary:

On a scope, after pressing Reset, I see CS drop from +5V to about +3V for about 1000ms, then drop down to about +1V for about 200ms, then back up to +3V for about 300ms before settling again on +5V
cs.png

For SCK, start state is +5V and after an initial delay after Reset, there's a burst of about 300ms of activity, before settling at +5V as well.
sck1.png
sck2.png

On MOSI, start state is +5V and I see 2 small and fast bursts, around 3500uS before settling at +5V again.
mosi1.png
mosi2.png

MISO is dead flat at 3.3V before and after Reset.

I buzzed out the 6 connectionss on the SD card adaptor and they all seem good:
* CS continuity to 74HCT249 pin 4 (and nowhere else on the connector)
* SCK, MOSI and MISO continuity to CPU pins 57, 55, 56 respectively (and nowhere else)
* VCC/GND connected to the power rauls rails of SC131.


I assume this implies that either the SD card module from the kit, or RXS on the CPU is is defunct. (Assuming that the card module is known to be compatible when it was part of the kit.)

What would be a good next step to narrow it down further?

Thanks in advance!

Frank P.

unread,
Mar 7, 2021, 12:40:44 PM3/7/21
to retro-comp
And the SD card has a valid image written to it?

Wayne Warthen

unread,
Mar 7, 2021, 12:44:15 PM3/7/21
to retro-comp
On Sunday, March 7, 2021 at 9:02:12 AM UTC-8 MT wrote:
I've been putting together the SC131 Pocket-sized Z180 RomWBW CP/M computer kit (purchased off Tindie, incl. component kit) and was congratulating myself on a clean build working on the first attempt after I successfully booted into CP/M (ROM/Flash installed only).

Congrats.  It is a great little system. 

However, as I was moving on to install the SD card reader included with the kit, I found that either with or without the reader installed, I got the same startup message suggesting the SD card has not been mounted:

Correct, that is what the messages are saying.  RomWBW is not "seeing" an SD Card.
 
In the card reader is a SanDisk Ultra 16GB but there's no visible difference with or without inserting the SD card.

Looking at your traces, it seems like the master (SC131) is sending reasonable stuff out.  The bursts you see look like the normal "wake up" stuff that would be sent.  Since MISO remains flat, it seems as though the SD Card itself is simply not responding.  You seem to have done a pretty thorough job confirming the signal paths.  This would all seem to point to an issue with the SD Card itself.  I would test the SD Card in a different computer and/or try a different SD Card in the SC131 as next steps.

-Wayne

Wayne Warthen

unread,
Mar 7, 2021, 12:45:57 PM3/7/21
to retro-comp
On Sunday, March 7, 2021 at 9:40:44 AM UTC-8 Frank P. wrote:
And the SD card has a valid image written to it?

Even if the SD Card was completely empty, RomWBW would recognize it's existence in the bootup messages.  In this case, the messages indicate that the card is not being seen at all.

Wayne Warthen

unread,
Mar 7, 2021, 12:57:18 PM3/7/21
to retro-comp
I just noticed that you are running RomWBW 3.0.  The development branch of RomWBW does have some updates to work around a deficiency in the SD Card adapters.  These changes will allow some SD Cards to work that would not otherwise.

RomWBW is maintained on GitHub at https://github.com/wwarthen/RomWBW.  To get the pre-built ROM images for the development branch, you need to click on Actions.  Then click on whatever is at the top of the Workflow list.  From the next page, scroll down and look for a link like RomWBW_Linux-dev-33ef02cf.  This link will download the latest development build of RomWBW.  Expand the zip file and look for the the correct ".rom" file for your hardware in the Binary directory.  In your case the file would be "SCZ180_131.rom".  You would then burn this image into your FLASH ROM chip.  Reply if you need help with that process.

Thanks,

Wayne

MT

unread,
Mar 7, 2021, 3:03:27 PM3/7/21
to retro-comp
Thanks for your suggestions. (And incidentally,  I did see the other thread about SD card problems as well, but in that case startup messages were not quite the same.)

The SD card reads fine on my desktop linux PC. It's blank, formatted as FAT32. I tried deleting all partitions on it as well - no change.

I tried flashing the latest RomWBW image as you suggested, however the result is the same:

RomWBW HBIOS v3.1.1-pre.55, 2021-03-03

SC131 Z8S180-N @ 18.432MHz IO=0xC0
0 MEM W/S, 2 I/O W/S, INT MODE 2, Z180 MMU
512KB ROM, 512KB RAM

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
INTRTC: Wed 2020-01-01 00:00:00
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: NO MEDIA

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      SD0:        SD Card           --

Is this a known failure mode with some brands of SD cards, or does it point more towards SD card module itself at this point?

regards, MT

Steve Cousins

unread,
Mar 7, 2021, 3:44:52 PM3/7/21
to retro-comp
The MicroSD card adapters in the kits are given a very brief test before I send them out so the adapter should be okay. I guess there is always going to be the possibility of a problem even after such a test, but it seems fairly unlikely. I'd try a different MicroSD card. If another card fails in the same way, then let me know and I'll send you another card adapter.

Steve

Wayne Warthen

unread,
Mar 7, 2021, 7:46:21 PM3/7/21
to retro-comp
On Sunday, March 7, 2021 at 12:03:27 PM UTC-8 MT wrote:
Is this a known failure mode with some brands of SD cards, or does it point more towards SD card module itself at this point?

At present, I am not aware of any failure modes under RomWBW via the Z180 CSIO interface.  I suspect there are some, but this would be the first one brought to my attention.  Well, there have been some in the past, but they are all resolved.

I care a lot about compatibility.  One of the primary goals of RomWBW is that it just "works".  It would be very useful to know if other SD Cards are working on your system.  As Steve suggested, trying another card or two would be informative.  If you really do have a card that is incompatible for software reasons, I would very much like to see if I can resolve the issue.

If you are able to build a custom ROM as documented in the Source directory of the RomWBW distribution, then you can turn on the SD Card debugging setting which may tell us a bit more.  If you want to do this, just add the following line to the config file called "SCZ180_131.asm" in the Config directory:

SDTRACE .SET 3 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)

After making this change, but a new ROM following the instructions (platform=SCZ180 and config=131).  Running the custom ROM will generate a bunch of diagnostic messages from the SD Card driver.

Thanks,

Wayne 

Michael Earls

unread,
Feb 15, 2022, 10:14:09 PM2/15/22
to retro-comp
For less experienced users finding this thread in the future, make sure all of your pins have been soldered. I found one of my SD card port pins was not soldered and was working sometimes because the pin was touching the pad. Once I soldered it properly, it worked again. I'm pretty sure this is not the original poster's issue as they appear to know more than just a little bit about EE judging from the thorough analysis given on the original post.

However, my issue was exactly the same.

I was able to isolate that my board was the problem because I have another SD card reader from my SC126 and another SD card to test. Between the two SD card readers and the 2 SD cards, I was still getting failures. So I inspected the board and found the missing solder joint.
Reply all
Reply to author
Forward
0 new messages