FLAKY BEHAVIOR OF DIRECT PORT MAPPING OBSERVED
I ran the program to load the memory and happened to put a scope probe on the Storage Write signal which I should be toggling on for each of the memory locations, but saw the signal stuck steadily at high. In some other cases I saw results that didn't match what I expected from the program to read memory.
I switched back to digitalWrite from the direct port access just in case there was something going on that I didn't understand with port access on the Due, which has an ARM chip rather than the usual Arduino processor type.
However, in retrospect this is due to the weirdness that occurs when the laptop is plugged into the wall using its power brick. Running just on batteries should eliminate these gremlins.
NEW PROGRAMS LOADED INTO ARDUINO AND TESTING RESUMED
I ran the loader program that wrote the values 1, 2, 4, 8, 16 . . . 8192 into locations 0, 1, 2, 4, 8, 16 . . . 4096. These locations and values were chosen to have a unique wire I could monitor for each choice. This simplified triggering and monitoring on the oscilloscope.
I saw the B register inputs set low for the desired address and the board was generating the inverted write control signal that causes the MRAM chip to write the data into the selected memory location. The control signal is applied for a bit under 100 nanoseconds and the B register data is gated through to the memory chip at the same time.
However, when I then ran the reading program (below), all outputs were 0. I could clearly see the address and the B register inputs were correct and all the control logic signals on my board worked properly for the writes. The address and all control logic signals were correct on my board for the read, yet the data was not the 1 value I expected.
My XOR logic is producing a 1 for each of the two check bits and those pulses are emitted correctly during the reads. Earlier I had seen outputs that were 1 but my guess is that the strange power injection when my laptop is on AC power, through the Arduino, has damaged one or more chips on my board.
Possible bad chips are the MRAM memory itself, the buffer chips feeding it the B register data, or some of the open collector NAND gates that pass along the pulse for any 1 bit read. Once I pin down the failure further I can replace parts and resume testing.
NEXT SESSION PLAN
I will tack wires on the data bit 15 pin of the MRAM chip and on the input to the buffer that feeds the B register values to the chip. Using the scope, I will be able to verify that the B register value reaches the buffer and is passed through at the proper time to the MRAM pin. I can then look at the MRAM chip pin when doing a read to see if the 1 bit is making it back out. I will also be able to see if there is a 1 coming out of MRAM on a read but no pulse out of the NAND gates.
No comments:
Post a Comment