Pages

Sunday, March 10, 2013

Guzunty Pi - testing utilities


So after attempting perhaps 20 times unsuccessfully, starting from last evening, I finally I did one successfully.  I don't know why it works this time.  I guess there might be a intermitant short or open circuit somewhere.  Perhaps tomorrow I should use a magnifying glass to inspect the joints and perhaps resolder the suspecious ones.

Anyway, the time have come for me to test the gz_test xsvf.  So I went back to read the online construction guide.  I was surprised to see that the guide was revised with some nice pictures.

So I will now run the following statement.  I still got confused why I should say ./gz_test, and not just gz_test.



sudo ./gz_test



Guzunty Construction guide

https://github.com/Guzunty/Pi/wiki/Construction-guide

...


Download the programming and test utilities

First, "set up your Pi".

>>> this is where I got confused.  I always download the instruction in text format.  I did not notice that the
>>> "set up your Pi" is a link and mistook it as a title for the following paragraphs.  But I actually set up my
>>> Pi before reading this construction guide, because I ordered the devices which have not arrived.  So I
>>> did the set up before I have seen the CPLD thing.

Program and test

The CPLD is blank, so you must first program it.

sudo gz_load gz_test.xsvf

Wait for the loader to complete (about 45 seconds). If you see a message like 'TDO mismatch and retries exceeded', you probably forgot to install the programming jumpers. Otherwise the loader should report 'SUCCESS'.

Now run the tester which simply turns on the hardware clock on GPIO4.

sudo ./gz_test

Check the outputs on the header pins. The pins will alternate between 0v and 3.3v. If you are using a multimeter to do this, please look at the third to last bullet point below.

The pins oscillate in four groups of 8 (but see next bullet below), with the lowest bit having a frequency of about 9Hz and each successive bit oscillating half as quickly as its neighbour. The groups are: FB1_2 through FB2_5, FB2_6 through FB3_9 and FB3_11 through FB4_8. Group 4 comprises FB4_11 through FB4_17 plus GTS1, GTS2, GSR, GCK2.


Finally, GCK3 is not part of a group. It oscillates at the slowest rate, cycling about every 12 seconds.

To maximise protection to your Pi, there is no output expected on some P2 pins (FB4_8 through FB4_17), nor on GTS1, GTS2, GSR or GCK1. These pins are oscillating at the CPLD itself, but they are not brought out to the header because they have Raspberry Pi GPIO pins connected to them. You can change this to bring more pins out to P2 by bridging some of the solder pads on the underside of the PCB. However, we recommend you wait until you have gained some experience using the Guzunty in its standard configuration before doing this.

If this is what you find, well done. The outputs are oscillating and your Guzunty is working as it should.

Continue to check that all header pins are oscillating using the multimeter. If you have an oscilloscope you can look at the waveforms to ensure that they are nice and clean.

If you are using an oscilloscope and wish to speed up the rate at which the pins change, you can change the call to gz_clock_ena() so that it passes a smaller divisor (the second parameter).

Conversely, a multimeter can't show a signal changing at 9Hz. It will instead show an averaged value, something around 1.6v. To see the signals changing, you may wish to slow the clock by passing a larger divisor to gz_clock_ena(). Be aware if you do this, that the top bit may take a minute or two to toggle. Oh and don't forget to run make again or your change won't make it into the executable.

Press any key to exit the test program.

You are now ready to try out some of the other cores on this site.

...

.END

No comments:

Post a Comment