Phoenix Air - WiFi for the H5 Phoenix

All the good stuff hardware and software wise for the Phoenix H5 series motherboards.
Post Reply
User avatar
exxos
Site Admin
Site Admin
Posts: 29919
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Phoenix Air - WiFi for the H5 Phoenix

Post by exxos »

ST_WIFI_3A_3D_iso.png
ST_WIFI_3A_3D_iso.png (551.33 KiB) Viewed 91 times

I have been working on a new board for the H5 Phoenix, and it now has a name, Phoenix Air. It is a WiFi board for the Atari, designed with TLS support from the start, so things like HTTPS and secure mail are possible without a PC doing the hard work in the background.

It plugs into one of the 68k IO sockets on the Phoenix. Those sockets are copies of the 68000 CPU socket, so the board sits right on the full 16-bit bus. It does not use the cartridge port at all, so cartridges can still be plugged in and used at the same time.

The hardware is fairly simple. Two ATF1502 CPLDs handle the address decoding and the data side, and talk to an ESP32-S3 module over SPI. The module is the WROOM-1U version with 16MB of flash and 8MB of PSRAM, which gives TLS enough room to work in. It has a u.FL socket rather than an antenna on the module, so an external antenna on a short lead is needed. All the parts are on the top side, and the whole board fits inside the outline of the 68000 DIP64 footprint, about 81 x 25mm, on a 4 layer PCB.

On the software side, the ESP firmware is my own, and so is the network driver on the Atari. The driver will be STiNG and STiK compatible, the aim being that existing network programs work without any changes. The ESP does all the TCP/IP and TLS work, and the Atari just moves the data in and out, which keeps the load off the 68000.

As for speed, on paper the bus side works out at around 1.1 to 1.3MB/s in each direction on an 8MHz machine, and the limit there is the 68000 copy loop rather than the board itself. That is a calculated figure, not a measured one, so I will post real numbers once the boards are running.

Test boards have been ordered from JLC. The CPLD logic, the ESP firmware and the driver are all still to be written, so there is a fair bit of work to do yet. I will post updates as it comes together.
User avatar
PhilC
Moderator
Moderator
Posts: 7755
Joined: Fri Mar 23, 2018 8:22 pm

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by PhilC »

Added to my want list :dualthumbup:
If it ain't broke, test it to Destruction.
User avatar
JezC
Posts: 2922
Joined: Mon Aug 28, 2017 11:44 pm

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by JezC »

Me too - and I might even get an H4/H5 board to the point where it is ready to use it! :lol: :roll:
User avatar
exxos
Site Admin
Site Admin
Posts: 29919
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by exxos »

I see soldering and firmware in my future...

wifi.jpg
wifi.jpg (122.88 KiB) Viewed 43 times
User avatar
exxos
Site Admin
Site Admin
Posts: 29919
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by exxos »

Both ATF1502s showed up on the JTAG chain first time, which is always a relief. Getting the firmware to actually fit was another matter. The address decode chip went in without a fuss, but the data/SPI chip took four attempts before the fitter would place it. The logic was fine, it just ran out of routing inside the chip, so it needed a bit of rearranging until everything had a path. It now fits and passes the full simulation.

I then ran a small test program on the ST to check the CPLD side without any ESP firmware. It checks the control register, switches the ESP chip select on and off, does a load of data reads and writes to make sure every access gets DTACK back, and then times raw transfers.

Everything passes, including from a cold boot. The raw speeds in a tight loop came out at about 1190KB/s for writes and 1365KB/s for reads. That is just the bus side in an unrolled loop, so real copy loops and the network side will be slower, but it shows the hardware interface is doing its job.

Screenshot of the test results and some pictures of the board attached.

Next up is the ESP32 firmware. Of course some dumbass forgot to put a USB socket on the PCB to actually program the WiFi module. There are pads on the bottom to solder to, so I have had to order a USB breakout board to hack it together. Once the first firmware is on it, it should be able to update itself over WiFi, so with any luck that is a one-off.

I have also ordered an antenna, as the module uses an external one on a U.FL connector. Hopefully both turn up tomorrow and I can get some actual WiFi traffic going.

IMG_5527.JPG
IMG_5527.JPG (295.69 KiB) Viewed 28 times
IMG_5528.JPG
IMG_5528.JPG (70.51 KiB) Viewed 28 times
User avatar
Icky
Site Admin
Site Admin
Posts: 4456
Joined: Sun Sep 03, 2017 10:57 am
Location: UK

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by Icky »

exxos wrote: Mon Nov 30, 2026 4:02 pm I see soldering and firmware in my future...
I see :fire: :hide:
User avatar
exxos
Site Admin
Site Admin
Posts: 29919
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Phoenix Air - WiFi for the H5 Phoenix

Post by exxos »

Phoenix Air update, or how a five minute job took all evening.

So the plan was simple. Parts arrive, wire a USB lead to the board, flash the ESP32, done. What could possibly go wrong.

First problem, some genius (me) designed the board with no USB socket on it. There are pads for it on the bottom, so technically it can be programmed, in the same way that technically you can drive to Scotland in first gear. Next board gets a proper socket. While I am at it, the JTAG header is going to move a couple of mm away from the 68K pins as well, because I managed to short both headers while soldering the JTAG header on. Lovely.

So I ordered a little USB breakout board and wired it to the pads on the underside of the PCB.

PAIR02.jpg
PAIR02.jpg (119.98 KiB) Not viewed yet
PAIR03.png
PAIR03.png (295.76 KiB) Not viewed yet

Then I needed an A to A USB cable to get from that to the PC. Could I find one? Of course not. So two cables got the chop and became one Frankenstein cable, wired straight through.

PAIR01.jpg
PAIR01.jpg (193.83 KiB) Not viewed yet

Plugged it in and Windows actually saw the ESP straight away, so the wiring was right first time. Then Windows 7 decided it had no idea what it was and refused to install any drivers.

PAIR04.png
PAIR04.png (32.5 KiB) Not viewed yet

Fine, there is a tool called Zadig for exactly this sort of thing. Except you tick "list all devices", pick the ESP interface, the list jumps about, and it very helpfully installed a USB driver on my keyboard instead. Keyboard dead. Excellent.

So then I am poking around Device Manager with a mouse trying to find my keyboard, chasing an "unknown device" which turned out to be nothing to do with it, before finally finding the keyboard hiding under "TOP PROGRAMMER", which is the driver group for my chip programmer. The programmer was not even plugged in.

PAIR05.jpg
PAIR05.jpg (368.86 KiB) Not viewed yet

Uninstalled that, deleted the driver, plugged the keyboard back in and it came back to life. *phew*

Next attempt, Espressif's own driver package. That pops up wanting to install itself as "TOP PROGRAMMER" as well, which after the keyboard incident filled me with confidence.

PAIR06.png
PAIR06.png (115.72 KiB) Not viewed yet

It only covers half of the ESP's USB port anyway, the JTAG side, and still no COM port. Turns out Windows 7 needs a separate little INF file for the serial side, which finally gave me COM4. Windows 10 apparently just does all of this by itself. Windows 7 does not, and it was not going to let me forget it.

PAIR07.png
PAIR07.png (22.76 KiB) Not viewed yet

After all that, the actual flashing took about one second. Typical.

PAIR08.png
PAIR08.png (24.57 KiB) Not viewed yet

The good news is the board then works properly. With test firmware on the ESP, the ST talks to it through the CPLDs and everything passes. Data goes both ways with no errors, a command and its reply takes about 225us, and it is doing about 517KB/s to the ESP and 602KB/s back, with a full 512KB each way. Most of that time is the 68000's copy loop rather than the board, so there should be more speed to come in the proper driver.

PAIR09.jpg
PAIR09.jpg (166.42 KiB) Not viewed yet

Next job is updating the ESP firmware from the ST itself over the same link, so the USB lead should never be needed again (hopefully). Then I can find out if it can even see the WiFi, and more to the point the internet.

All that for a missing USB socket. Lesson learned. Probably.

:dizzy:
Post Reply

Return to “PHOENIX ZONE”