Jump to content

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


Rio
 Share

Recommended Posts

Yes, agreed, a power supply issue might explain it (also back then for my old V4) - @Rio: do you have access to a scope and could monitor the 3V/5V supply lines during unit startup? This might also explain why problems don't happen with low-speed cards, as the transfer speeds or card response speeds might be limited and not pushing the system that much?

Many greets,
Peter

Link to comment
Share on other sites

I can do that. do I have to pay attention to DCO connections? I have a dds120 here: https://sigrok.org/wiki/SainSmart_DDS120

the probes can be switched 1:1, 1:10. The software is a modified openhantek variant ...

however, what is completely unclear, why is the failure rate dependent on the amount of devices connected and powered on the midiports?

Edited by Rio
Link to comment
Share on other sites

I want to update openhantek (software for certain DCOs) before doing some tests. It seems that the last official version supports the dds120 ...

Update: I got the last openhantek 6022 variant running with dds120. It is not possible to record directly inside, but I can configure following params:

1.PNG

I could export a CSV or save it as PDF. Additionally I can zoom and measure (as tools).

Edited by Rio
Link to comment
Share on other sites

I am not familiar with that software but you want to see what your 3.3 is doing. Is it actually 3.3 at startup? Maybe something is pulling it down or it is not actually 3.3v are you getting some noise on the 3.3 line. You should not need to export it but just take a picture of the screen.  You should be able to test most of this with a voltmeter but if it is happening right at startup the meter might miss that and will not show a spike or excessive noise. Does it dip on startup, does it have a big pulse on startup? Also when you have all your devices connected when the problem is occurring is the voltage still 3.3v or it could say be dropping below 3v causing your problems. Maybe part of your circuit has a solder bridge or bad cap that is pulling the voltage down. The thought on the midi io versus the iic midi is it would be using a different 5v power supply so may workaround what ever is pulling the voltage low if the voltage is being pulled low somehow say by a midi cable or connected device that is going bad and is loading the system. 

Don't rule out issues on the processor board either get out a magnifying glass, your volt meter and test everything back to the processor pins for the sd card. Also test with it not powered for impedance. I have had a stm32 board that had a pin for the sd card with a solder bridge new from the factory at the mcu leg it is possible and fixable by lifting the offending pin leg. (they are really small and hard to work with don't mess with this unless you have 100% verified it is the issue)   

Not saying this is your exact problem, especially since you are using a lpc board but I would get the manual for the LPC and check everything like this: 

http://midibox.org/forums/topic/20396-stm32f4-sdcard-reading-cid-failed-with-status-256-solved/#comment-177754

It could also be a bad solder joint on one of these pins where the connection in intermittent sometimes it is helpful to use the beep function on the meter to locate this issue as the meter will not beep with a very light touch but as you press down slightly if makes the contact good. You should be able to actually see that with your magnifying glass if one of the pins is not wet out with solder.

Since your problem is intermittent and not 100% all the time I would be on the hunt for impedance issues and not exactly a full on short between adjacent legs of the mcu as well as all the other things mentioned above.  

Edited by gerald.wert
Link to comment
Share on other sites

I am pretty sure you will find that your 3.3 supply is running low especially if you are running the 4 midi outs with long cables on each one. The LF 33 CV is only rated at 500ma and I think you really might look at something like this to alleviate your issue:

https://moroccodave.com/2017/10/04/diy-midi-thru-box-version-2/

http://m.bareille.free.fr/midithrubox/midithrubox.htm

This would take the load off the 3.3v power supply on the sequencer. Especially helpful if you are using 3.3v backlit lcd displays you could really be pulling the 3.3 down a lot. Especially if you have patched things up with some 20' midi cables. 3.3 works but is not the best for midi anyway (some synths and midi line powered midi devices have issues with it) and the 5v would have less loss over the cables and not be affecting your processor as the power supply will be off loaded and buffered to the 5v power of the through box.  The lpc supports up to 4 midi in and out already so this would likely be a better solution than the iic midi. You might also like how it simplifies your midi cabling.

Or of you are using 5v backlit LCD with a high current drain you could be having trouble supplying the 3.3v regulator with enough power on startup creating all sorts of weirdness. (oleds are pricy but would help a lot here) Might be worth scoping a comparison of the 5v and the 3.3 v on startup to see what is happening there. I am just guessing a bit here not knowing what hardware you have sourced and built.

 

Link to comment
Share on other sites

hey that's a lot of information. Thank you. I'll turn on the DCO.

As background: I use 12x MIDI OUT and 3x MIDI IN ... fed by LPC Coreboard +2x Quad IIC boards. I know - it's a lot but I only live once.

Edited by Rio
Link to comment
Share on other sites

The screenshot below shows (as recommended by Antichambre) Vd (CH1 yellow) and RC1 (CH2 blue) of J16. This is on the fly, without any devices at the ports. I could not recognize long spikes when switching on (its to fast). That looks ok? Although Vd is slightly below 3.3V (3.2). Next time I hang up all devices

1.PNG

Edited by Rio
Link to comment
Share on other sites

ok now the screen with full connected MIDI devices...That looks ok - no drop down.

But the SD itself is no longer connected, as I have clamped the DCO's probes to the pins of J16.

But, unfortunately I noticed that my x0xb0x was inadvertently connected from OUT2 of SEQ to MIDI THRU instead MIDI IN and it ran and I did not notice it the last couple of times. It has supplied both devices with lower voltage once one is turned off :/. Are the ports not protected? - but I did the measurement and the screenshot and CH1 still looks good (even if it was wrong connected).

I've plugged it right again and once did the tests with the SD card. But, the behavior remains - sometimes it does not start with SD with full connection of all devices. if I remove 5 devices from it, then it always boots with sd (once found .. then everything works.).

Besides: what I also noticed that the sdcard_format command does not work for the faster cards (SDHC), even if no devices are connected and even if no Quad IIC boards, no MIDI IN / OUT, no J8, no J9, no LCDs are connected anymore. LPC17 freezes immediately after sending command. That should not happened, but I've never noticed it, because I have never used that command before (since I built the box).

Does something already show what's going on with it? What should I check next?

2.PNG

Edited by Rio
Link to comment
Share on other sites

Update:

1. I screwed out the core board and looked at all solder joints. Looks clean. 

2. sdcard_format command works, but it takes a long time for the SDHC card!! Contrary to my assumption that sdcard_format crashes the seq - that's not true. It works with success but it takes for the 4GB up to 15 minutes and it just gives me until then no status. So I assumed it crashed. I did not know that there is no status message of the process. Is that the same with you?

The long time for formatting for SDHC 4GB is also reported here: http://midibox.org/forums/topic/17763-sdcard-problem/#comment-156398 
Regardless, I also specified the bootloader to use a single USB port...

3.PNG

Edited by Rio
Link to comment
Share on other sites

43 minutes ago, Antichambre said:

I said to connect the RC1 line to see what happens when this last is activated(low, idle is high) so you have to put a trigger on the CH2 and check what happens on the power during it ;)

Do you mean to change trigger to CH2 in openhantek? And do you mean there must load on RC1 through the SD connection e.g. during boot?

this will be hard to pinch the probes without shortening the circuit...

Edited by Rio
Link to comment
Share on other sites

Update: I have now tested an SD Extreme III 1GB - FAT. No problem. sdcard_format command is finished in 1sec. The Card is never undetected - SEQ always boots.

The problem only occurs with SDHC (FAT/FAT32), tested > 4GB.

 

Ok and now a few screenshots of my tests (with CH2 (blue) - RC1/CS# trigger):

1a. switched on

5db2252395358_1apower_on.thumb.PNG.2afd4

1b. switched on (another one)

5db2258ec0c3c_1bpower_on.thumb.PNG.7ea2f

hr.png.253d491be12357780d5993ff8f23453c.

2. Screenshot after booting (while the logo is displayed - before the card is read)

5db225f0c9139_2afterboot.thumb.PNG.cdebe

3a. Tried detect/read SD - and failed

5db226356e162_3afailed_detect.thumb.PNG.

4. After a failure, it always stays down for a few seconds.

5db22675e6195_4afterfailed.thumb.PNG.2f9

That remains until the next attempt. Then happens the same again and again (Screen 2, 3, 4), except I plug the card out / in. Then it will be interrupted and the card can then be recognized often.

3b. Another try detect/read SD - and failed

5db2270090957_3bfailed_detect2.thumb.PNG

3c. Another one - failed

5db2272cd8d89_3cfailed_detect3.thumb.PNG

hr.png.253d491be12357780d5993ff8f23453c.

And now a few screenshots, if the SD card is successfully detected after the boot:

5a. Successfully detected

5db227d4e63ce_5asuccess_detect.thumb.PNG

5b. Successfully detected

5db227d84975e_5bsuccess_detect2.thumb.PN

5c. Successfully detected

5db227dd6e0be_5csuccess_detect3.thumb.PN

It's hard for me to make a difference to the failed detection. But maybe you recognize something from it.

The lower blue line is the spectrum of CH2.

I have CH1 (yellow) taken directly from the LF33 and it always looks stable (about 3.2 V).

Best regards,

rio

Edited by Rio
Link to comment
Share on other sites

14 hours ago, Rio said:

The problem only occurs with SDHC (FAT/FAT32), tested > 4GB.

Do you affirm this because you tried with 2 different SDHC >4GB (brand/model)? It's maybe just the model you use since the beginning which is not good...
Cause when you tried the same other extreme 4GB, same problem, but you haven't got any issue with the others.

The 3V3 seems stable.

Anyway your SDHC 1GB is enough fast and big, no?

Link to comment
Share on other sites

7 hours ago, Antichambre said:

Anyway your SDHC 1GB is enough fast and big, no?

yes and no.

Regardless, the h2testw test program shows me a lot of errors, the card is useless and it's not a SDHC - it's a SD, and nobody sells such SDs anymore.

But, I just want to know if something is wrong on my hardware setup, or if someone else notices these things (long formatting time, hanging on startup, aso.) and if something could be fixed (on hardware: possibly through additional stabilization or possibly software adjustments).

Strangely, I have tested 2x Sandisk Extreme SDHC 4GB, 1x Medion SDHC 4GB and 1x Medion SDHC 32GB. All cards show the same behavior.

Edited by Rio
  • Like 1
Link to comment
Share on other sites

Maybe there is a block addressing issue on the larger cards? Is it possible to partition the card with a 1gb or 3 gb partition if you need the space and see if it the card is working when it sees a smaller partition?

 

 You could get some weirdness pluging into the MIDI through as the 5v is coming from different places. Should still work though. If it was plugged into one of the midi out ports that is 3.3v than might cause a bigger issue but I believe all the pins are 5v tolerant so should not be a big problem. Seems like you are getting proper voltage with no dip or noise on it though.

https://cdn.sparkfun.com/assets/learn_tutorials/4/0/8/midihw.gif

 

Link to comment
Share on other sites

On 29.10.2019 at 4:38 PM, gerald.wert said:

Maybe there is a block addressing issue on the larger cards? Is it possible to partition the card with a 1gb or 3 gb partition if you need the space and see if it the card is working when it sees a smaller partition?

That could be investigated...just unclear.

On 29.10.2019 at 4:38 PM, gerald.wert said:

 You could get some weirdness pluging into the MIDI through as the 5v is coming from different places. Should still work though. If it was plugged into one of the midi out ports that is 3.3v than might cause a bigger issue but I believe all the pins are 5v tolerant so should not be a big problem. Seems like you are getting proper voltage with no dip or noise on it though.

https://cdn.sparkfun.com/assets/learn_tutorials/4/0/8/midihw.gif

You mean, the port confusion should not have been a problem.

Link to comment
Share on other sites

 

17 hours ago, Rio said:

That could be investigated...just unclear.

You mean, the port confusion should not have been a problem.

Yes it should not have been a problem. There should not really be more than 5v on a through jack. It is not a good practice as you are bypassing the isolation though and could be a cause of unexpected issues.

Since your setup is working every time with your 1gb card it is possible that with the larger cards what is happening is that it is taking too long to read the card during startup and it is failing due to not loading the configuration on the card. If you partition your larger cards with a 1gb partition that may be a workaround for it. Fastboot may help as well and would be worth checking. Fastboot will give 3 extra seconds at startup if it is turned off.

[21469.211] set fastboot <1 or 0>: if 1, the initial bootloader wait phase will be skipped (current: 1)

It should be set to 0 to turn it off.

here is documentation on accessing the boot loader:

http://ucapps.de/mios32_bootstrap_newbies.html

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...