Where where where have I been?
But before I begin, I sincerely apologize to all those who have been waiting for a P2D2, especially those who didn't have access to a P2.
To keep it short I've been too run down and stressed to even talk to anyone, which can happen very easily ever since my chemo (and still) it seems. Perhaps the stress is from trying to get these p2d2s assembled and just right but shipped yesterday!. There have been quite a few rejects and even when my pcb assembly friend has been available there were still many problems and too many delays.
Since this pcb is so packed it makes it hard to rework and also tiny QFN packs with tiny corner pads on the USB chip don't help either. Even the switching regulator doesn't always sit right on the board and trying to rework it gently can result in a damaged board. It's a tight little corner I painted myself into.
So for the last few months I have been doing a lot of software and some hardware testing, kinda waiting for an opportunity to get my pcbs assembled by my friend who has been very busy otherwise.
But now in the last few weeks I've been busier than a one-armed bricklayer in Baghdad, reworking pcbs and analyzing what is going wrong. I've made changes to the pcb to make it more manufacturable. However I spent way too long on the USB chip as this is mostly in jmg's hands and it seems that the USB serial library from Silabs has a few bugs that only I seem to uncover. It scrambles USB>UART data under certain conditions which jmg can't reproduce and I can very easily (and prove it is the ub3 too)
(Update: jmg confirms problems, but I have a version that never seems to play up at 57.6k baud).
Originally the chip I designed in wasn't going to do USB, just handle reset and a few other things Then I was swayed to the dark side with a USB capable chip instead. This is fine really except I really had to squeeze things in there plus I didn't want to be bogged down with USB serial firmware, which I left to jmg. Now I am ripping out that otherwise good chip from the board and putting usb on a little pcb module that mounts over the same place, but using a CP2102N for USB serial with the option to upgrade it back to the ub3 later because if it is reliable, it will be much better.
So I will have another micro on the main board in its place, probably a little XMC1100 in a TSSOP16 pack which is much easy to rework if necessary, but less likely to need it. Plus it has 64K Flash and 16K RAM and I can load it with a version of Forth and simply reprogram it from a P2 I/O all without ever having to touch one bit of ARM assembly language on it. Support micro firmware problems solved!
I will also produce the P2PAL pcb (and P2LAB) at the same time and it will also have USB serial on it, so I can use this as an option instead of the tiny usb pcb perhaps. Anyway, I'm giving myself options and getting a few different versions of the bare pcb made and an improved stencil too. I expect to finalize all the revisions and have them sent out sometime next week.
In the meantime I am sending out some of these P2D2s I have although I don't want to assemble anymore of this version unless I have to. I find the USB serial works reliably for me and TAQOZ at 57600. I can push it much faster but if I do it eventually it glitches somehow and scrambles rx data so that instead of 1234 it receives it as 2341. TAQOZ can be really hard on USB serial!
I can send out the current r4 boards to those who want them now. The enhanced r5 may take a few weeks longer but I expect them to be easily assembled and to have no production impediments and easy to rework if they aren't quite right.
Rev 5 of the P2D2 will have these little changes:
Better SMD pads and tenting of vias around the switching regulator (and UB3 USB r4A version for testing).
USB to be moved to a tiny rider PCB that sits in the same place but connects to the main pcb via a 5-pin header, a bit like a built-in PropPlug with a micro USB connector, but snug and tight.
On the main pcb in place of the old USB stuff I will have a tiny 16 pin TSSOP micro that will do this:
Drive P2 RESET high through a resistor. The P2 reset is normally pulled low as default and cannot start-up unless it gets the all-clear from the monitor micro which also looks after brown-outs and slow ramps.
P2 RESET CONDITIONS:
1.8V drops below a threshold
Reset button is pressed or external reset.
USB DTR is short pulsed during normal serial load operation (not just on change)
Watchdog timeout - (off by default until user triggers it - see commands)
If a valid DTR pulse is detected it will then also pullup P59 for a second or so to disable Flash and SD booting.
If the reset button has a long press it will pullup P59 for a reset into serial or ROM.
Load I2C Si5351A Clock Gen configuration
SERIAL COMS FROM P2 COMMANDS:
- RESET P2
- SD POWER ON
- SD POWER OFF
- SD POWER RESET
- READ VDD VOLTAGE (1.8V)
- READ TEMPERATURE
- READ VREF
- RETRIG/START WATCHDOG (off at reset)
(optional but easy to do)
- READ/WRITE SPI FLASH
- READ/WRITE SD FLASH
- READ/WRITE I2C
BTW, TAQOZ has had massive updates which resulted in a new memory map and code that smoothly exceeds the 64kB limit and the new image footprint by default is 128k although loading everything and the kitchen sink hasn't exceeded 55kb yet. I had to force code to compile elsewhere to test this though. Proper vocabularies have been added which is important for verbose dictionaries such as TIA, the interactive P2 assembler. There are a lot of other enhancements too. TED, the screen editor is next which will result in a completely stand-alone system where I can assemble a whole new kernel if necessary. The system will have a backup mechanism via the support micro in case I manage to brick the P2 boot firmware.