We’d wager most hackers are familiar with FTDI as the manufacturer of the gold standard USB-UART interfaces. Before parts like the ultra cheap CH340 and CP2102 became common, if you needed to turn a USB cable into a TTL UART device, “an FTDI” (probably an FT232RL) was the way to make that happen. But some of the parts in the FT232* family are capable of much more. Wanting to get at more than a UART, [linker3000] designed the Shukran to unlock the full potential of the FT232H.
The FT232H is interesting because it’s an exceptionally general purpose interface device. Depending on configuration it can turn USB into UART, JTAG, SPI, I2C, and GPIO. Want to prototype the driver for a new sensor? Why bother flashing your Teensy when you can drive it directly from the development machine with an FT232H and the appropriate libraries?
The Shukran is actually a breakout for the “CJMCU FT232H” module available from many fine internet retailers. This board is a breakout that exposes a USB-A connecter on one side and standard 0.1″ headers on the other, with a QFN FT232H and all the passives in the middle. But bare 0.1″ headers (in a square!) require either further breadboarding or a nest of jumper wires to be useful. Enter the Shukran. In this arrangement, the CJMCU board is cheap and handles the SMT components, and the Shukran is easy to assemble and makes it simple to use.
The Shukran gives you LEDs, buttons and switches, and a bunch of pull up resistors (for instance, for I2C) on nicely grouped and labeled headers. But most importantly it provides a fused power supply. Ever killed the USB controller in your computer because you forgot to inline a sacrificial USB hub? This fuse should take care of that risk. If you’re interested in building one of these handy tools, sources and detailed BOM as well as usage instructions are available in the GitHub repo linked at the top.
If you just need cheap uart to usb, I suggest using bluepill with pill-serial firmware (https://satoshinm.github.io/blog/171223_stm32serial_triple_usb-to-serial_adapter_using_stm32_blue_pill.html). It gives you 3 uarts (3.3v) on one board. You can get blackmagic probe firmware and the same board will be jtag/swd debugger (like, proper debugger with breakpoints which you can use in almost any open source IDE).
We are planning on adding those 3 serial ports of the Bluepill to DirtyJTAG:
https://github.com/jeanthom/DirtyJTAG/issues/29
The 3 serial ports of Pillserial is broken, the author is not merging pull requests fast enough:
https://github.com/satoshinm/pill_serial/pull/11
I needed 3 serial ports recently, and thought I was good with a Blue Pill / STM32F103, but the processor on the board is what’s called a “medium density” part in ST’s taxonomy, and those only have 2 HW serial ports.
I ended up doing one serial over USB, and the other two using the HW serial, so my problem was solved.
But is this suggesting that you can use 3 HW UARTS on the Blue Pills? Or are they counting the USB one as well?
3 HW uarts, but when you are using usb, you can’t use hardware rts/cts on usart1. Otherwise usb is not counted as usart port.
Looking back at the data sheet, it looks like you’re right!
Ah… I have some other boards with the F103T8 parts on them — they only have 2.
Sorry, irrelevant. Nevermind.
Very cool.
As I’m interested in the Blue Pill I compiled Satoshinm on 2018-10-22 and flashing it in a blue pill.
Did some tests with attaching 2 terminal windows to those serial porst and connecting the Txd -> Rxd lines on a breadboard.
And indeed it worked on all 3 serial ports. Text entered in one window reappeared in the next terminal emulator.
I have not done any stress testing though, just manually typing some characters.
After that my attention wavered and I drifted off into some other direction.
About ftdi… Ever since ftdi gate I boycot that company.
https://hackaday.com/tag/ftdigate/
“Ever since ftdi gate I boycott that company.”
That’s one of the main reason behind the efforts to create DirtyJTAG. FTDI is the ‘default’ when it comes to JTAG interfaces. Actually DirtyJTAG came from the frustration to make Versaloon firmware working:
https://github.com/zoobab/versaloon
The original source code of Versaloon was a real zoo, with hundreds of files, Jean Thomas (the main author of DirtyJTAG) removed a lot of unused code. But at the end the furstration was so high that he decided to make his own. I met him at FOSDEM this week-end, the OpenOCD will be soon there.
Some HaD articles about Versaloon in 2011:
https://hackaday.com/2011/02/06/versaloon-ported-to-stm8-and-stm32-discovery-boards/
https://hackaday.com/2010/12/25/versaloon-can-program-hardware-from-several-manufacturers/
And we will take some code from pillserial to add another serial port to the bluepill, so that you will have JTAG+serial on one board.
Yes, I have tried that a year ago or more but it didn’t not work correctly.
You can try this one instead:
https://github.com/ivpri/mecrisp_pillserial
There is no hw RTS/CTS yet but it is definitely possible to add, maybe I do it sometime in the future…
Marvelous. Looking into the way you mixed Mecrisp with the opencm3 libs… that’s two of my favorite softwares put together!
Anybody else catch the pun?! Shukran means thanks in arabic.. And in other context it would mean no thank you.
So what are you gonna use for prototyping.. Shukran.. In Egyptian dialect as i know.. This would be within the lines of fuck off and find someone else to do it.. Or no thanks I’m fine.. Implies no need.
Shukran for reading this far.
Oh neat, I wasn’t expecting that. It’s early for me so I thought it was a misspelling of Shuriken.
I wonder if the author made the same mistake – one may slice through problems with a shuriken, but is unlikely to do so with a shukran…
Maybe if the PCB has sharp edges?
😁
Ha, i just posted that on his git hub under Issues asking it?
Shukran for trying to get to the bottom of shukran
Off one!
B^)
Forgot to mention that you can use FTDI chips as 10MHz (60MHz with some hacks) logic analyzers with sigrok/pulseview software:
https://sigrok.org/wiki/FTDI-LA
Amazing!!
I wonder how long it will take till we can do giga samples that would put today’s TOTL scopes to shame using 99 cent fpgas or asics.. Just like what happened to wifi when the esp8266 showed up
Are there super cheap fpgas like that yet?
Yes. Development boards start at $7. For like $20 to $30 you can get decent FPGA board (eg. IceBreaker with Lattice ICE40 = 5000LUTs and 48pins, free aliexpress shipping.)
IceBreaker huh? Anyone run it against Tessier-Ashpool?
Xilinx Spartan6 15k LUT + 32MB SDRAM $18 https://www.aliexpress.com/item/32851234772.html
Lattice iCE40 and ECP5 have the advantage of an opensource toolchain though.
(In theory some of the Spartans are supported by SymbiFlow, but only partial support from the looks of it.)
Some of us care more about getting more usable logic, memory space and a more mature toolchain at the same price range than being opensource vegans.
One part I’m excited about is the Gowin GW1NSR-4C. They’re still the new kid on the block but it contains a Cortex-M3 hardcore @100MHz, 4k LUT4 fabric, 8MB (yes bytes) embedded SRAM. $1.70 at volume… Could certainly make a logic analyzer out of it with 8M depth at 8bit.
The Gowin GW1NSR series does sound pretty good with ARM core, USB 2.0 PHY and workable QN packages (-2C part)
There are other options.
The first i used was a Bus Pirate.
Because i neede more Speed esp. in JTAG, I now use TUMPA (TIAO USB Multi Protocol Adapter) with FT2232H
See also this other CJMCU FTDI board, with dual row of pins, a pain in the butt for breadboards:
http://www.zoobab.com/cjmcu-ft2232hl
Still no linux kernel support for toggling GPIOs though:
http://www.zoobab.com/ftdi-gpios-sysfs
One day we will get there.
This is the FTDI that got a windows update pushed out to brick counterfeit chips, right? Nice, except most of the time the end users didn’t know they had one. https://hackaday.com/tag/ftdi-gate/ I might approach this one with utmost caution (and, I dunno, maybe OpenBSD? [grin] )
Yes, that FTDI. Instead of starting the article with “We’d wager most hackers are familiar with FTDI as the manufacturer of the gold standard USB-UART interfaces.” it should be “We’d wager most hackers are familiar with FTDI as the assholes who bricked other people’s hardware ON PURPOSE.”
To do ESP32 JTAG debug, I had to get the ftdi 2232 dev board; no OpenOCD drivers worked with the 232 chip. I suspect the problem in using ftdi 232 single-port chip was with the openocd driver because it worked ok to burn code using the arduino IDE atmel driver or function as a serial port, but couldn’t do jtag.
FTDI has a terrible history of weaponizing their device drivers. Hard pass.
Yeah, that was the most despicable thing I’ve ever witnessed.. It made me and others never buy ftdi again, cause if we can’t tell the genuine from the fake then we’re bound to pay the premium and still get bitten.. It doesn’t make sense when there are other cheaper and reasonable options.. Like the ch340 for example..
Otherwise it only goes to an embedded system that will not connect to a computer anyway..
How is it reasonable that someone’s tools brick when they had no idea how the supply chain works.. I’d understand if it bricked them during manufacturing or assembly.. But sabotaging it after it reached consumers hands is akin to a declaration of war.
I was mad at them for a long time after the bricking update. But their chips (the genuine ones!) Just Work. And their application notes are wonderfully readable.
Ch552, 0.20 usd, a jtag firmware that emulates an ft2232:
https://github.com/zoobab/ch55x_jtag
I ordered some chips from Ali, but with coronavirus, it will take a while to arrive…
I could not find a source in Europe anyway…
Cool, I’ll check that out!
I want a gizmo to connect Ultra 320 SCSI to USB 3.0