Rio Posted October 11, 2019 Report Share Posted October 11, 2019 (edited) 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 October 25, 2019 by Rio more infos Quote Link to comment Share on other sites More sharing options...
Rio Posted October 16, 2019 Author Report Share Posted October 16, 2019 (edited) 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 October 17, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted October 17, 2019 Report Share Posted October 17, 2019 @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 Quote Link to comment Share on other sites More sharing options...
gerald.wert Posted October 17, 2019 Report Share Posted October 17, 2019 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? Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted October 17, 2019 Report Share Posted October 17, 2019 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 Quote Link to comment Share on other sites More sharing options...
latigid on Posted October 17, 2019 Report Share Posted October 17, 2019 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 :). Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 17, 2019 Report Share Posted October 17, 2019 Did you try another SD Card? Quote Link to comment Share on other sites More sharing options...
Rio Posted October 17, 2019 Author Report Share Posted October 17, 2019 (edited) 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 October 17, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 18, 2019 Report Share Posted October 18, 2019 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? Quote Link to comment Share on other sites More sharing options...
Rio Posted October 18, 2019 Author Report Share Posted October 18, 2019 (edited) 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 October 18, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
gerald.wert Posted October 18, 2019 Report Share Posted October 18, 2019 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. Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 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? Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 I know it works when started correctly but did you try another SD-Card, this one is perhaps a little sensitive... Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 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. Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) The Sandisk Extreme 4GB is a SDHC. The other slow card has a writing speed of 2 MB / s - so i would like use the extreme. Edited October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 Yes you can add a delay mechanism at startup. Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 I need an accurate timing, especially when reading data. where did you get the SPI speed information from? Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 In the firmware, mios32_sdcard.c Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) 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 October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Rio Posted October 19, 2019 Author Report Share Posted October 19, 2019 (edited) it goes through this loop: https://github.com/midibox/mios32/blob/3cb2f368e39a686451ce2759966530251f455681/mios32/common/mios32_sdcard.c#L181 and ends up here: https://github.com/midibox/mios32/blob/3cb2f368e39a686451ce2759966530251f455681/mios32/common/mios32_sdcard.c#L190 and MIOS32_SDCARD_PowerOn is repeated thereafter (after a while) Edited October 19, 2019 by Rio Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 19, 2019 Report Share Posted October 19, 2019 (edited) Most of the issues I found about "ACMD41" are a voltage problem, Gerald is maybe right you need to check that... Edited October 19, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.