In my last entry I spent some time going over the physical layout of the board for the Pip-Boy 3000 Mk V and seeing where there was opportunity to modify and hack additional hardware into these devices. One set of traces that I did not cover previous has so far turned out to be one of the most accessible places to add additional expansion.

On the back of the board are a series of test points near the Micro SD card slot, as previously discovered there’s the footprint for the JST connection to add Serial Wire Debug (SWD) which I believe traces SWD and CLK over to A13 and A14 on the MCU, and of course 5V and GND. Just below this footprint there is also a pair of test points for TX and RX, tracing these across the PCB the traces disappear behind the MCU but they’re pretty close to the vicinity of a few possible pins, so lets work out for certain where they go to.

First, a process of elimination, I clicked around in STM32CubeMX on the pins in the vicinity of where I lose the traces and see if anything stands out, and right away B10 and B11 stand out to me as factory options for those pins are USART3_TX and USART3_RX, the naming agrees with the silkscreen labels on the board so right away this seems like the most logical option. So let us test that theory by checking the status on those pins from the Espruino console:

> Pin(B11).getInfo()
= {
  port: "B",
  num: 11,
  mode: "af_opendrain",
  output: 0, in_addr: 1111523884, out_addr: 1111524012,
  functions: {
    I2C2: {
      type: "SDA",
      af: 0 },
    TIM2: {
      type: "CH4",
      af: 0 },
    USART3: {
      type: "RX",
      af: 0 }
   }
 }
> Pin(B10).getInfo()
= {
  port: "B",
  num: 10,
  mode: "af_output",
  output: 0, in_addr: 1111523880, out_addr: 1111524008,
  functions: {
    I2C2: {
      type: "SCL",
      af: 0 },
    SPI2: {
      type: "SCK",
      af: 0 },
    TIM2: {
      type: "CH3",
      af: 0 },
    USART3: {
      type: "TX",
      af: 0 }
   }
 }
>

Looks like they are indeed functional for USART3, now can we tell if they’re hooked up for serial?

> Serial.find(B10)
= Serial3
> Serial.find(B11)
= Serial3

Both commands suggest they’re hooked up to Serial3 in Espruino at least, so next to confirm that is indeed the case, lets try make use of that serial connection to really prove that those test points do go where we think they go.

At this stage I soldered some temporary wires onto the test pads to make testing easier, while I was at it I also added some wires to 3.3V and GND, these will probably come in useful later.

I connected the TX and RX wires up to my scope and from the Espruino console setup the serial connection and sent some data over it.

Serial3.setup(9600)
Serial3.print("Hello World")

We can see data! Awesome, so can we then establish a full serial connection over those pins? To test this I hooked up the TX and RX wires now up to a USB to serial (FT232) board and plugged it up to my desktop. In one window I opened up PuTTY with a serial connection to the USB device and in the Espruino console I setup Serial3 to be the active JavaScript console with Serial3.setConsole(), and there we have it, USART connection to the PipBoy 3000. In the next part in this series I’ll be making use of this to experiment with adding some cool functionality.