whitequark changed the topic of #glasgow to: glasgow debug tool · code https://github.com/GlasgowEmbedded/Glasgow · logs https://freenode.irclog.whitequark.org/glasgow
ali-as has joined #glasgow
ali_as has quit [Ping timeout: 248 seconds]
futarisIRCcloud has joined #glasgow
<sorear> both sides?
<marcan> esden: https://twitter.com/esden/status/1140024874129215488 is that double sided tape for trial PnP placements?
<marcan> that makes a lot of sense :-)
<esden> sorear: see the rest of the twitter thread ;) ... but yes both sides...
<esden> it is a very long thread... I decided to go all the way in with live tweeting the process.
<esden> marcan: it is very annoying, you use a different footprint than the one I use and bam all LED are reversed... >_<
<marcan> esden: is the cap a larger footprint?
<marcan> hey I used the standard LED footprint...
<esden> no it is exactly the right footprint ... you designed a massive cap in there :P
<marcan> I mean I couldn't find 330uF caps in the footprint I designed in
<esden> it is taller than the one you designed in because I could not get a hold of one
<marcan> ah
<marcan> is it electrolytic or poly?
<esden> it is from the exact same family of caps
<esden> poly... I am still bit annoyed that the thing is in there at all to be honest... also it is too close to the SO8 part... it will be a problem when I try to pick and place it.
<esden> and too close to the Cypress part as I will not be able to rework the qfn pads if something goes wrong...
<marcan> I don't see any size E parts in that series at 330uF
<marcan> with the right voltage
<esden> marcan: it might be... that is not really the point ;)
<marcan> what exactly did you put on there? :D
<marcan> I'm pretty sure the cap you used is one size code too large
<marcan> which explains why it's way too close to everything around it
<marcan> compare your photo with
<esden> it is within the silkscreen paremeter...
<esden> and even if the footprint is slightly smaller, it will be a total pain in the butt to get around that honker with a soldering iron ...
<marcan> I specced E40 size and you probably used F61 or F80
<marcan> so 6.3mm instead of 5mm
<marcan> anyway, that cap is necessary, sorry :p
<esden> >_<
<marcan> esden: the soldering on those MG2040s looks good, glad I got that footprint right
<marcan> that's the one I had to make from scratch
<esden> yeah besides the TH mishap ;)
<marcan> yeah yeah
<marcan> :p
<marcan> you're 1bitsquared right? so you can fix a 1bit error
<marcan> :p
<esden> that was seriously not a big deal I saw it was missing pretty quickly.
<esden> marcan: ok I take it back... that cap is indeed a 6.5mm diameter... I know I also ordered the right diameter one for the build... this one somehow slipped in it seems.
<marcan> heh
<marcan> 5mm 330uF 6.3V does not exist afaict
<esden> 180uF
<tnt> marcan: what's that cap for btw ?
<esden> The other cap was also for glasgow as I could not get my hands on any of the caps that had the smaller footprint.
<esden> Then I found the 180uF one on arrow. So I am reworking the boards and putting that one on.
<esden> (I was just hoping to find lower cost source for the caps that is not arrow... the wider cap was all lcsc had to offer :D)
<esden> (If I order a full reel and wait a few weeks I can probably get the exact part you specified)
<marcan> esden: 180µF is fine
<marcan> basically anything >=150uF >=6.3V poly in that footprint should be fine
<marcan> esden: btw, either way don't bother with making any changes to Hana yourself since that footprint is generated from an SVG file with a converter that I have hacked up to break less (but it's still crap); whatever we decide to do I'll take care of that bit
<marcan> tnt: just power decoupling
<marcan> we need it to survive load transients, USB has terrible inductance
<marcan> it's actually specified as required for the USB power limit switch we used, we just screwed up and didn't spec it for revC0
<sorear> I forgot where Hana is from and it's a fairly common name
<tnt> esden: \o/
<ar> esden: i love how these look
<ar> esden: and this white + black + vibrant blue somehow reminds me of lego
<esden> I plugged one into my computer. It seems to get VUSB but 5V is jumping up and down and not wanting to power on. But it is too late today to dig deeper into what is wrong... also I do not know exactly when I will be able to get back to it, probably after Teardown... :/
<esden> ar: I really like the white and blue combination on the white board.
<esden> it does indeed look like lego! That is probably why I like the look so much. :)
<esden> (regarding the error, I might have populated something back to front ... who knows)
<marcan> esden: checked the rails for shorts?
<esden> yeah that was the first thing I did, and they seem all good
<marcan> hm, and 5V (after the switch) is unstable?
<marcan> does the PWR LED light at all?
<esden> Ok I think the 3v3 regulator is in the 1v2 regulator spot
<marcan> oof
<marcan> that's.... not a great mistake to make
<marcan> might've toasted the iCE40
<esden> no shit...
<daveshah> You would have got UltraScale-class timings for a couple of seconds though :P
<daveshah> Although I wouldn't write off the iCE40 yet, it can be surprising how robust these things are
<marcan> yeah, it might've survived, I've seen a PIC survive 12V
<daveshah> I remember an ESP8266 surviving 5V on 3.3V for a couple of hours with no ill effects
<esden> I swapped the regulators
<esden> waiting for it to cool off
<esden> ok it enumerates
<esden> damn the green led is dim ;) ... but that is not a surprise with the massive resistor on it :D
<esden> humm I am getting a build error... :/ https://www.irccloud.com/pastebin/2jpapW4C/
<daveshah> I think you need a newer SDCC
<esden> yeah that is what google says
<esden> but that is too much trouble at this time of night
<esden> I need to go to bed
<esden> good night ... (ubuntu LTS comes with sdcc 3.5.0 #9253 (Apr 3 2018))
<marcan> esden: it's really not supposed to be that dim
<marcan> are you sure you used the same LED?
<marcan> it should be brighter than the user LEDs by default
<esden> of course not... I used the ones I have in my inventory...
<marcan> lol
<marcan> then you need to adjust the resistor :p
<esden> as I was saying I want to use as many parts as I have in my stock... you know that :P
<marcan> sure, just saying then calibrating the resistors is up to you :p
<esden> I know
<esden> ok now really... good night :D
<marcan> you can run the glasgow selftest to power up the user LEDs properly
<marcan> by default they're just lit via the weak pull-ups which isn't representative
<esden> ok, I installed an sdcc snapshot. That helped with the compilation. Now glasgow factory seems to look for the new glasgow VID:PID not the default Cypress one as far as I can see...
<marcan> elif args.action == "factory":
<marcan> device = GlasgowHardwareDevice(firmware_file, VID_CYPRESS, PID_FX2)
<marcan> esden: it's supposed to look for the default one?
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
<electronic_eel> esden: maybe some device handle permissions problem?
futarisIRCcloud has joined #glasgow
electronic_eel has quit [Ping timeout: 272 seconds]
electronic_eel has joined #glasgow
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
uovo has joined #glasgow
oeuf has quit [Ping timeout: 268 seconds]
<esden> marcan: I think I know why I had the voltage regulators reversed on the board. If I see it correctly the parts are reversed in the schematic. TLV75533 is a 3v3 regulator and TLV73312 is a 1v2 regulator.
<tnt> esden: did you check the ice40 yet ? I just powered a up5k through its IO (just injection 3v3 into one fpga IO without any power rail present) and it booted just fine :p
<esden> my `glasgow factory` still just says: `E: g.cli: device 20b7:9db1 not found` not sure what that is about... but the FX2 LED is now lit up... I guess my udev rules did not bite yet... I think I will restart my laptop... it is complaining about having a new kernel for a while now so it is time anyways. :)
<whitequark> esden: let me check the factory code
<gruetzkopf> what does lsusb say?
<gruetzkopf> also: now that's a fun bug
<marcan> esden: holy shit I'm an idiot. you're right.
<marcan> I got that backwards a few times due to the "33" in 73312
<marcan> need to fix that in the repo :/
<esden> marcan: ;) happens to the best of us. No worries. As tnt says the ice40 is usually pretty robust. We will see very soon.
<marcan> whitequark: should we overwrite the revC1 tag? this is a pretty stupid fuckup. I'm thinking I can put it on master, then cherry-pick that commit to fork off of the current revC1 and retag?
<marcan> I'll do the swap such that the IC identifiers don't change, just the values
<esden> (I really am not sure how I sould keep my modifications to the board... I wish there was a better way)
<marcan> which means the only changes are fab layer and schematic
<tnt> C0 also has the issue I'd guess ? Or did that part change between C0 and C1 ?
<marcan> esden: yeah, we don't have a good story for that...
<marcan> tnt: it did
<marcan> C0 is fine
<tnt> Ah yeah, it was a combined 1v2 + 3v3 reg
<marcan> yup
<esden> but for now it is more important that the schematic and fab layer are fixed.
<whitequark> marcan: no retags, revC1 has existed for a while
<whitequark> should probably be revC2
<marcan> it's only a schematic change, PCB does not change
<marcan> it's an errata
<marcan> I don't think we want to revbump for this
<whitequark> sigh
<marcan> revC1.1 or whatever if you want another tag
<whitequark> no
<whitequark> just no
<whitequark> this is basically gaslighting everyone who already cloned revC1
<whitequark> (retagging that is)
<whitequark> especially given that git will not update the tag on fetch if it exists locally
<esden> But everyone who made the revC1 boards needs to be very loudly informed to make sure they populate the regulators in the correct order. :D
<marcan> I hope that's basically you :D
<esden> I wish there was an glasgow errata mailinglist like some vendors have.
<esden> marcan: I am getting messages on twitter from 2 or 3 people now that ordered revC1 boards.
<marcan> ah really
<whitequark> I think it should just be C2.
<esden> I will tweet about the mishap, hopefully these people will hear it and not make the same mistake I did. :)
<whitequark> numbers are cheap, if we're up to revC35 then so be it.
<marcan> whitequark: I really don't want to revbump the silkscreen for literally the exact same PCB
<marcan> like 1:1 identical
<whitequark> I don't see any other sane solution
<marcan> also another set of output files?
<whitequark> the old outputs can be renamed, like we don't have output files for revA
<marcan> yes we do?
<whitequark> oh
<marcan> we already talked about using master for minor engineering changes like this; this falls squarely into that use case. the only problem here is the git tag.
<marcan> maybe the tag should be a branch. that would solve the problem.
<whitequark> I am absolutely opposed to ever replacing any git tags past (say) 5 minutes after publishing. after anyone could have fetched the tag.
<marcan> yes, due to the practicalities
<whitequark> as for other solutions, I don't know, and I feel too awful for unrelated reasons to make any sort of decision here
<marcan> but we could just say revC1_p1 or whatever
<whitequark> revC2 would do and I do not have any energy to work out a compromise besides that
<whitequark> so it will have to wait an indefinite time until I do
<marcan> ok, well I'll fix master for now
<marcan> but really I think just tagging with a suffix should be fine
<marcan> it's the same design
<marcan> literally just swapping two labels in the BOM/assy layer, which we already agreed previously does not require a revbump
<marcan> (we talked about this)
<marcan> (we just never agreed on what to do about the tag)
<whitequark> hm
<whitequark> can we replace the tag with a branch?
<whitequark> or will git do something insane in that case?
<marcan> we can certainly make a branch, and they can coexist
<marcan> because really it's refs/heads/foo and refs/tags/foo
<marcan> if you don't specify, git says
<marcan> warning: refname 'revC1' is ambiguous.
<marcan> Switched to branch 'revC1'
<esden> ok restarted my computer: https://www.irccloud.com/pastebin/5LhlRj5U/
<whitequark> marcan: let's replace all rev* tags with branches then
<marcan> $ glasgow factory
<marcan> E: g.cli: device 04b4:8613 not found
<marcan> esden: ^^
<marcan> whitequark: that sounds reasonable
<marcan> whitequark: delete the old tags?
<whitequark> marcan: yep
<esden> it does find that if I disconnect the glasgow it says `E: g.cli: device 04b4:8613 not found`
<marcan> I think they will forever remain in clones unless manually deleted though
<marcan> like we can't push a deletion action
<esden> so it does not do the switch to the new id for some reason
<marcan> oh
<whitequark> marcan: yeah, that's probably basically fine
<esden> I will rework the remaining boards and see what happens.
<marcan> esden: run "glasgow -v -v factory"?
<esden> yeah something is off https://www.irccloud.com/pastebin/6wYaYtxa/
<esden> did I put the wrong flash in the wrong spot? :/
<esden> the fx2 led lights up though
<tnt> you might need to specify it's a revC ?
<whitequark> even if you swapped the flashes it'd probably have worked... probably
<whitequark> that said the factory command seems broken
<marcan> that looks like the firmware is broken
<whitequark> investigating
<marcan> or the factory command
<esden> I have downloaded and installed sdcc binaries from their website... (as that might be relevant)
<esden> sdcc-snapshot-amd64-unknown-linux2.5-20190616-11284.tar.bz2
<marcan> esden: replace your glasgow.ihex with https://mrcn.st/t/glasgow.ihex and see if that helps any
<marcan> whatever your problem is, I can't reproduce it
<marcan> maybe your firmware build is broken
<esden> yep that is it
<whitequark> oh you're using the NIGHTLIES of sdcc
<whitequark> using nightly compiler is... not wise
<marcan> okay that sounds more like a bug :p
<marcan> oh it's missing args?
<esden> whitequark: which exact version of sdcc to use is probably what we should list in the documentation. Just installing the ubuntu package is way too old if one decides to use LTS :D
<marcan> yeah
<marcan> glasgow factory --rev C1
<marcan> I think it just explodes if you don't pass a rev, that should be marked a required arg
<esden> `glasgow factory: error: argument --rev: C1 is not a valid revision (should be one of: A0, B0, C0)`
<esden> ;)
<marcan> lol
<whitequark> pf of course, give me a second
<esden> whitequark: FASTER :P ... (take your time I am just kidding)
<marcan> esden: you can probably use C0 for now :p
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fjaCk
<whitequark> esden: ^
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark 622c827 - cli: add --rev C1 support.
<whitequark> ah shit, we don't have the migen platform for c1 yet either
<marcan> c1 should basically just be c0 minus the "shit's broken yo" warnings, for now
<marcan> (later we'll mess with clkif/whatever too)
<whitequark> marcan: i think the sync port changed.
<marcan> somewhat
<marcan> but we don't use it much yet so
<esden> yeah no worries if flashed it using C0... is there a command to wipe it again? if I run factory now it complains it does not find the clean glasgow.
<marcan> you can use -f
<esden> ok
<marcan> er --force
<marcan> ah but since it'll look for the unprogrammed PID/VID, you need to short out the REC jumper (or the adjacent pins of the flash) while plugging it in
<esden> marcan: it complains that it does not find the cypress device then ...
<marcan> we should add a way to avoid that
* esden looking for the rec jumper
<whitequark> you can do it with `fx2tool`
<marcan> next to the flash
<esden> found it :)
<whitequark> fx2tool -d 20b7:9db1 write_eeprom -W 2 -a 0 -d ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
<marcan> ha
<esden> looking good, the shorting is easy with tweezers as I can just hold on to the so8 pins :)
<marcan> now run "glasgow selftest"
<esden> we should add that to --help output ;)
<marcan> er, glasgow run selftest
<marcan> looks like migen is too old, you probably need git?
<esden> ohh that is the missing framework that whitequark was talking about above?
<esden> ohh ok ... I need to update migen ... makes sense
<esden> or nmigen?
<whitequark> yes you need git migen. migen does not use releases by policy
<whitequark> which is dumb and which i will change
<whitequark> not nmigen for now.
<esden> ok
<marcan> looks like 0.9.1 was tagged 11 days ago?
<marcan> and it's even on pypi
<whitequark> hrm
<marcan> so I guess that should work?
<whitequark> yes
<marcan> esden: you just seem to have an old version
<whitequark> let me fix that then
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fjaCR
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark 08acfac - software: require migen 0.9.1 instead of git.
<esden> ok updated migen and pulled glasgow
<esden> I think we are in business! :D https://www.irccloud.com/pastebin/j9RobR3F/
<esden> I need put in some smaller resistors for the green LEDs still :D
<marcan> esden: looks like your FPGA survived, congrats!
<tnt> \o/
<marcan> (survived my idiocy)
<esden> hehe ... thanks ;) my fpga survived marcan WOOO! :P
* esden now wants to hand out hugs left and right ... who wants one... while they are free
<esden> hi fives also available :D
<tnt> o/
<esden> o/ :D
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/fjaCV
<whitequark> okay, one more fix for the factory command
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark 0630544 - device.hardware: allow overriding revision (for factory programming).
<electronic_eel> whitequark: now that esden got the internal selftest to run - how should a more in-depth test with a jig look like?
<marcan> I think with the pulls we can test a lot of stuff without any jig at all
<marcan> obviously not the LVDS port, but at least the main IOs
<whitequark> i think that fix doesn't do anything right now, but it will fix the logs saying "found revA0" which is just not true
<whitequark> and maybe prevent future bugs
<whitequark> electronic_eel: re jig: yes a jig should use another glasgow as a test runner
<tnt> pins-int and pins-ext with the external loopback cable is a good start
<electronic_eel> hmm, but how to test for correct voltages, like vio? and if vsense works?
<whitequark> vio and vsense are tested without a jig
<whitequark> just with loopback cable
<electronic_eel> ah, so vsense and vio crossed between the two ports
<marcan> anyway, I need sleep, it's 5AM here :p
<electronic_eel> marcan: good night
<esden> marcan: have a good night, thanks for the help :)
<electronic_eel> whitequark: so what is the purpose of the jig then when we have selftest and the loopback cable?
<electronic_eel> is it just to save time connecting things?
<electronic_eel> or also more analog tests, like voltage levels and exact current draw?
<whitequark> electronic_eel: the loopback cable doesn't scale
<whitequark> you need 1 second for a test and 10 seconds of fiddling with the cable to get it there
<whitequark> and it will also break quickly
<whitequark> neither the cable nor IDC connectors are nearly durable enough
<electronic_eel> ok, so mostly speedup and durability
<electronic_eel> the port headers - will they be soldered or not when the test is run?
<electronic_eel> that makes a big difference when connecting pogo pins
<electronic_eel> unsoldered is much easiers
<whitequark> likely unsoldered
<electronic_eel> ...easier
<whitequark> PTH is very expensive
<whitequark> and we don't have other PTH parts
<electronic_eel> very good
<electronic_eel> esden: do you have any test fixtures or something like it you currently use for other boards?
<esden> yeah it will be going out as a kit... "some soldering required" with additional service fee if one chooses to get the connectors pre-soldered.
<esden> electronic_eel: I have to admit that I do not really have a jig... I started making one for 1bitsy ... but that ended up just being a jig that shorts all the pins to ground...
<whitequark> wait what
<electronic_eel> esden: was that intended for the test or some quirk in the design?
<esden> it was meant as part of the test yes... I managed to basically do everything else as an internal test
<electronic_eel> whitequark: if the purpose of the jig is primarily making connecting the pins faster & reliable - what do we need another glasgow as test runner for?
<electronic_eel> I like to measure current in my tests, but that could also be done externally with a multimeter with remote interface
<electronic_eel> esden: do you have a bench multimeter or a better handheld one with remote interface?
<esden> I have a fluke 115
<esden> nothing more fancy than that
<electronic_eel> that doesn't look like it has any remote interface
<esden> it has some magnetic managing accessory ... not sure how capable that is
<esden> I would also get that... I might need to get a better multimeter with a remote interface ... :)
<esden> the sockets on the left were supposed to hold SPI gpio extenders at some point...
<esden> and another 1bitsy to run the show
<esden> I think here it would make more sense to just order the correct mechanical design jig from aliexpress
<electronic_eel> how did you position them at the right spot?
<esden> the pogopins just fall into the through holes of the 1bitsy very easy to align
<electronic_eel> ok, but i guess that won't work that well for the glasgow as the usb pins are at the other side of the board from the port pins
<esden> yeah totally, I would really rather get a "proper" jig from china... they make those a lot
<esden> I really like the jig approach from bunnie and xobs...
<electronic_eel> do you have a link to one of those?
<esden> electronic_eel: I asked xobs before, he said ... just search test jig on aliexpress ;)
<esden> one has to send them all the mechanical data... I am not sure how those look like
<electronic_eel> yeah, communicating that to the seller is probably the problem here
<esden> I will ask xobs for more information of what they submit to them and how.
<electronic_eel> there are also some bare off the shelf ones available: https://www.aliexpress.com/item/32919411165.html
<esden> whitequark: I think there are more places where revC1 might be missing. :) https://www.irccloud.com/pastebin/2lp2wuHc/
<tnt> esden: definitely interested of your experience with those :
<esden> electronic_eel: I personally would prefer getting one with the holes milled and pogopins already inserted. But yes getting a bare one is also an option.
<esden> tnt: I bet you do. ;) ... no worries I will tweet up a storm about all this ... you know me :)
<whitequark> esden: yes just talked about it before
<esden> ok sorry
<whitequark> that's the missing migen platform
<esden> curious why it worked the previous time then...
<esden> I did something differently I guess.
<whitequark> i think you flashed C0?
<esden> ohh right I flashed C0 replugged and then it worked... in the mean time I flashed C1 and kept going... after another replug it went to C1 and that is what made selftest complain
<esden> all makes sense now
<esden> I just went in history
<esden> *I just went back in my terminal history to confirm
<esden> ok I will stick to C0 for now so I can test things :)
futarisIRCcloud has joined #glasgow
<whitequark> esden: C1 platform should work now
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+1/-0/±4] https://git.io/fjalI
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark 5216b3e - platform: add revC1 support.
<esden> awesome! testing
<esden> do I need to pull anything form migen to make that happen?
<esden> `NameError: name 'GlasgowPlatformRevC1' is not defined`
<esden> I did run setup again ... not sure what I am missing
<tnt> esden: btw, instead of setup install you can do setup develop so that it always uses the latest files from the git tree.
<esden> ohh i did the develop one as that is what the documentation recommends
<esden> I did not know what that does ;)
<whitequark> esden: ugh shit, sec
<whitequark> esden: fixed
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fjal8
<_whitenotifier-3> [GlasgowEmbedded/Glasgow] whitequark 2ac3952 - platform.rev_c1: fix typo.