Rio

"Searching SD Card..." hangs more often on bootup

49 posts in this topic

Has anyone noticed a similar behavior ?:

When starting the SEQ V4, it often stops at "Searching SD Card ..." and nothing happens. If I take out the card and push it back in, then sometimes it reads the card (or after the searching sdcard is timed out). Once the card is detected and in the running app, I can always put and push the card without problems.Then the card is always found. The problem only occurs during booting.

I am usingLPC1769 core.
SD Card is SanDisk Extreme Pro 4GB.

EDIT:

Once I noticed the following message in the terminal: [SEQ_FILE_HW] ERROR while reading file, status: -7

But if bootup seq and it hangs then I get these messages for the commands:

system

[2528.370] MIDIbox SEQ V4.096 (C) 2019 T. Klose
[2528.370] Operating System: MIOS32
[2528.370] Board: MBHP_CORE_LPC17
[2528.370] Chip Family: LPC17xx
[2528.371] Serial Number: D0217070A6316535E67E9BE47000005F
[2528.371] Flash Memory Size: 524288 bytes
[2528.371] RAM Size: 65536 bytes
[2528.371] MIDI IN Ports:
...
[2528.376] Systime: 00:00:30
[2528.376] CPU Load: 54%
[2528.376] MIDI Scheduler: Alloc   0/  0 Drops:   0
[2528.377] Stopwatch: no result yet
[2528.377] Current Root Note (via Keyboard): C-3  
[2528.377] done.

sdcard

[2639.600] SD Card Informations
[2639.601] ====================
[2639.601] --------------------
[2639.601] CID:
[2639.601] - ManufacturerID:
[2639.601] - OEM AppliID:
[2639.601] - ProdName:
[2639.601] - ProdRev: 8
[2639.601] - ProdSN: 0x00000001
[2639.601] - Reserved1: 169
[2639.601] - ManufactDate: 3
[2639.602] - msd_CRC: 0xb0
[2639.602] - Reserved2: 4
[2639.602] --------------------
[2639.602] ERROR: Reading CSD failed with status -256!

...I reformatted the 4GB card and initialized it with the default FAT32 (4kb clustersize). But it has not changed ..

Then I tested the following: I once pulled out all the midi cables of the connected devices. So far, it could always be booted with SD with a lot of test. It starts hanging again sometime as soon as several midi devices hang on it .. no matter which and how many. It makes also no difference whether I connect via USB or external PSU.

Greetings,

rio

Edited by Rio
more infos

Share this post


Link to post
Share on other sites

Can it be that the connection to the SD card is too unstable, or is influenced and would a decoupling cap make sense for the power supply of the reader? Just strange, that once it has been correctly detected, it also works stably. I would be grateful for any help..

Edited by Rio

Share this post


Link to post
Share on other sites

@Rio just as a confirmation, i sometimes had this problem, too on my old SEQ V4 (not the new v4+) and it occured just at power up time. Once the startup was successful and the SD card could be read, it did not happen again during runtime. I suspect the SD card cable might have been a bit too long, or maybe it was caused an unstable power supply. After upgrading to the new v4+ (with the shorter cable within the case) i never experienced this problem again - and i am using the same physical SD card as before, unchanged since 2010 or so :).

Best regards!
Peter

Share this post


Link to post
Share on other sites

Interesting did the schematic change on the new layout where there is a new cap somewhere that is charging a little longer to delay the startup time of the processor?  

Share this post


Link to post
Share on other sites

In the case of my old V4, it was almost certainly questionworthy wiring of the SD card attached to a too long ribbon wire - and general noise introduced by VFDs, long wires and no buffering anywhere :). I don't think the schems have changed dramatically, but Thorsten or Andy may know more.

Many greets, Peter
 

Share this post


Link to post
Share on other sites

The J16 port is physically the same on the wCore, the E part just breaks out the LEDs (GPIO) and reset switch to the panel. The Waveshare board of course might have layout differences compared to the Discovery. The pull-up resistors for the J15 display port required changes that I didn't fully investigate, but it works so I'm happy :).

Share this post


Link to post
Share on other sites

Hey, thanks for the first hints.

I have now tested the following:

if I provide no power to all my devices, which are connected from SEQ through several ports (INs, OUTs,IICs) , then the SEQ boots always fine with detected SD. It starts to hang more often when more devices are turned on while booting. And yes hawkeye - it's true - it only affects the bootup. Once detected, the SEQ is working fine with the SD.

I'll take your advice with the wiring...we'll see, or someone else has a different guess.

Edited by Rio

Share this post


Link to post
Share on other sites

MIDI is supposed to isolate your devices electrically(opto-coupled), did you try to disconnect the devices one by one? Maybe only one device causes this issue... Is there another MIDIbox connected to?

Share this post


Link to post
Share on other sites

I had thought so synonymous and turned off one by one (for each boot process), but in the end, no statement can be made, which device is the cause, but it depends only on the amount of devices which are connected and turned on.

Edited by Rio

Share this post


Link to post
Share on other sites

Have you checked you power supply voltage? If you have a DSO you could look to see what is happening on startup you might be getting a pulse or it could be dipping a lot. Would be interesting to see if it was happening with the Midi_io if the iic midi  would resolve the issue.

Share this post


Link to post
Share on other sites

I have replaced the cable with a thicker and kept the cable as short as possible. but unfortunately it did not improve. Does somebody still have an idea?

Share this post


Link to post
Share on other sites

I know it works when started correctly but did you try another SD-Card, this one is perhaps a little sensitive...

Share this post


Link to post
Share on other sites

I could try it, but I do not think it changes anything. it seems to me that the mass of the devices that hang up is decisive. Can this possibly be fixed by sourcecode?

(possibly for the loop when initializing, because then it runs constantly, as soon as the card recognized...)

@gerald.wertI have a USB dco at hand, I'm not sure how I can meaningfully measure what.

Edited by Rio

Share this post


Link to post
Share on other sites

A slow card (1Gb) always seems to be running. This has FAT as file system and I can override it via sdcard_format in terminal. For the Sandisk 4GB Extreme: the SEQ will usually hang there (as well as when booting). I have a second Extreme Card. It shows the same behavior... So the card ist NOT defect. After successful formatting with SdCardFormatter for that card, nothing has changed.

Edited by Rio

Share this post


Link to post
Share on other sites
2 hours ago, Rio said:

A slow card (1Gb) always seems to be running.

So don't use XC, I've got a HC and it works fine.

Share this post


Link to post
Share on other sites

The Sandisk Extreme 4GB is a SDHC.

816E690B-6294-4844-B2DC-945097803408.jpeg
The other slow card has a writing speed of 2 MB / s - so i would like use the extreme. 

Edited by Rio

Share this post


Link to post
Share on other sites

The SPI doesn't use high transfer rate, edit:but more than 2MB/s for sure. A SC 1Go is maybe enough? Maybe try another HC, other brand/model.
Mine is a micro-SD PNY 16Go HC I with adapter.

Note: I've just checked:

// init SPI port for fast frequency access (ca. 18 MBit/s)
  // this is required for the case that the SPI port is shared with other devices
  MIOS32_SPI_TransferModeInit(MIOS32_SDCARD_SPI, MIOS32_SPI_MODE_CLK1_PHASE1, MIOS32_SDCARD_SPI_PRESCALER);

18Mbit/s is the maximum, it's 2.25MByte/s. Very close to 2MB/s
Do you really feel the difference?

Edited by Antichambre

Share this post


Link to post
Share on other sites

I would like to find out why there is a problem with the cards or if there is a common problem with the massive port connections of external devices in conjunction with the SD cards and if there is a possibility to solve it via a hardware or software solution (for stable boot/detection)

Edited by Rio

Share this post


Link to post
Share on other sites

I need an accurate timing, especially when reading data. where did you get the SPI speed information from?

Share this post


Link to post
Share on other sites
44 minutes ago, Antichambre said:

Yes you can add a delay mechanism at startup.

a delay - based on? The startup is already delayed enough by the logo display (about 3 sec)

Edited by Rio

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Most of the issues I found about "ACMD41" are a voltage problem, Gerald is maybe right you need to check that...

Edited by Antichambre

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now