I’ve started writing the firmware for my Retrochallenge project. For the USB to bubble memory interface, I’m using a Texas Instruments EK-TM4C1294XL “Tiva™ C Series TM4C1294 Connected LaunchPad Evaluation Kit”, which is based on the Tiva TM4C1294NCPDT microcontroller. This has a 120 MHz ARM Cortex-M4F core, USB, 10/100 Ethernet (including PHY), and an external bus interface (EBI).
There’s some irony in that the bubble memory board I’m interfacing to USB provide 1 Mbit (128Kbytes) of non-volatile bubble memory storage, while the microcontroller has 8 Mbits (1 Mbyte) of internal flash memory. C’est la vie.
The Intel D7220-1 bubble memory controller has a fairly typical peripheral interface, with an 8 bit data bus, one address line, chip select, read and write strobes, and interrupt and DMA request outputs. I’ve previously used the Tiva external bus interface to interface to a Western Digital style floppy disk controller chip (actually a Fujitsu MB8877A), and this interface is electrically similar. The D7220-1 is a 5V NMOS devices, and the Tiva does not have 5V-tolerant I/O, so I will have to use external level shifters.
I installed TI’s Code Composer Studio 6.2.0 and the TivaWare SDK 126.96.36.199 on my Fedora 24 system. Although TI doesn’t officially support Fedora, it works fine.
I dusted off the code I used to talk to the floppy controller and ripped out everything specific to the floppy, to use as a base for the software for this project. What’s left is the initialization for the UART and EBI, and DMA code to do write transfers over the EBI.
The D7220-1 requires a 4 MHz clock, so I wrote code to initialize one of the Tiva timers in PWM mode to produce the clock. It took about 5 minutes to write the code, and about an hour to attempt to debug it. The PWM output appeared to be stuck at 0. I put in code to toggle the GPIO pin without using the timer, and the pin still stayed at 0. I ultimately discovered that I was looking at the wrong logic analyzer channel. Actually the timer code worked just fine.
Next I’ll try adding some USB code. I’m considering using FreeRTOS, though I probably could get by just fine with no RTOS.