*** tpb has joined #litex | 00:00 | |
*** SpaceCoaster has quit IRC | 00:11 | |
*** SpaceCoaster has joined #litex | 00:17 | |
*** lf has quit IRC | 00:57 | |
*** lf has joined #litex | 00:57 | |
*** Degi has quit IRC | 02:27 | |
*** Degi has joined #litex | 02:28 | |
*** midnight has quit IRC | 03:38 | |
*** midnight has joined #litex | 03:44 | |
*** TMM has quit IRC | 04:08 | |
*** TMM has joined #litex | 04:09 | |
*** benh_ has joined #litex | 04:54 | |
*** benh_ has quit IRC | 05:00 | |
*** benh_ has joined #litex | 05:02 | |
*** benh_ has quit IRC | 05:20 | |
*** benh_ has joined #litex | 05:23 | |
*** benh_ has quit IRC | 05:52 | |
*** kgugala has quit IRC | 07:29 | |
*** kgugala has joined #litex | 07:29 | |
*** lambda has quit IRC | 10:19 | |
*** lambda has joined #litex | 10:21 | |
*** _whitelogger has quit IRC | 13:18 | |
*** _whitelogger has joined #litex | 13:20 | |
somlo | daveshah: with external 12V power, plugging both ethernet and microSD cards into the trellisboard no longer causes it to glitch | 13:30 |
---|---|---|
daveshah | Great, that does seem like it was a power problem then | 13:30 |
somlo | yeah, and there's a deterministic solution (use ext. 12V - and a fuse!) that doesn't involve playing usb cable lottery :D | 13:31 |
_florent_ | somlo: nice, just for info i'm looking at the LiteSDCard insert-init-eject issue | 13:35 |
somlo | _florent_: thanks! I'll hold off on creating a github issue then, unless it turns out to be a longer term project (hopefully it's just a quick FSM tweak though :) | 13:41 |
_florent_ | somlo: the insert-init-eject issue is probably more related to software | 13:47 |
somlo | _florent_: the softer the better :D | 13:49 |
_florent_ | somlo: i'm able to reproduce (even without ejecting the card) | 13:59 |
_florent_ | somlo: it seems the "Switch driver strength" command is only accepted once: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/liblitesdcard/sdcard.c#L455-L457 | 14:02 |
_florent_ | it's passing on the first sdcard_init, but failing on the next ones | 14:03 |
_florent_ | it's maybe not returning SD_OK because it's already configured correctly, i'm going to look at the spec | 14:07 |
*** CarlFK has quit IRC | 14:28 | |
somlo | _florent_: I just emailed you the sequence of commands being sent to the card by linux | 14:32 |
somlo | most of that is generic (i.e. not specifically done by the litex_mmc.c driver) | 14:32 |
somlo | so the question is whether sending "switch strength" repeatedly should be accepted/ignored rather than allow the card to get "legitimately upset" about it? | 14:34 |
_florent_ | somlo: i just removed the driver strength configuration since that's only supported in 1.8V signaling in fact (which was previously supported) | 14:47 |
_florent_ | https://github.com/enjoy-digital/litex/commit/1d04b1dd83cf864d7f48cb4fe34e09a37412414c | 14:47 |
_florent_ | somlo: with this, consecutive sdcard_inits are working fine (with the BIOS) | 14:49 |
_florent_ | somlo: but there is probably still an issue (this time i think in the gateware) since i also reproduce the miss-alignment of data on the first reads | 14:53 |
keesj | what is the bench in litesdcard https://github.com/enjoy-digital/litesdcard/tree/master/bench ? | 15:06 |
keesj | I was serching for a python script to send sd commands (there used to be one) | 15:06 |
keesj | it looks like .. pretty cool setup with sirgok/pulseview | 15:07 |
_florent_ | keesj: i'm indeed creating hardware benchs to ease development of the different cores | 15:13 |
_florent_ | https://usercontent.irccloud-cdn.com/file/NkmVAdYo/architecture.png | 15:13 |
_florent_ | that's the idea with LiteSDCard bench, but the Pulseview/sigrok capture part is not yet fully validated | 15:15 |
_florent_ | for now i've been mostly testing with an external analyzer on the Pmod connector, but the idea is to try to get rid of it and re-sample Pmod signals directly with the FPGA and stream it to the Host | 15:17 |
keesj | but.. is litesdcard the dut or the SDCARD? (I need to dump an eMMC and would fancy doing this with the fpga) | 16:57 |
somlo | _florent_: the data returned by `sdcard_read 0` after `sdcard_init` is different from the very first time, once you start ejecting, reinserting, and re-running the `sdcard_init` + `sdcard_read 0` sequence. No more outright failure upon `sdcard_init`, that's true | 17:02 |
somlo | but there's still something in the gateware that returns different results starting with the second time after eject+reinsert | 17:03 |
*** kgugala_ has joined #litex | 17:03 | |
somlo | (maybe that's what you meant by "mis-alignment of data on first read")? | 17:03 |
*** kgugala has quit IRC | 17:04 | |
somlo | either way, with the linux driver it still only works the first time the card is inserted (so whatever happens after *re*insertion is problematic still) | 17:05 |
*** kgugala has joined #litex | 17:13 | |
*** kgugala_ has quit IRC | 17:16 | |
*** kgugala_ has joined #litex | 17:20 | |
*** kgugala has quit IRC | 17:22 | |
_florent_ | keesj: LiteSDCard is the DUT yes, there is a logic analyzer probing it internally and the PMOD is also probed (to verify the PHY/Protocol) | 17:23 |
*** kgugala has joined #litex | 17:23 | |
_florent_ | somlo: yes that's what i meant with mis-alignment, i'm looking at this | 17:24 |
*** kgugala_ has quit IRC | 17:25 | |
somlo | _florent_: got it, thanks (apologies for coming off dumber than usual, experiencing unusually high levels of multitasking over here :) | 17:26 |
*** kgugala_ has joined #litex | 17:31 | |
*** kgugala has quit IRC | 17:33 | |
*** kgugala has joined #litex | 17:44 | |
*** kgugala_ has quit IRC | 17:46 | |
*** CarlFK has joined #litex | 18:41 | |
_florent_ | somlo: the misalignment seems to be causes by some garbage data we get from the SDCard at the end of the initialization. I added some logic to ensure we flush this garbage data before doing the DMA: | 18:59 |
_florent_ | https://github.com/enjoy-digital/litesdcard/commit/9e267a5a17e955326ec84059f8d94aa738b5c422 | 18:59 |
_florent_ | this seems to be working on my setup and with the BIOS (insert, sdcard_init, sdcard_read 0, eject, etc... sequence) | 19:00 |
_florent_ | can you do a test? | 19:00 |
somlo | _florent_: thanks, working on it! | 19:42 |
somlo | _florent_: superficially, with the existing linux driver on nexys4ddr, it's still failing to re-initialize the sdcard upon reinsertion -- still only works the first time the card is inserted | 20:35 |
somlo | but I can confirm that from the bios perspective, initializing the card and reading any given block is repeatable and predictable, regardless of how many times we eject and reinsert/reinitialize the card | 20:40 |
somlo | since my minimal gateware reproducer is now gone, I'll dig into the driver over the weekend and either figure out what it's doing wrong, or come up with another reproducer :) | 20:42 |
*** CarlFK has quit IRC | 22:27 | |
*** CarlFK has joined #litex | 22:49 | |
*** _whitelogger has quit IRC | 23:13 | |
*** _whitelogger has joined #litex | 23:16 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!