Friday, 2020-04-24

*** tpb has joined #tomu00:00
*** CarlFK has quit IRC00:40
*** stv0g has quit IRC00:42
*** futarisIRCcloud has quit IRC01:12
*** im-tomu has left #tomu01:17
*** im-tomu has joined #tomu01:17
xobsacathla: It's either GD25Q16CEIGR or MX25R1635FZUIH0 -- they're footprint-compatible.  w25q128jv_dtr was used in the EVT boards.01:17
*** CarlFK has joined #tomu01:17
xobsI told the assembly shop they could use whichever has the lower leadtime and made more sense.  Unfortunately, the PCB itself has turned out to be the most difficult component to source.01:18
CarlFKxobs: you are most likely to help with a friends quest for a 4:3 ratio lcd touch screen01:19
CarlFKquantity 5, so having one custom made is a no.01:19
xobsDoesn't Adafruit sell one?01:22
polloCarlFK: that one isn't 4:3, but kinda near it?
tpbTitle: Resistive Touch screen - 3.7 Diagonal ID: 333 - $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits (at
polloweird ratio01:28
pollothat's a 4:3 touch screen thougH:
tpbTitle: 2.8 TFT Touch Shield for Arduino with Resistive Touch Screen ID: 1651 - $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits (at
xobsThat's the one I was thinking of!01:30
CarlFKxobs: pollo: hey look at that.  thanks01:30
xobsNice find.01:31
*** CarlFK has quit IRC01:40
*** CarlFK has joined #tomu01:57
*** wrtlprnft has quit IRC02:15
*** wrtlprnft has joined #tomu02:16
Toba[email protected]02:19
Tobaif you can guess what website this account is for you are welcome to it :p02:19
Tobayeah, it's for the hunter2 site02:22
*** andi- has quit IRC02:47
*** emeb has quit IRC02:49
*** andi- has joined #tomu02:49
*** im-tomu has left #tomu02:56
*** im-tomu has joined #tomu02:56
*** tcal has quit IRC03:36
*** tcal has joined #tomu03:48
*** futarisIRCcloud has joined #tomu04:28
CarlFKxobs: pollo: dave says: Too small though. i need something along a 4.7-5.0"06:42
CarlFKhe is making a tablet06:43
*** CarlFK has quit IRC06:55
*** im-tomu has left #tomu07:14
*** im-tomu has joined #tomu07:14
*** CarlFK has joined #tomu07:33
daniellimwsxobs: I wrote a UART serial port in Verilog and would like to test it on the Fomu, but Fomu doesn't have the tx/rx pins right? How did you guys send serial data over USB like you guys did with the micropython core?07:51
xobsdaniellimws: that's done having Fomu enumerate as a USB device that happens to be serial. There's no real "UART" present.07:53
daniellimwsbtw this is too good to be true, generating a bitstream takes less than 5 seconds (in vivado I would expect at least half a minute for a simple design...)07:53
xobsWhich is why, as an interesting side effect, you can set whatever baud rate you want.07:53
daniellimwsOh so how do I set it up? Do I just assign the usb pins to my tx/rx?07:54
xobsYeah, you could use the "touch" pins for that.  Fomu designed more for exploring an FPGA through working with it at a system level.07:55
xobsIt's not super easy to attach flywires to it, so doing things like a UART tend to require a soldering iron to attach to the pins.07:56
xobsThere was talk of doing a breakout board using flex.  Maybe someday...07:56
daniellimwsIs there anywhere the pin information is documented? For example, what does the touch_1-4 pins do?07:57
xobsMost of what we do is communicate to the FPGA via the wishbone bridge.  That makes it easy to, for example, make your module in Verilog and then import it into a virtual SoC and manipulate it over USB.07:57
xobsdaniellimws: they're wired directly to the FPGA. (Well, with a TVM diode along the way...)07:57
xobsThe schematic is at
tpbTitle: fomu-hardware/tomu-fpga-pvt1.pdf at master · im-tomu/fomu-hardware · GitHub (at
MadHackerxobs: edge-mounted turned-pin sockets, act as both 0.1" sockets but are still good touch-pads?07:58
MadHacker(hypothetical fomu upgrade)07:59
daniellimwsxobs: Oh thanks07:59
xobsMadHacker: My thought was to interpose a flex pcb between the USB contacts and Fomu.  No idea how well that would work, or how I would also ensure contacts to the touchpads.08:00
daniellimwsSo to use serial through USB, do I use the usb pins directly?08:00
MadHackerHm. You're really going to end up with something pogo-pin-y if you don't solder it down I think. :/08:00
xobsdaniellimws: You can check out the workshop.  Skipping to the middle, there's a section that shows how to create a device, put it on the Wishbone bus, and access it from the host:
tpbTitle: Migen and LiteX FPGA Tomu (Fomu) Workshop 0.1-179-g1f77f08 documentation (at
MadHackerYou do get those tiny surface-mount spring-loaded contacts, rather than pogo-pins, so those on a flex and a little laser-cut sandwich of acrylic would do, I suppose.08:02
daniellimwsAlright, thanks!08:02
MadHackerSo, USB->flex->spring contacts mounted on flex->fomu trapped in an acrylic box?08:02
xobsMadHacker: That could work. I'm wondering how difficult it would be to create something that looks a little like an old Game Genie for NES.08:05
* xobs uploaded an image: image.png (201KB) < >08:05
xobsExcept in reverse, with the "Game Genie" being on the outside and covering the touchpads, and the black bit being PCB and providing 5V/GND on the USB contacts.08:05
MadHackerHm. A bit like a hinged SD card holder?08:06
xobsI suppose a specialized plastic case could do it, too. A shame they're so expensive to cut tools to make.08:09
MadHackerYeah, it's that MOQ it takes to pay off the tool that's the pain.08:10
MadHackerI mean, I guess that quantity is 1 if you're OK with £10k per piece. :D08:11
MadHackerIt's actually possible to do small quantities for injection moulding if you're OK with fast tool wear-out. It's actually doable to 3D print (resin-based) moulds, or CNC them out of relatively soft materials like aluminium, if you don't need big runs.08:12
MadHackerOne of my friends has some small-scale injection moulding gear I keep meaning to play with. The sort of thing where you sit and pop the parts out yourself, rather than ejector pins doing it.08:12
xobsTrue, but in China at least from what I understand the cost delta between a "soft tool" and a "hard tool" is just a few hundred dollars.  Might as well top up for 1k -> 200k yield increment.08:12
MadHacker was interesting.08:13
tpbTitle: Injection Molding from 3D Printed Molds | Formlabs (at
xobsThat's interesting!08:13
xobsThe Fomu case is interesting in that it can't be 3D printed, only injection molded.08:14
MadHackerIt's the quick turnaround that's appealing for me. Small-scale injection gear is absolutely something you can have in a garage.08:14
CarlFKI bet most of the people that want a fomu glove have access to a 3d printer08:14
xobsI threw the STEP file from the factory for the case at Form Labs' PreForm software and it just went.... No.08:14
MadHackerInteresting. I wonder why?08:15
MadHackerI printed one off on a hi-res FDM printer at one point. Turned out OK but the edges were a bit squishy.08:15
xobsCarlFK: that's a good point. And gives me an idea.08:15
xobsMadHacker: It's mostly caused by the lifter pin.08:16
MadHackerxobs: If you're designing something for people to print, look hard at spring contacts on a PCB vs. pogo pins. Pogo pins are a pain in the neck to solder neatly for most people.08:16
MadHackerGimme a mo, I'll find the thing I'm on about.08:16
MadHacker'tis like a tiny sub-mm high pogo pin for smushing between two PCBs.08:17
xobsIt really doesn't like this bit:08:17
* xobs uploaded an image: image.png (55KB) < >08:17
MadHackerBut surface mount places like it's just a resistor or something.08:17
MadHackerAh right. Probably the sharp overhang on the retention clip more?08:17
MadHackerThat bit looks impossible to support properly.08:18
xobsYeah.  There's one on the other side, too.08:18
MadHackerA slight retention bulge right down the edge instead would be printable and probably hold OK?08:18
MadHacker<rummages for a fomu on the desk>08:18
xobsFor reference, this is the actual STEP file from the factory that was used to create the case:
tpbTitle: fomu-hardware/fomu case v5.step at master · im-tomu/fomu-hardware · GitHub (at
MadHackerYeah, it looks like there's space to run a little lip along that edge instead of rely on retention at the corner. Did you avoid that because of the mouse-bites for breakout being unpredictable?08:19
xobsThat was at the recommendation of the factory, to allow the plastic to deform slightly to aid in retention. The mouse bite thing was largely incidental, and ended up not being used on some boards because they actually routed them out with a CNC bit.08:21
xobsI'd need to do some testing, but it may be possible to create a small rectangle that can be easily 3D printed to act as a kind of scrunchie to bind the flex PCB to Fomu. We'd need to tune the thickness of the srunchie, and it would depend on your printer's material.08:23
xobsI guess most people use FDM?  Which I thought had a print depth of 0.1mm.08:24
MadHackerFDM's somewhat negotiable; it depends on your nozzle size.08:24
MadHackerYou want to target about 2/3rds of your nozzle diameter in layer thickness normally, but you can go a bit smaller. People do 0.1mm on a 0.3mm nozzle sometimes. The smallest nozzles are 0.15mm.08:25
CarlFKyou can print "springs"08:26
CarlFKwhich can be a simple tab that flexes a little when you push08:26
xobsWell, the Fomu PCB is 0.6mm, and I think I can get 0.1mm flex pcb. Rigi-flex would be nice, but that's more expensive. So if you print a srunchie that has a ~0.7mm aperture, the friction ought to be enough to keep good contact.08:27
MadHackerYou can do a sliding fit box lid in 3D printing reliably enough, so some low-profile pogo pins like (not the ones I meant earlier, can't find those) and just put the flex and the fomu in the box and close the lid?08:32
tpbTitle: Ultra-Low Profile Spring-Loaded (Pogo) Connectors | Mill-Max Mfg. Corp. (at
MadHacker(with a gap at one end of the lid for the flex, of course)08:32
MadHackerThe problem is that this is more expensive than just making an extended fomu with contacts.08:34
xobsThe icebreaker is a perfectly viable board :P08:34
xobsMadHacker: interesting product. what's the name of the stuff they (used to?) use in calculators to interface with the LCD? Something like "Z-strips" maybe?08:36
xobsZebra strips?08:36
MadHackerZebra strip.08:36
MadHackerYeah, it's still very available. It has very low squish factor tho.08:37
daniellimwsxobs: When trying micropython and connecting to it using screen, I realized that after running wishbone-tool to read/write memory once, screen stops receiving data from the serial communication. Is there anyway I can re-enable it?08:37
MadHackerFor something quick and hacky, Z-axis tape is totally a thing tho!08:37
MadHackerCould use that and just tape the fomu to a flex.08:37
xobsMadHacker: it's true! that's what's on the back of circuit stickers.08:37
MadHackerShould have reasonable numbers given the USB pad contact area is pretty big.08:37
MadHackerYup, if anyone knows about Z-axis tape, it's you. :)08:37
xobsdaniellimws: odd. when you read memory?08:38
xobsThat's certainly a bug, and I'm not sure immediately what would cause it, unless the CPU has crashed.08:38
daniellimwsOh, only when writing memory08:39
daniellimwsI was reading and writing from 0x10000000 as shown here
tpbTitle: Migen and LiteX FPGA Tomu (Fomu) Workshop 0.1-179-g1f77f08 documentation (at
MadHackerHeh. Giant fomu board with 4mm sockets and just a normal one Z-axis taped down to the centre?08:39
daniellimwsAfter writing, the micropython session stops working, but wishbone-tool still manages to read the correct value from 0x1000000008:40
xobsI wonder what's at offset 0x10000000...08:41
daniellimwsIs that program memory :P08:42
xobsIt is, it's the start of RAM.08:42
daniellimwsOh ma bad08:42
xobsYeah, if tinyusb stuck its control structures there, writing to that address could do bad things :)08:43
xobsMadHacker: at some point it's just another Fomu test jig.08:44
MadHackerSure, with the giant 4mm sockets thing I was thinking almost more an educational "this is what's inside" diagram sort of version.08:45
MadHackerI wasn't thinking minimal hacker test jig, because as you say, that's just a test jig or something where a different board is better.08:46
MadHackerThink giant 555. :D08:46
xobsOoh, yeah.08:46
MadHackerHm. Fun educational board. A matrix of tiny OLEDs, each showing a gate/LUT and some wiring, showing the guts of a very small FPGA on a very large scale. :D08:48
xobsdaniellimws: also, for extra awesomeness, give circuitpython a shot.08:48
daniellimwsxobs: Just tried it, any difference between it and micropython?08:52
xobsGrab the DFU file from
tpbTitle: S3 Bucket Listing Generator (at
xobsThe immediate thing you'll notice is how slow it is.  That's a bug and I want to fix it :(08:53
daniellimwsYup downloaded it from there08:53
daniellimwsOh I didn't notice anything :p08:54
xobsThe next thing you'll notice is just how nice it is to use.  It shows up as a mass storage device, you can talk to it over the virtual serial port, and you can have it act as a USB keyboard, mouse, or game controller.08:54
xobsJust mount the USB hard drive and save a file called ``. It'll pick it up and execute that file every time you save.08:55
daniellimwsOh I notice the slowness now, when using machine.mem3208:55
daniellimws(which just gives me an error saying no module named 'machine', but the text comes out character by character)08:57
xobsThat has to do with it being XIP SPI, and the SPI flash module currently isn't so great.08:58
xobsBut the great thing about an FPGA is that, while the current version works, a hardware upgrade is just a firmware update away.08:58
xobs(The CPU is 12 MHz, but the SPI access rate causes it to run at ~1 MHz)08:59
daniellimwsI saw in the blink.v examples that the board's clock speed is 48MHz, right?09:00
xobsYes, the crystal runs at 48 MHz.09:00
xobsThe USB core does 4x oversampling on the 12 MHz USB signal, and everything else runs at 12 MHz, including the CPU.09:01
daniellimwsOh so everything that interacts with USB? And since the LED driver doesn't, it can run in 48MHz?09:02
acathlaxobs, what about quad spi, DDR and maybe other stuffs? Can it be used?09:03
xobsIt's more that we have only one PLL.  There is a domain crossing in the USB core, and part of it is in 48 MHz with the other part in 12 MHz.09:04
xobsWishbone runs at 12 MHz, as does the CPU.09:04
xobsacathla: We're actually using quad SPI! On PVT and EVT at least.  The problem is that there's no cache, so we're relying on the CPU's icache. So every instruction requires it to issue a new address request,09:05
xobsAlso, the SPI core requires at least a /2, so the SPI core is only running at 6 MHz.09:05
xobsThe hack is to make the SPI core simple enough that it can run in the 48 MHz domain, which is what litespi aims to do:
tpbTitle: GitHub - litex-hub/litespi: Small footprint and configurable SPI core (at
daniellimwsxobs: Do I need my design to be in migen to use litex-buildenv? Currently I have my design in Verilog (only knew about migen this week, and it looks attractive)09:11
xobsdaniellimws: I'm not sure, that's a tough question. I *think* `litex-buildenv` is a conda environment that provides packages such as nextpnr and yosys, which can work with anything.09:11
xobsIf you want to use `litex`, which is what the Fomu boot ROM uses (and, by extension, what Circuitpython runs on), then you need to at least make a litex wrapper around your Verilog code, but you can still use Verilog if you want.09:12
daniellimwsAh yes that's what I meant09:13
xobsUnfortunately, litex is fast moving and most documentation consists of "copy this design".09:13
xobsFor example, here is an i2c module we use in Betrusted that is battle-tested verilog code that's been wrapped in a litex wrapper:
tpbTitle: gateware/ at master · betrusted-io/gateware · GitHub (at
xobsOne nice thing about using litex is that you can get automatically-generated reference manuals.  For example, when we build an image for betrusted, it generates this manual entry for that i2c block:
tpbTitle: I2C LiteX SoC Project documentation (at
daniellimwsWell all these tooling are just too good. I would have been so frustrated if I only knew about the proprietary tools.09:26
*** CarlFK has quit IRC09:45
*** wrtlprnft has quit IRC11:27
*** wrtlprnft has joined #tomu11:28
*** wrtlprnft has quit IRC11:36
*** wrtlprnft has joined #tomu11:37
*** im-tomu has left #tomu12:56
*** im-tomu has joined #tomu12:56
*** stv0g has joined #tomu14:51
*** emeb has joined #tomu15:48
*** tcal_ has joined #tomu16:50
*** tcal_ has quit IRC16:53
*** tcal_ has joined #tomu16:53
*** TheJJ has quit IRC17:15
*** tcal_ has quit IRC17:35
*** TheJJ has joined #tomu17:42
*** AnimaInvicta has joined #tomu18:26
*** CarlFK has joined #tomu18:28
*** tcal_ has joined #tomu20:58
*** tcal_ has quit IRC21:08
*** tcal_ has joined #tomu21:08
*** tcal_ has quit IRC21:12
*** tcal_ has joined #tomu21:19
*** AnimaInvicta has left #tomu21:34
*** tcal_ has quit IRC21:37
*** tcal_ has joined #tomu21:51
*** tcal_ has quit IRC22:03
*** emeb has quit IRC23:39

Generated by 2.17.2 by Marius Gedminas - find it at!