Sunday, 2019-05-12

*** tpb has joined #tomu00:00
xobsI noticed something super interesting. The litex event system is interacting with it somehow.00:57
xobsIf I enable some of the ep1/ep2 event sources, then I get extra bits in ep0.01:00
xobsThat would seem to mesh with the fact that it works fine in simulation, and the debug bridge works fine, but in real hardware it does n't.01:00
xobsThe litex event system isn't properly simulated.01:01
*** ptotter[m] has quit IRC01:30
*** shalzz has quit IRC01:30
*** xobs has quit IRC01:30
*** nrossi has quit IRC01:30
*** alexhw[m] has quit IRC01:31
*** synaption[m] has quit IRC01:31
*** dwg has quit IRC01:32
*** dwg has joined #tomu01:32
*** Vercas_ has joined #tomu01:49
*** jeroud has quit IRC01:50
*** imdeni has quit IRC01:51
*** imdeni has joined #tomu01:53
*** jeroud has joined #tomu01:54
*** Vercas has quit IRC01:56
*** buZz has quit IRC01:56
*** hegemoOn has quit IRC01:56
*** shalzz has joined #tomu02:15
*** ptotter[m] has joined #tomu02:19
*** nrossi has joined #tomu02:29
*** alexhw[m] has joined #tomu02:31
*** xobs has joined #tomu02:31
*** buZz has joined #tomu02:34
*** buZz has joined #tomu02:34
*** synaption[m] has joined #tomu02:35
*** hegemoOn has joined #tomu02:53
*** futarisIRCcloud has joined #tomu07:11
*** cdmatter has quit IRC08:10
xobsOne of the problems I'm discovering is that we include the CRC16 in the FIFO, which means that there are two extra bytes.09:17
xobsThat's fine normally, but in a SETUP packet, it's essentially an OUT/IN/OUT, so if you have two SETUP packets that follow each other it's OUT/IN/OUT/OUT, and the second OUT will have two 0 bytes tacked on to the front.09:18
*** futarisIRCcloud has quit IRC09:21
tntMm ? I mean having the CRC being received is not uncommon afaik, you can simply ignore it if you know the data you get is always 2 bytes longer.09:27
tntI'm pretty sure I saw the doc of some uc that stated the CRC would be received and written to memory as well.09:27
xobstnt: true, but for a SETUP (IN) transaction, the host sends SETUP, then DATA, then expects data to be read.  It sends IN, then the device sends data.  Finally, the host sents OUT, followed by DATA.  This last data is two bytes of 00.09:28
xobsIf a second transaction is immediately started, then the host will send SETUP, followed by DATA.09:29
xobsBecause of the Fomu's FIFO architecture, if the last two bytes of 00 aren't removed from the FIFO, they will be prefixed to the first SETUP packet.09:29
tntOh you mean you don't know the packet boundaries inside the FIFO ?09:33
xobsYeah, that information isn't kept anywhere.09:33
tntIn the case where all goes well, you _know_ that you just finished the previous transfer and you're waiting for the 00 from the ZLP of the status stage.09:36
tntbut handling all the cases where things don't go perfectly in a spec compliant fashion would be tricky ...09:37
tntAlso even above this, some usb protocol require you to know when you get a shorter than max length packet  to mark boundaries between transfers, so this seems like an annoying limitation.09:39
xobstnt: I don't think I've seen anything that is spec-compliant to all the errors. It's _hard_.09:45
xobsWe don't even properly support retransmission right now.09:45
tntxobs: oh I know it's hard, I discover new stuff every time I re-read the spec :p  But at least recover somewhat gracefully and not complete any transfer with corrupt data.09:48
tntThe usb compliance tester sw doesn't ever really test error cases AFAICT.09:48
xobsI got the compliance tester, but wasn't sure how to run it, because apparently it takes over the root hub (?) in order to do its thing, which would make it somewhat difficult to use the machine.09:49
*** AmosSam has left #tomu09:50
tntYes, it takes over the USB controller. so either you need multiple USB controllers or you need to have mouse/keyboard that don't use USB.09:50
*** AmosSam has joined #tomu09:50
*** AmosSam has left #tomu09:59
*** AmosSam has joined #tomu10:01
ToxicFrogDoes using the USB controller also make use of some of the hardware that reads the buttons or something? I'm having weird issues when trying to make something that emulates a USB keyboard and sends keystrokes on button press.12:28
ToxicFrog"send keystrokes on boot" works fine, and "react to button presses by lighting one of the lights" works fine12:28
ToxicFrogBut when I write "react to button presses by sending keystrokes", I start getting phantom button inputs where gpio_get(...) is returning nonzero even if no-one is touching the device.12:29
*** futarisIRCcloud has joined #tomu12:29
xobsToxicFrog: the captouch on Tomu is a hardware block.  I seem to remember there's a value you can tune somewhere.12:29
xobsThough captouch is hard :-/12:29
jerithI can't seem to get my buttons to respond, currently. :-(12:30
jerithToxicFrog: Maybe USB traffic is triggering the captouch? Everything's quite close together.12:31
ToxicFrogThat's my best guess, yeah...presumably it's tunable so that doesn't happen, or no-one would be able to use it for U2F?12:32
ToxicFrogEurgh, I'm going to have to read up on how the captouch stuff works.12:32
ToxicFrogI'm used to buttons that are just "this pin is connected to Vcc/GND depending on whether it's pressed or not" :/12:32
jerithLikewise.12:33
jerith(Even that needs debouncing, but a simple delay before checking again is generally good enough.)12:33
ToxicFrog(yeah, IME debouncing is a lot easier to deal with than "USB is haunted and the ghosts are messing with your other GPIO pins")12:37
ToxicFrogThere's the tomu-samples blinky-usb program, but that looks like it's using a completely different API for GPIO and whatnot...12:46
*** emeb has joined #tomu14:37
*** futarisIRCcloud has quit IRC14:49
*** rohitksingh has joined #tomu15:58
*** rohitksingh has quit IRC16:24
*** rohitksingh has joined #tomu16:26
*** rohitksingh has quit IRC17:39
*** dwg has quit IRC17:40
*** dwg has joined #tomu17:40
*** rohitksingh has joined #tomu17:47
*** Vercas_ is now known as Vercas18:07
*** rohitksingh has quit IRC18:25
*** rohitksingh has joined #tomu18:46
*** rohitksingh has quit IRC19:02
*** rohitksingh has joined #tomu19:58
*** rohitksingh has quit IRC21:01

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!