Wednesday, March 30, 2022

Debugging my flash loading apparatus, gluing rubber sleeve to 1130 Expander chassis, hooking IOB6120 to logic analyzer

 DEBUGGING MY FLASH CHIP LOADING SETUP

My code to read the text file and respond to the prompts from the Arduino worked fine. The entire file can be transmitted, set up for writing and every checksum validates cleanly. However, when I write the contents to the flash I see an anomaly.

The first sector begins with a string of bytes, the first of which is xE2 but when the block of 256 is read back from flash, I see xE2 duplicated in locations 0 and 1, with the remainder offset by 1 and the final byte of the block lost.

My suspicions are focused on the RD/BY# signal and the handling of it by my Arduino sketch. This signal is an open collector output of the flash chip, requiring a weak pullup on the Arduino input to pull it high when not asserted low. 

I foolishly assigned this to pin 13 of the Arduino Mega, which as anyone who works with these knows is the pin that is wired to a resistor and LED on the board. Great for blinking a LED without wiring one up, but not so good as an input pin. 

I have reassigned this to pin 50, in the same port B as pin 13 but without the interference of the LED connection. I simply had to shift the bit patterns I used to make it input, turn on the pullup resistor and to read it with my sketch.

The other issue is timing. I really need to know that the pin went low and then returns to high to be sure that the automatic process, either writing (programming) a byte or erasing a sector, has completed. I suspect that I am not waiting thus barging in with a new request too early. Ideally this would be interlocked, the sketch requiring it to go low and then waiting for it to return to high.

I don't have sufficient control over timing to be sure that I am looking at the proper time for it to be low, so I will make use of the Atmel processor signal lines which trigger interrupts when the signal makes certain transitions. A bit more complicated to program but certain to catch a low to high transition. 

RUBBER SLEEVE GLUING WITH GORILLA GLUE IS WORKING WELL

I have to wait 2 hours for each glue joint to be fully set before moving on, thus there are four intervals of gluing required to get this in proper shape. Two were done this morning and the rest will get done when I return to the shop.

IOB6120 CONNECTION TO LOGIC ANALYZER

As I look at my carefully constructed line flipping cable, I seemingly have what I need to connect the logic analyzer and begin capturing status. I have a long lead header from the FP6120 where I can hook up the mirroring cable and also make connections to logic analyzer lines. 

Alas, I checked carefully and the SBC6120 does not buffer the signals going out on the connector, thus a ribbon cable introduces too much capacitive loading, signal distortion and delay to work properly. Back to the drawing board. Perhaps the best I can do is the long pin header between the sandwich of IOB6120 and FP6120. 

No comments:

Post a Comment