WHILE INVESTIGATING STARTUP OF V2315CF IN REAL MODE, SPOTTED ISSUE
The debugging log from the Virtual 2315 Cartridge Facility (V2315CF) helped me identify an anomaly. I had added a signal to GPIO pin 5 of the PICO, set it up as an input with a pullup, using it to monitor the 12V power supply coming from the IBM 1130.
If that pin detects the loss of the 12V supply, it triggers the emulated drive shutting down and a quick rewrite of the contents of RAM back to the microSD card which holds the cartridge contents. It does this to ensure we don't lose the results of work done that writes or alters sectors of the disk, but before the user does an orderly shutdown of the disk.
For performance reasons the contents of a virtual 2315 cartridge are held in RAM on the main PCB of the V2315CF, delivered to the 1130 during a read and capturing any changes written back by the 1130. The permanent home of the virtual cartridge is a file on a microSD card. When we load a cartridge, the V2315CF reads the microSD card and writes the data to RAM. When we unload after a drive is shut down, the V2315CF reads from RAM and uses it to rewrite the file on microSD card.
My production version of the design has a circuit on the power distribution board for the V2315CF that senses the 12V incoming from the IBM 1130, pulling down the wire from the V2315CF to ground as long as the 12V is present. It is akin to an open collector gate, it pulls down the wire while the power is good and becomes and open circuit when power fails. The GPIO pin on the PICO has in internal pull up resistor so that the pin registers a 1 as long as the circuit is open, but when the power is good, the pin is pulled down to be read as a 0.
I didn't have the final version of the power distribution board ready when I began testing, but I wanted to verify my logic to detect when that pin is a 1 and drive the rapid unload of a virtual cartridge. I used a jumper cable to connect that power fail sense wire however I hooked it to the incoming +12V which is NOT correct. The board will pull the sense wire to ground while power is good and release it to bounce up on its own to 3.3V when power fails. My testbench should have jumpered the wire to ground.
By hooking it to +12V, I blew out the circuitry for GPIO pin 5. That includes the internal pull up resistor and the reading circuits, so it always appears to be at a value of 0. That lets the V2315CF run because it believes that power is good, but the PICO is now partially damaged and the power fail detection won't work.
Raspberry Pi PICO processors are inexpensive and I already had three spares on hand, so I am ready to replace the PICO in the V2315CF once I correctly wire the sense wire to ground in the testbench.
No comments:
Post a Comment