Home

here

image

Contents

1. 1 6 How to measure Up to eight probes can be used to measure digital signals Two types of levels are currently supported Probes 1 and 2 are using input stages with 3 3 V power supply So they are reporting levels below 1 0 V as o and levels above 1 5 V as 1 Probes 3 to 8 are using input stages with 5 0 V power supply They are reporting levels below 1 2 V as o and levels above 2 1 V as 1 Connect as much probes as you want to observe signals and don t forget the GND probe Do not connect the GND probe to a low impedance source other than ground This may destroy your target Kritzel and your host immediately Connect Kritzel through the USB to your host A device like dev ttyUSBO should now should show up 1 6 1 Physical Connections If you prepare the probe cables in the same way as me you can do the connections in two ways Directly through header pins or through any kind of clip contact The micro clip contacts are very cool but also expensive 1 User s Manual Figure 1 3 Direct connection through header pins left and through micro clips right 1 6 2 Start Measuring To start a measurement run at least the kritzel program on your host It needs only one parameter all other settings are using default values in this case The device node to get a connection to the Kritzel system kritzel dev ttyUSBO This will use a reporting cycle of 10 ms and stores all data into file test file krt and
2. 3 Getting a working Environment ptxdist version 1 99 10 configured Using usr local for installation prefix Report bugs to ptxdist pengutronix de Without further arguments PTXdist is configured to be installed into usr 1ocal which is the standard location for user installed programs To change the installation path to anything non standard we use the prefix argumentto the configure script The help option offers more information about what else can be changed for the installation process The installation paths are configured in a way that several PTXdist versions can be installed in parallel So if an old version of PTXdist is already installed there is no need to remove it One ofthe most important tasks forthe configure script is to find out if all the programs PTXdist depends on are already present on the development host The script will stop with an error message in case something is missing If this happens the missing tools have to be installed from the distribution befor re running the configure script When the configure script is finished successfully we can now run local ptxdist 1 99 10 make All program parts are being compiled and if there are no errors we can now install PTXdist into it s final location In order to write to usr local this step has to be performed as user root local ptxdist 1 99 10 sudo make install enter root password If we don t have root access to the machine it
3. line could be manipulated by the ISP programmer If not increase the pull up resistor 2k2 are way to small for the stksoo kit 10k are working with the stk500 but there are potential ISP programmers in the wild that need a higher resistor value than 10k maybe 47k When there is no failure the ISP seems to get in contact with the processor In this case it should output the processor s signature and current fuse settings avrdude Version 5 4 compiled on Nov 4 2007 at 13 07 47 Copyright c 2000 2005 Brian Dean http www bdmicro com System wide configuration file is etc avrdude conf User configuration file is home avrduderc User configuration file does not exist or is not a regular file skipping Using Port dev ttySO Using Programmer stk500v1 AVR Part ATMEGA16 Chip Erase delay 9000 us PAGEL PD7 BS2 PAO RESET disposition dedicated RETRY pulse SCK serial program mode yes parallel program mode yes Timeout 200 StabDelay 100 CmdexeDelay 25 SyncLoops 32 ByteDelay 0 PollIndex 3 PollValue Ox53 Memory Detail Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size Pages MinW MaxW ReadBack eeprom 4 10 128 0 no 512 4 0 9000 29000 Oxff Oxff flash 33 6 128 0 yes 16384 128 128 4500 4500 Oxff Oxff lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 calibrat
4. ony A 0O0A YIM USD Apure ORE BZES jeeusejep SIRIA sexe LuoJJJ sjene INCU ADE 8 E eqoud os sjndu qns 3JeMpJue H gld 9Jeu ease BIO e epi cJd vo en c MEL S e 9 ndu NEE 8goJg I QNO oBejg 1ndu ueuueo s OSU f i als quu SJON a eet j pO s oon ise QNO ns OOEL n A DO UNS UNS QNS EEG J0j28uuo2 gr eu Jesu GND EIE BEIRA SUL 128uuo suoseau IST JOY IGE 29 DOE 29 qua vi vi QNO Q aNd 29 00 uoot HEO GEO ZE 001 QNS EAE U3MOd Gea SOA ONO Sled EO i z u pi Hal ede ETETEKO 1 da sep AS 4X 3091 AS 10891 66 Y8 LN au ES eeuen VA g0ed 5 Ol 0 0 Z 9uc A IM T Urtea gee TZE ONG BOEN 99 10831 GEO 66 v8 Y zh goede A s AL IET EIEKO 1 md 9 aqua soex 10 2I Wo Se SE AOS a GGKE ZZN 9j Goede zu A ue Ee 1 Nee EZEZ F U poex EO quos SE AOS 66 v
5. 1 AE LLL AN LLL A V 1111111 24 21 24 25 24 21 24 1660 342 First column is the timestamp It s displayed in hex format It s always 16 bit wide and overflows at oxFFFF The next columns are showing the states of the 8 probe signals at this timestamp from left to right Probe 1 to 8 The character represents a o low the represents a 1 high The third column in the example above is empty description see below The fourth colum shows the timestamp difference to the previous report Note The timestamp is always in relation to the selected time resolution while scanning So if the timestamp value advances by one this could mean 500 ns 4 us and so on Lets explain the second row in the example above The report was generated at the timestamp 0x131 It happens 21 counts later than the previous report Probe 1 4 5 6 7 and 8 do not change their state Probe 2 changes from 1 to o while probe 3 changes from o to 1 Sometimes a row contains the third column mentioned above SO J 1B5 1CA 1E2 1FA 20F J 1111111 1111111 111111 24 21 III II IS 24 21 1 User s Manual At timestamp ox1E2 the scanner has detected more than one event on probe 6 This means the level on this probe changed at least two times In this example at least from 1 at timestamp ox1CA to o back to 1 and again to o the final state at timestamp ox1E2
6. 7 1 shows the CAD output of the board It s a hand routed layout so it was possible to get by with two layers only Figure 7 1 The board from CAD left top right bottom layer 7 2 The PCB from the Manufacturer Figure 7 2 shows the result after production It was done in a five working day job 7 3 Check the plain PCB First of all check if the board has some shorts between power supply 5V and GND If not continue with the next step If yes hmmm try to find and solve it first Best place to check for shorts between Power and GND is the capacitor C101 Don t measure at the USB B con nector The R100 is not soldered yet so it makes no sense to measure at this connector As C101 is of a regular THD type through hole device it will be easy to do the measuring at both sides of the PCB Do also a visual check of the whole PCB Sometimes cracks can be detected in this way 34 7 Assembly Figure 7 2 The fresh board left top right bottom layer 7 4 Soldering Switch on the soldering iron we will start now are done with a check at their end This will simplify searching for any kind of failure Don t solder all components in one step Follow the steps in this manual as all steps D And to do it step by step will ensure you can build an accurate housing For the component placement on the PCB refer figure 8 1 top side and 8 2 bottom side on page 51 7 4 1 Step 1 The small devices First st
7. PTXdist software itself ptxdist 1 99 10 patches tgz All patches against upstream software packets known as the patch reposi tory ptxdist 1 99 10 projects tgz Generic projects optional can be used as a starting point for self built projects The PTXdist and patches packets have to be extracted into some temporary directory in order to be built before the installation for example the 1oca1 directory in the user s home If this directory does not exist we have to create it and change into it cd mkdir local cd local Next steps are to extract the archives local tar zxf ptxdist 1 99 10 tgz local tar zxf ptxdist 1 99 10 patches tgz and if required the generic projects local tar zxf ptxdist 1 99 10 projects tgz 20 3 Getting a working Environment If everything goes well we now have a PTXdist 1 99 10 directory so we can change into it local cd ptxdist 1 99 10 local ptxdist 1 99 10 ls 1 total 455 drwxr xr x jb users 1024 29 Sep 17 32 autoconf jb users 28 29 Sep 17 32 autogen sh jb users 1024 29 Sep 17 32 bin jb users 115470 29 Sep 17 32 ChangeLog jb users 1024 29 Sep 17 32 config jb users 222451 29 Sep 17 34 configure rWXr xr x drwxr xr x rw r r drwxr xr x rwWxr xr x Srw r r jb users 11445 29 Sep 17 34 configure ac rw r r users 18361 29 Sep 17 32 COPYING ZIW r r jb users 3499 29 Sep 17 32 CREDITS drwxr xr x jb users 1024 29 Sep 1
8. There are different reasons for this to occur Thereport interval is to long for the frequency on the probe lines TheUSB FIFO was full While the firmware waits for new space in the FIFO it continues to collect events 1 9 2 Check Data Consistency This tool is only useful for the stored data set It was very helpful during the development ofthis project It could become helpful again when someone has trouble while using programs of this project kritzel check file name krt Reading data from file test 1 krt Data file contains 214661 datasets No obvious errors detected 1 9 3 Display specific Reports This tool was developed to check the realtime capabilities of the current Linux RT Preempt patch To find specific reports showing for example a timing violation kritzel select can be used With the help ofkritzel select you can setup two event sources and trigger results into raw data display if these events violates a given timing Runkritzel select help for the possible options 1 9 4 Creating a Histogram This tool was developed to check the realtime capabilities of the current Linux RT Preempt patch While the scanner generates a stimulus at a specific rate for a target it scans the target s answers on a second probe If the stimulus is connected to an interrupt input the target can answer interrupt recognition on the second probe Based on this dataset you can create a histogram to measure the realtime capabilities of
9. USB connector The size ofthis hole is 12 5 mm width and 11 5 mm height It must be located exactly in the center ofthe bare panel After everything is done in this section you can solder the LEDs and the two buttons and you are done 44 7 Assembly Figure 7 11 Finished probes left and the USB panel right 7 5 Programming the FTDI s EEPROM The FTDI device uses an external EEPROM It s not programmed yet so this will be the next step to do Use the find all utility to see if your FTDI is visible to the system local host bin find_all Number of FTDI devices found 1 Checking device O Manufacturer FTDI Description USB lt gt Serial Create this type of configuration file for the ftdi eeprom utility and name it ftdi config vendor id 0x0403 Vendor ID product id 0x6001 Product ID max power 50 Max power consumption value 2 mA Use O if self powered true THHHHHHHHEHE Strings THHHHHHHHEHE manufacturer JBE Manufacturer product Logic Scanner Product name serial 01 01 Serial number 45 7 Assembly aaa Options Gara Self powered false Turn this off for bus powered remote wakeup false Turn this on for remote wakeup feature use serial true Use the serial number string Normally out don t have to change one of these flags BM type chip true Newer chips are all BM type in is isochronous false In Endpoint is Isochronous Out Endpoint is Isochron
10. are used to separate fields in Kritzel s data files To define a name for each probed signal you can extend the command line like this kritzel s 4000 1 trigger 2 answer 8 interrupt dev ttyUSBO This will assign the name trigger to probe 1 answer to probe 2 and interrupt to probe 8 Probes 3 7 are still using their default names There is no length restriction for each name but you should avoid the same characters in the name as for the measurement title 1 User s Manual Each run of kritzel will store the event data into test file krt and test file info If you are using the o command line option you can select a different basename than test file kritzel will extend this basename with krt and info by itself 1 7 Probe Protection All inputs are protected against electrostatic discharge ESD with a serial resistor and clamping diodes refer to figure 1 5 This will also clamp 5 V input signals at probe 1 and probe 2 But avoid to connect any low impedance source to any ofthe probe inputs that will force the clamping diodes to do their work This will destroy at least the serial resistors If the input voltage is above 7 V all active devices will be damaged and as the last member in this chain your host computer Probe Figure 1 5 Protection Scheme 1 8 How to Stimulate When you set up the stimulus generation Kritzel will enable its output buffer on probe 1 Note Currently only p
11. in addition some human readable info about this measurement in test file info ported by the scanner and stores them to a file For any further data processing other The kritzel application doesn t do any data processing It only collects all events re D applications are required that can work on the stored data To select another reporting interval than the default extend the command line options with s To geta reporting interval of 4 us change the command line to kritzel s 4000 dev ttyUSBO The reporting interval depends on hardware capabilities Not every interval is possible Kritzel selects the nearest possible interval automatically For the FirstGeneration Kritzel these intervals are possible 500 ns aus e 16 US e BA ps 1 User s Manual Note The soo ns interval is an internal interval only This means Kritzel can detect events with this timing reso lution But after an event detection the firmware needs 2 us to generate a report and forward it to the USB FIFO So the maximum external frequency is about 500 kHz Note also Kritzel cannot generate reports permanently atthis rate Because each report contains 4 bytes this would result in a 2 MiB s data rate which a full speed USB device cannot handle This means a short burst of a soo kHz signal Kritzel can handle until the FIFO is full The average external fre quency Kritzel can handle permanently is about 250 kHz 1 6 3 What a Reporting Interval Me
12. is also possible to install into some other directory with the prefix option We need to take care that the bin directory below the new installation dir is added to our PATH environment variable for example by exporting it in bashrc The installation is now done so the temporary folder may now be removed local ptxdist 1 99 10 cd rm fr local 3 2 4 Configuring PTXdist When using PTXdist for the first time some setup properties have to be configured Two settings are the most important ones Where to store the source packages and ifa proxy must be used to gain access to the world wide web Run PTXdist s setup ptxdist setup Due to PTXdist is working with sources only it needs various source archives from the world wide web If these archives are not present on our host PTXdist starts the wget command to download them on demand 22 3 Getting a working Environment 3 2 4 1 Proxy Setup To do so an internet access is required If this access is managed by a proxy wget command must be adviced to use it PTXdist can be configured to advice the wget command automatically Navigate to entry Proxies and enter the required addresses and ports to access the proxy in the form lt protocol gt lt address gt lt port gt 3 2 4 2 Source Archive Location Whenever PTXdist downloads source archives it stores it project locally If we are working with more than one project every project would download its own re
13. reliability Do not omit it 3 3 4 1 Building additional Toolchains The OSELAS Toolchain 1 99 2 bundle comes with various predefined toolchains Referthe ptxconfigs folder for other definitions To build additional toolchains we only have to clean our current toolchain projekt removing the current selected ptxconfig link and creating a new one OSELAS Toolchain 1 99 2 ptxdist clean OSELAS Toolchain 1 99 2 rm selected ptxconfig OSELAS Toolchain 1 99 2 ptxdist select ptxconfigs any another toolchain def ptxconfig OSELAS Toolchain 1 99 2 ptxdist go All toolchains will be installed side by side architecture dependend into directory opt OSELAS Toolchain 1 99 2 architecture part Different toolchains for the same architecture will be installed side by side version dependend into directory opt OSELAS Toolchain 1 99 2 architecture part version part 26 4 Building Description 4 1 Prepare and Build This chapter assumes we already installed PTXdist and the toolchain in a way the last chapter describes it It also assumes we have a big wire into the internet as all the sources are downloaded from there If we setup PTXdist to use a generic source archive directory the download only happens once Each ptxdist project uses a toolchain This is the first thing we must setup prior starting the build jbOjupiter tar xf OSELAS BSP JB Kritzel trunk tar gz jbOjupiter cd OSELAS BSP JB Kritzel trunk Software jbOjupiter
14. the build The required compiler to build the OSELAS BSP JB Kritzel trunk board support package is avr avr gcc 4 3 2 libc 1 6 2 binutils 2 19 So the steps to build this toolchain are tar xf OSELAS Toolchain 1 99 2 tar bz2 TZ cd OSELAS Toolchain 1 99 2 OSELAS Toolchain 1 99 2 ptxdist select ptxconfigs avr avr gcc 4 3 2 libc 1 6 2 binutils 2 19 ptxconfig OSELAS Toolchain 1 99 2 ptxdist go At this stage we have to go to our boss and tell him that it s probably time to go home for the day Even on reasonably fast machines the time to build an OSELAS Toolchain is something like around 30 minutes up to a few hours Measured times on different machines Single Pentium 2 5 GHz 2 GiB RAM about 2 hours Dual Athlon 2 1 GHz 2 GiB RAM about 1 hour 20 minutes Dual Quad Core Pentium 1 8 GHz 8 GiB RAM about 25 minutes 25 3 Getting a working Environment Another possibility is to read the next chapters of this manual to find out how to start a new project When the OSELAS Toolchain project build is finished PTXdist is ready for prime time and we can continue with our first project 3 3 4 Freezing the Toolchain As we build and install this toolchain with regular user permissions we should modify the permissions as a last step to avoid any later manipulation To do so we could set all toolchain files to read only or change recursively the owner ofthe whole installation to user root This is an important step for
15. workspace directory which contains all project relevant files A Configuration System The config system is used to customize a configuration which contains informa tion about which packages have to be built and which options are selected Patches Dueto the fact that some upstream packages are not bug free especially with regard to cross compi lation it is often necessary to patch the original software PTXdist contains a mechanism to automatically apply patches to packages The patches are bundled into a separate archive Nevertheless they are nec essary to build a working system Package Descriptions For each software component there is a recipe file specifying which actions have to be done to prepare and compile the software Additionally packages contain their configuration sniplet forthe config system Toolchains PTXdist does not come with a pre built binary toolchain Nevertheless PTXdist itself is able to build toolchains which are provided by the OSELAS Toolchain project More in deep information about the OSELAS Toolchain project can be found here http www pengutronix de oselas toolchain index en html Board Support Package This is an optional component mostly shipped aside with a piece of hardware There are various BSP available some are generic some are intended for a specific hardware 3 2 2 Extracting the Sources To install PTXdist at least two archives have to be extracted ptxdist 1 99 10 tgz The
16. 4 0383 D200 D302 Figure 8 2 Bottom side component placement Note The X300 X308 are not real components they are pads only 52 9 Schematics The schematics are on the following four pages Page 54 shows the block diagram It shows the main three parts of this system and their interconnection Block diagram e Main CPU e USB connection Signal detection Page 55 shows the Atmega16 CPU that does all the work in this system This CPU runs at 5 V power supply to get the highest available speed for it An ISP connector allows in system programming and updating the firmware But everytime this must be done the case must be opened This page also shows X200 It was intended to debug the Kritzel but it was never used It was easier to test and debug various subroutines on the host prior their usage at the target Page 56 shows the USB connection USB connection is done by an parallel to USB converter This device has internal FIFOs for full speed data transfers and a really ugly CPU interface Don t trust the write FIFO busy line After each written byte the FTD245 rises its busy line and lowers it again when there is still space in the FIFO But The rising edge after each byte occures about 500 ns after the byte was written So to send the next byte you must wait about 500 ns to get a valid busy signal The EEPROM shown on this page do not need any programming prior soldering It can be later done from ho
17. 5091 L290 9 4d oq CNS Sul EEE 9geqeJd lt a 9d Ed sa do Za SEa va va za YBIY pen os pasn jou si NM IS u a GOO ec EU Ed HN3MNHAAd Feeds cu eqoud EGOI d za za pul zagad cago fa ed Id AMAS iL oul BS qold od E oq B uns UO eNOS uus YM ESN men YM 2 u 30 EEEN u guns HUTSEZ aan HAN M DIN IA gem PROFI Hay uesAsqs gen Be1 1nau Q c TID 3X Indes HIXN 39 99 uuejsAsqns Ndo ES cS IS 54 9 Schematics 800 NT 6 GGI 00C0 92 20 60 61 90 8002 91eG t 7899 UOISIAS Y eq ounvys ON yas ndaans aJempJeH JMA J3 04U09 uJe sAq ONS ES IA 31111 IDA QOAY TT AO Z AAAY ON ditaike SIEG L0 1 HS1 Ajddhs amod 840 ZOON oues OEL JOL dS 40 pesn eq ues gd seunsue ZOZY GUEN 2 ind NER GIEG IOCI HS 1 zog q dos 00cL m qugsn SI g ONEK x u00 orm errea 3 GOAK eg SEN T GINS 1 22 pes Uc and HE Ugo T Uo gozo uoo 22 ugo OCO UND ig dS 40 g juod je snq lels 14 Y p u M 392 voca of E SEa B E PP 1029 T nd5 e x d cas ZHINO en ia SO Bi 0089 ou Or ndo e ex D uns or A 2 9 ISU d LLLLIIDUS S E ze E bide ENEZ f EV QXs OCd ONS ovd o2d MOTI3A a sso eje E PEZOI OIEREGI PPI yogy Pr Kleozaj ea E z DOSI EAE d N339
18. 7 30 debian jb users 1024 29 Sep 17 32 Documentation jb users 1024 29 Sep 17 32 generic jb users 58 29 Sep 17 32 INSTALL rw r r jb users 2150 29 Sep 17 32 Makefile in drwxr xr x 159 jb users 4096 29 Sep 17 31 patches jb users 1024 29 Sep 17 32 platforms jb users 1024 29 Sep 17 30 plugins jb users 4091 29 Sep 17 32 README jb users 691 29 Sep 17 32 REVISION POLICY users 28672 29 Sep 17 32 rules jb users 1024 29 Sep 17 30 scripts jb users 1024 29 Sep 17 32 tests jb users 33418 29 Sep 17 32 TODO drwxr xr x drwxr xr x rw r r P bk El N N F b P P O P N PF N Ca o drwxr xr x drwxr xr x rw r r rw r r drwxr xr x drwxr xr x drwxr xr x B N O O ba p Ig c o rw r r 3 2 3 Prerequisites Before PTXdist can be installed it has to be checked if all necessary programs are installed on the development host The configure script will stop if it discovers that something is missing The PTXdist installation is based on GNU autotools so the first thing to be done now is to configure the packet local ptxdist 1 99 10 configure This will check your system for required components PTXdist relies on If all required components are found the output ends with checking whether usr bin patch will work yes configure creating config status config status creating Makefile config status creating scripts ptxdist version sh config status creating rules ptxdist version in 21
19. 8 WA P I roede oa UD x y equc enes j Sei EZE A EOEX Ea ue GEA A0S gezie ssaval NZZ 4 5 0 de ex 3001 GIEN ANH d eqni ones t yg eed are 0X E OE 66AV8 IK coeu Ma Nay so eoa FAR bd Z Sgod ones c eqoud M DEK Nez s i 1068 ACE 66AV8 s oud rosa EEE SEO gt ESO X o0ex yee EKE 0069 NEE S at ed egua VAL oc l AEE xoq sjene 00 de E QT pedro oursu0o o HEN o Ho EAE YMOd ANZ 9 oqe 2 209 uBlu T Sd DEE SEA BO d ERTZ OZEN BOO OZ LPL 10 BIEY pesn eq oj si euo Aug OZEY 6IEY ESUES AG HOQI gun Ag e A0 G OOA HIM EKE Apure OH led ugus N3 AS anoge zjene YBIY E uns E uns Cl v AO oj9q e e Mo 3001 Eo EE 57 10 Help In case of any question you can contact me at projects kreuzholzen de 58
20. 9 s ano 2 d 4 3 93 3av 3H m 0024 TP 3 Loza Apeoy i QNO 839 3 S oe 2 SO NS Db EGK dosel p Weserna Nic OOZX 99 95 GINE agy MISA Hog k 5 a IUD yo u XS de e E EI gg E oo C 2 sed sed QNO voce ul jno DIA VUOLBIAT lt no u 539 GOA Tvwoe eu lt jno u ISON 0 31d OL S NVUSO 9 PISO u ino OSIN Big Nao reubis LOCX GOMES OAK aBeyjon jadno uid qi vtuog FUN 31 55 9 Schematics 8003 4 10 43 0010 b 0 81 LO ZO 800Z T 6cG UOISIASY aq soulny yos GSM Ans 34eMp4 H STI e2ejJeju uonoeuuo O Z JSN PENZI yu LIAN IDA o IDA pose E QNO eerren wo oyu b erren d sola SO DOA 401 SIK 972E6 10101 99O66 0 96266 es aq pinos pesnun J OIDA 9 Pag TSUEN eyerpeuuu pues UK 99A 9 9 uid uq 9 Aq uogeziueBuo 40 gsn DATU pue dn gsN 0 N3UMd 22 S34 da esn AG ddnc O T AG A ddngo u eN 605 sah Lo inoene UNO DENE MEE eae d nosa 533 015 BEIZ pasia g yz NO Egg p It NawMd ENFYMd OH EO NILX 1 SESIO KIN WNagSsnrg UND Na IN ONEK GORE Wesrcl IDA 001 IDA 56 9 Schematics 8007 NP 61 oq 00Z0 92 20 60 61 90 8002 9120 7899 LOISIASyY aq
21. F RM 2 5 1 C101 CAPACITOR 27p 0805 2 C105 C107 CAPACITOR 33n 0805 1 C109 CONNECTOR HEADER6 2x3 RM2 54 1 X201 CONNECTOR 5PIN 1x5 RM2 54 1 X200 CPU ATmega16 TOFP44 1 IC200 CRYSTAL 16M Hz HC49 S 1 XT200 CRYSTAL 6MHz HC49 S 1 XT100 DIODE BAV99 SOT23 9 D300 D301 D302 D303 D304 D305 D306 D307 D308 KEY LSH 1301 9315 APEMTAST1 2 T200 T201 LED GREEN P LCC 2 2 D1 D201 LED RED P LCC 2 1 D200 LED YELLOW P LCC 2 1 D202 REGULATOR LM1117MPX 3 3 SOT223 1 IC3o2 RESISTOR oR o8os 2 R319 R320 RESISTOR 1R 0805 1 R100 RESISTOR 22R 0805 8 R300 R301 R302 R303 R304 R305 R306 R307 RESISTOR 27R 0805 2 R101 R102 RESISTOR 100R 0805 6 R1 R204 R205 R206 R309 R310 RESISTOR 470R 0805 1 R104 RESISTOR 1k5 0805 1 R103 RESISTOR 2k2 0805 2 R105 R311 continued on next page 6 Bill of Material continued from previous page 6 2 Ordering Information Farnell www farnell com TTL 7414 74125 CPU Vendor Atmel Type Atmega16 CRYSTAL 6 MHz 16 MHz LEDs Vendor OSRAM Type TopLED KEY Vendor Schurter Type LSH 1301 9315 REGULATOR LM1117MPX 3 3 order no 4660882 Reichelt www reichelt de Device Value Footprint Quantity Reference RESISTOR 10k 0805 5 R106 R200 R201 R202 R203 RESISTOR 100k 0805 8 R308 R312 R313 R314 R315 R316 R317 R318 JACK USB B USB B 1 X100 USB FT245BM LQFP32 1 IC100 CASE PP 2AA 1 WIRE flex wire white 160 cm prob
22. J rgen Beisert Kritzel Manual This manual covers hard and software 1002 2009 01 05 14 27 26 0100 Mon 05 Jan 2009 Contents l 1 4 User s Manual for JB Kritzel User s Manual ii uio C 12 Device Contiols e eu ee de p kus b Y o d ebita a EL S Ger E Ey m ta 13 ManPage 5o s s w e kos o Rode ee N S deg di v be x K Wk 3 WO s W des 4 Installation u beg 4 2 0 Y ch ia bie we RR eu mw uos RU E a XD b SE 15 Preparation on the Host s Side en LO Howtomeasul ceo oa euz ee ee zur d deg e gre Sie ge e 164 Physical Connections io s eoe Zerak b GETE Eur Ge E Q hiss A EEE a 19 2 Siar Measuring sos Su e ek RC ZE e 3 do cR dde GE ZKE TT TN es 16 3 Whata Reporting Interval Means 2 ooo 7 Probe Protection une a E e SS Ga EN E TE E eik dar uu pe ncs ADU TUE d eR a e 418 Howto Stimulate ze Ea ege e ee bi ook d e Ek e re Sek pk eup en 19 Data Processing gt ux GE Eu GE E E xen ET RUE KE x GT laete bi ENEZ GE E Pg toa Simple Data display cue a E A e erd E ei m Ek ere a ba 19 2 Check Data Consistenty c is sa kh ca em aa 163 Displayspecific Reports rez pere cn nn e ZE e bite w sua s s le ws EE Erd Eo 19 4 Creating a Histogram aaa aus s q a s s xx ep s s sl Red a Q s d 19 5 Visualizing withgthwave 2 5 x RR RERO The soft Side of this Project Some Notes first Getting a working Environment 3 1 Download Software Components ees 33 TIXdisnstallalol ads erra m o
23. OSELAS BSP JB Kritzel trunk Software ptxdist toolchain opt OSELAS 1 99 2 avr gcc 4 3 2 libc 1 6 2 bin Now everything is ready to build the project jb jupiter OSELAS BSP JB Kritzel trunk Software ptxdist go Sometimes downloading a source archive may fail Most of the time the maintainer moves the archive to another location or some delete the older releases when a new 1 version was released A simple solution is to search for this archive in the web download it manually and store it into the generic source archive directory If the archive file is already present no download will happen When PTXdist has finshed the Kritzel project we can find all required parts in these directories and below images shortcut hex Fortesting the CPU to USB FIFO connection capturing hex The final firmware for Kritzel generate pattern hex Ifyou have a stkgoovi evaluationboard and a spare Atmega16 this firmware can generate test pattern local host bin avrdude Main tool to flash everything in this project ftdi eeprom Tool to setup USB FIFO s EEPROM find all Tool to detect all connected FTDI USB FIFO based devices kritzel Main tool to read data from kritzel kritzel_2vcd Tool to convert Kritzel s native data format into VCD format kritzel check Verify a Kritzel date file kritzel histogram Tool to evaluate a Kritzel data file into a histogram kritzel select Tool to extract specific reports from a Kritzel data file 27 Part Ill The
24. So we can download the OSELAS Toolchain bundle and build the required toolchain for the OSELAS BoardSupport Package A PTXdist project generally allows to build into some project defined directory all OSELAS Toolchain projects that come with PTXdist are configured to use the standard installation paths mentioned below All OSELAS Toolchain projects install their result into opt OSELAS Toolchain 1 99 2 Usually the opt directory is not world writable So in order to build our OS ELAS Toolchain into that directory we need to use a root account to change the 1 permissions so that the user can write mkdir opt OSELAS Toolchain 1 99 2 chown username opt OSELAS Toolchain 1 99 2 chmod atrwx opt OSELAS Toolchain 1 99 2 We recommend to keep this installation path as PTXdist expects the toolchains at opt Whenever we go to select a platform in a project PTXdist tries to find the right toolchain from data read from the platform configu ration settings and a toolchain at opt that matches to these settings But that s for our convenience only If we decide to install the toolchains at a different location we still can use the toolchain option to define the toolchain to be used on a per project base 3 3 3 1 Building the OSELAS Toolchain for OSELAS BSP JB Kritzel trunk To compile and install an OSELAS Toolchain we have to extract the OSELAS Toolchain archive change into the new folder configure the compiler in question and start
25. ans Each reporting interval has a timestamp and all events within this interval are collected and reported at the end of that reporting interval refer to figure 1 4 All events means all events on all signals and it includes if one or more signals change their level more than once in the same reporting interval If the latter case happens Kritzel uses an event loss mark for these signals in this report If there was no event within a single reporting interval there will also be no report This keeps the data amount small in the cases where events happen at a low rate reporting interval reporting interval reporting interval event 3 event 1 event 1 and 2 nothing gets event 3 gets get reported reported reported Figure 1 4 Reporting Intervals Note Due to hardware restrictions the reporting interval 500 ns will generate a report whenever a single event was detected no collection The hardware is not fast enough to detect more than one eventin this short interval To distinguish all measurements later on you can give each a title and a name for each probe Other data pro cessing applications can use this information kritzel s 4000 t This is a specific title dev ttyUSBO There is no length restriction for the title You only should avoid characters like and If you use them they will get replaced by _ and This restriction exists as these characters
26. be cables should pass the case A triangular file will help to mark these holes to drill them to the right size in the next step 42 7 Assembly Figure 7 7 How to mark and drill the probe holes Assemble top and bottom case to finish this step Now its easy and safe to drill these marked holes with a drill of the size of your probe cables figure 7 8 right picture Figure 7 8 Finishing the holes for the probe cables After drilling the probe holes we can drill the LED and button holes Refer to figure 7 9 for this step Insert the PCB into the top case again and drill with an 0 8 mm drill the six holes like shown in the left side of figure 7 9 This step is the reason why you shouldn t have soldered the LEDs and buttons yet When drilling is finished you got a top case like shown in figure 7 9 on the right side The six red circles mark the six small holes 43 7 Assembly Figure 7 9 How to mark and drill the correct holes The next step is to enlarge these holes as shown in figure 7 10 Figure 7 10 The PCB with LEDs and buttons left and finished holes right Holes for the LEDs should be 1 mm 2 mm in size The base hole for the buttons must be at least 4 mm in size But in addition they need a counterbore as the button s main body is too high to fit between the PCB and the top case The right picture in figure 7 11 shows the required hole in the panel for the
27. contain the assembler so we also need the GNU Binutils package which provides lowlevel stuff Cross compilers and tools are usually named like the corresponding host tool but with a prefix the GNU target For example the cross compilers for ARM and powerpc may look like e arm softfloat linux gnu gcc powerpc unknown linux gnu gcc 23 3 Getting a working Environment With these compiler frontends we can convert e g a C program into binary code for specific machines So for example if a C program is to be compiled natively it works like this gcc test c o test To build the same binary for the ARM architecture we have to use the cross compiler instead of the native one arm softfloat linux gnu gcc test c o test Also part of what we consider to be the toolchain is the runtime library libc dynamic linker All programs running on the embedded system are linked against the libc which also offers the interface from user space functions to the kernel The compiler and libc are very tightly coupled components the second stage compiler which is used to build normal user space code is being built against the libc itself For example ifthe target does not contain a hardware floating point unit but the toolchain generates floating point code it will fail This is also the case when the toolchain builds code for i686 CPUs whereas the target is i586 So in order to make things working consistently it is necessary that the ru
28. create the binaries for the Kritzel scanner a Cross Toolchain for the 8 bit AVR architecture is required This toolchain will also be built by PTXdist so no special knowledge about toolchain building is needed Before you begin to assemble anything build the whole software first It includes some testprograms you will need to check if an assemble step was successfull or not They should simplify things in case of trouble Note Everything in this project comes in source format there is nothing binary only in it But not all needed source parts are part of this archive They will be downloaded automatically on request from various internet locations 18 3 Getting a working Environment This chapter describes how to install PTXdist and building a toolchain PTXdist and the toolchain are the major preconditions to build anything other You can pass PTXdist and do it by your own There is nothing esoteric in my source code Just plain Makefiles and or autotoolized programs But then you need at least a known to work AVR toolchain But please note If you do it by your own with your own toolchain cannot answer questions if something went wrong That s the job of PTXdist It ensures that your binary results are exactly the same than mine 3 1 Download Software Components In order to follow this manual some software archives are needed There are several possibilities how to get these either as part of an evaluation board package or by downl
29. e cable 8 20cm signal WIRE flex wire black 20cm probe cable 1 20cm GND CRIMP crimp contacts 9 for probe cable TUBE heat shrink tube 9 cm for probe cable 9 1cm CLIP micro clip 10 for probe cable expensive but optional only MARKER Wire Marker 1 to mark probe 1 CABLE USB Cable A B 1 for Host to Kritzel connection PCB PCB 1 one of the main parts WIRE AWG26 0 14 mm Type LITZE WS LITZE SW white and black TUBE 2 1 2 4 mm order no SDH 2 4 SW RS http de rs online com web CRIMP contacts 0 64 mm order no 532 456 REGULATOR LM1117MPX 3 3 order no 2509474047 Segor Berlin www segor de I2C EEPROM Vendor Atmel Type 93C46 CRYSTAL 6 MHz 16 MHz USB Vendor FTDI Type FT245BM JACK Vendor Yamichi Type USB B oo1 CAPACITOR all RESISTOR all DIODE all CONNECTOR all CABLE USB cable A B Conrad www conrad de CASE PAC TEC PP 2AA www pactecenclosures com 32 6 Bill of Material Ordering Conrad Electronic No 523150 62 KUNSTSTOFFGEHAEUSE 94X63X28 Note found this case on their German website only Digikey REGULATOR LM1117MPX 3 3 Micro Clip http www amrhein online de messtechnik produkte mikro microclip php lang en BetaLayout www pcb pool com Circuit Board 55 4 mm 82 54 mm 1 6mm 2 17in 3 25in 0 063 in 33 7 Assembly 7 1 The PCB from the CAD system This project contains the PCB layout file in EAGLE brd format Figure
30. ep is to solder the smallest devices Resistors capacitors and the 3 3 voltage regulator as shown in figure 73 In Germany many people call these kind of small devices Huehnerfutter chicken feed Do not solder the LEDs and the buttons to the board now There is an additional step to be done before soldering these devices 7 4 2 Checking Step 1 Once again check at the capcitor C101 if you made a short between 5V and GND It could be a good idea soldering a few devices doing a short test soldering the next few devices and doing the next short test and so on As the resistor R100 should be soldered you can also do the measuring at the USB B connector now 35 7 Assembly Figure 7 3 The first step Das Huehnerfutter 7 4 3 Step 2 The Processor In this step we solder the CPU and some other devices on demand to program it This is the time where you need calm fingers a very thin soldering iron and the thin solder If you miss one or all of these its time to use the solder wick now Figure 7 4 The second step CPU and some other devices The 6 pin ISP connector X201 is always required Also the crystal XT200 The USB B plug X100 only if your ISP is not able to supply the CPU 36 7 Assembly 7 4 4 Checking Step 2 Time to start with the ISP First the connection diagram for the ISP connector X201 used on the Kritzel PCB The pin 1 ofthis connector is marked with a rectangle pad
31. g Be more noisy and do more runtime checking Enabled by default You should disable this feature when you only use this program enable krt format This is the native format kritzel uses when it outputs data to stdout Don t mistake it with the compressed data format This is valid only for stdout enable vcd format This is a industrial format used by other tools and also by gtkwave Support of this format is enabled by default 1 User s Manual 1 5 Preparation on the Host s Side The FirstGeneration Kritzel works with a parallel to USB converter from the vendor FTDI The device is an FT245BM refer to http www ftdichip com This kind of device is supported since the Linux kernel 2 4 days When it integrates itself into the system it emulates a simple serial connection so every tool that supports tty communications can work with it When running udev on the host it creates for each connected FT245BM a device node in this form dev ttyUSBx The x part in this device node name will be a number starting at o It s possible to connect more than one device at the same time The FTDI device uses a 16 ms timeout value as default to transfer data from its FIFO to the host if there are less than 64 bytes in it To speed things up this value should be 1 decreased to 1 ms This can be done with a echo 1 gt sys class tty ttyUSB device latency_timer Note Replace the with the correct number udev has given your Kritzel
32. gram can be found in figure 1 7 1 9 5 Visualizing with gtkwave The application gtkwave can be used to visualize the data set in a more convenient way than kritzel_raw can do it To get a dataset in a fileformat that gtkwave can handle use the f vcd option and redirection when running the measurement kritzel s 500 f vcd gt test vcd Note The file test vcd will grow quickly and can be very huge To visualize this dataset run gtkwave and simply load the test vcd file 1 User s Manual counts 400 375 350 325 300 paas NUN Qm Oo Ul 8000 9500 10000 10500 1500 12500 13250 15000 17500 20150 24550 time ns Figure 1 7 Histogram Part Il The soft Side of this Project 2 Some Notes first All the needed software components to build and run Kritzel will be made by an automated build system This build system is called PTXdist and its regular purpose is to build root filesystems for Linux based targets This project is notlike all the other PTXdist based projects The main difference is the lack ofa Linux based system on target s side Instead the target is a small microcontroller without the need for a complex operating system But PTXdist is a generic build system to simplify building processes of any kind of software So its also used here to provide any user with all the programs he or she will need to setup and run this piece of hardware To
33. hard Side of this Project 5 Preparations and preconditions 5 1 Required Skills To build this scanner you should have experience in working with SMT Be aware the processor and the USB device are using a pitch of 0 67 mm Soldering this kind of devices is not trivial That s why you may need a huge amount of solder wick 5 2 Required Tools Figure 5 1 Tools that makes this job easier or harder These things and tools you should have Some kind of magnifier mine is a large one a very small pair of tweezers pointed tip soldering iron that is capable of soldering SMT thin solder 0 5 mm solder wick bulk pack something to chuck the card flux optional 29 5 Preparations and preconditions fibre glass pencil optional calm fingers if not additionally some bottles of beer ohmmeter or continuity checker Linux based development host with USB and root permissions ISP device to program an 8bit AVR processor Atmega16 light light light and a lot of patience 30 6 Bill of Material 6 1 Simple Bill for Assembling Device Value Footprint Quantity Reference TTL 74125 SO14 1 IC300 TTL 7414 SO14 1 1C301 I2C EEPROM 93046 SOo8 1 C101 CAPACITOR 100n 0805 13 C102 C103 C104 C106 C108 C202 C203 C204 C205 C206 C300 C301 C302 CAPACITOR 10n 0805 1 C100 CAPACITOR 10p 0805 2 C200 C201 CAPACITOR 10 p
34. his step You can refer to figure 7 10 for the fully soldered PCB 39 7 Assembly 7 4 6 Checking Step 3 Again check if the power supply is not shorted out Now we are at the exciting moment of connecting Kritzel via USB to our host To get some help on what happens or maybe not the following tools should be available on your host dmesg Command to see kernel messages e ftdi sio Kernel driver for the FTDI USB device family e lsusb Command to get information about connected USB devices e Your favoured terminal program like minicom microcom nanocom If your Linux distribution does not support autoload of kernel modules you must load the ftdi sio manually This must be done as root sudo modprobe ftdi sio Plug in Kritzel s USB cable into your host now If it runs well the kernel will output something like the text below if it detects the FTDI USB device You can see this output when you run the dmesg command el usb 1 2 new full speed USB device using ohci hcd and address 3 usb 1 2 configuration 1 chosen from 1 choice ftdi sio 1 2 1 0 FTDI USB Serial Device converter detected drivers usb serial ftdi sio c Detected FT232BM usb 1 2 FTDI USB Serial Device converter now attached to ttyUSBO ecu Note Don t ask me why the driver detects the FT245 as an FT232BM Kritzel is now accessible via device node dev ttyUSBO Or another USB lt number gt number depends on your system and how many other such de
35. host side Kritzel only reports what is happening on the probe leads and when Figure 1 1 Building Blocks Visualizing with gtkwave Other features Fullspeed USB USB powered no additional power supply required e 7 input only probes 1 bidirectional probe PWM for stimulus application on external devices under test 1 User s Manual Two 3 3 V level probes s volt tolerant six 5 volt level probes Kritzel supports the VCD Value Change Dump data format so the results can be processed and visualized with gtkwave http home nc rr com gtkwave or similar applications 1 2 Device Controls Kritzel can be controlled by the host but also a measurement can be started and stopped locally at the device A few LEDs are showing the current state of the device Figure 1 2 shows the locations of these control items A B C G F E Figure 1 2 Controls and Connectors A OnLED Lights green when USB power is active B Ready LED Lights green when device is ready to be used and the start button E and stop buttons F can be used C Busy LED Lights red when a measurement is running D 8 Probe connectors plus one ground connector not shown here E Start button Pressing this button starts a measurement in interactive mode F Stop button Pressing this button stops a measurement in interactive mode G Data Loss LED Lights yellow when more events happen than
36. ion 0 0 0 0 no 4 0 0 0 0 0x00 0x00 Programmer Type STK500 Description Atmel STK500 Version 1 x firmware 38 7 Assembly Hardware Version 2 Firmware Version 1 15 Vtarget 5 1 V Varef 5 1 V Oscillator Off SCK period 5 5 us avrdude AVR device initialized and ready to accept instructions Reading HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 1004 0 038 avrdude Device signature 0x1e9403 avrdude safemode lfuse reads as E1 avrdude safemode hfuse reads as 99 avrdude You can leave this mode by entering quit The ATmega processor is controlled via fuses Do not omit this step it s mandatory The fuse configuration we need in this application External Crystal Resonator High Freq Startup time 1k CK oms brown out detection disabled brown out detection level 2 7V Boot reset vector not programmed Boot flash size 1kiB do not preserve EEPROM content while chip erase CKOPT fuse programmed as we are using a crystal above 8MHz SPI based ISP enabled JTAG disabled On Chip Debug disabled To activate this configuration run the following command local host bin avrdude p atmegal6 c stk500v1 U hfuse w 0xc9 m U 1fuse w Oxee m 7 4 5 Step 3 The USB device After the CPU seems to run its time to solder the USB feature This means the FT245 IC100 and its crystal XT100 Its also the time now to solder the USB B X100 plug if not already done Sorry no pictures available for t
37. is still a full speed device only even if you change it to USB 2 usb version If change usb version is true this defines the USB version to be changed to When the EEPROM does not contain any data the chip works as expected In this case some ofthe info from the running lsusb v command contains predefined values only 46 7 Assembly Here are the predifined values If everything went correctly you should see this output Bus 001 Device 003 ID 0403 6001 Future Technology Devices International Ltd 8 bit FIFO Device Descriptor bLength 18 bDescriptorType 1 bcdUSB 1 10 bDeviceClass 0 Defined at Interface level bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSizeO 8 idVendor 0x0403 Future Technology Devices International Ltd idProduct 0x6001 8 bit FIFO bcdDevice 4 00 iManufacturer 1 FTDI iProduct 2 USB Serial iSerial 0 bNumConfigurations 1 Configuration Descriptor bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 Bus Powered MaxPower 90mA Interface Descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol ilnterface 2 USB lt gt Serial Endpoint Descriptor bLength 7 bDescriptorType 5 bEndpointAddress Ox81 EP 1 IN bmAttributes 2 Transfer Ty
38. lues the firmware will calculate the possible active time within the stimulus interval Example For the 16 384 ms stimulus interval it means the shortest possible active time will be 64 ps Longer active times will be always multiples of 64 ys 1 9 Data Processing The kritzel main program generates up to two data streams from the reports the scanner sends One stream is a compressed one and always generated The filename is test_file krt ora different basename when using the command line option o A second stream will be generated if kritzel found its stdout redirected This stream can be used to work live on the data All other data processing programs in this archive can work with the compressed file or the redirected stream 1 9 1 Simple Data display kritzel raw displays the scanner data in a primitive way You can run this program on life data or on an already stored krt file Display life data kritzel dev ttyUSBO kritzel raw 12 1 User s Manual Display stored data 4 kritzel raw file name krt kritzel raw has an useful option when handling large data sets It can start to display with an data set offset This option is n value Value is a simple number When given kritzel raw skipts the first number reports before starting to display How to read its output Es 11C 131 149 162 a F958 F96D F985 1 157 Al 111111 EL INR 1111111 1111111 111111
39. m DE Re gus EEE Ee RUE qu au an h Q Qh E eter E 321 MamparnsofPIXdBU 050 te b re u huy e kon Roe db Ze Qa TE RUD zn 3 22 Extracting the Sources lt lt 2 ee o S E Se k Qua w o Q s Sms h k S 323 Prerequisites p i som s gre Ce Rx oe e doo ee Te dE EE e E EUR RUE M e a 32 2 Con punng PASE uer Eur s h X qu en ee deia ee ee a 33 Toalchains wu u u oe we e e GK su EE ci nex Rex OGE P RR SE er Dep Roue ee enit z31 Abit 222p EG REGI ee Eh ee ee Draht 332 Using Existing Toalehalns uuo o Roe Room a RR eR T fk S kn 333 Buildinsa Toolchain pg zen oru Ru pU EIE ea x EE Rm Aa RR RUE Red 3 3 4 FreezingtheToolchain o o l l lu aos vn ceo oe om RR Rh ORE Building Description Contents aA Prepareand Bilde ei Ser u aaa a e Uh aee ee en end ZE De d e aet e UC Oe w II The hard Side of this Project 5 Preparations and preconditions EZ Required Skills u GG E erk ur GE o ea Q w ke dece o E G hu e RE ce de Ee 52 Required Tools u 24 2 0 he xeu X xtd we e RA EDS em Rh E ea 6 Bill of Material 6 1 Simple Bill for Assembling ic og RR ohm ee Reds RR Eg 6 2 Ordering Information s a ose 0 pd RR o d k R R R IR S Rom RP EVE en 7 Assembly 71 The PCB from the CAD system erre er errez 2 zp be nn t m Ro RR erez a 7 2 The PCB from the Manufacturer lees 73 Checktheplan POE i we we ahii ux ORE S aa RUE Woo e e dide RS d REDE KE es d ON or o dg gie urren d a ek Ttak EEk ar Ee d dE Gerea EE igi ig 74 1 Steat Thesmallde
40. ntime libc is identical with the libc the compiler was built against PTXdist doesn t contain a pre built binary toolchain Remember that it s not a distribution but a development tool But it can be used to build a toolchain for our target Building the toolchain usually has only to be done once It may be a good idea to do that over night because it may take several hours depending on the target architecture and development host power 3 3 2 Using Existing Toolchains If a toolchain is already installed which is known to be working the toolchain building step with PTXdist may be omitted The OSELAS BoardSupport Packages shipped for PTXdist have been tested with the OSELAS Toolchains built with the same PTXdist version So if an external toolchain 1 is being used which isn t known to be stable a target may fail Note that not all compiler versions and combinations work properly in a cross environment Every OSELAS BoardSupport Package checks for its OSELAS Toolchain it s tested against so using a different toolchain vendor requires an additional step Open the OSELAS BoardSupport Package menu with ptxdist menuconfig and navigate to PTXdist Config Architectureand Check for specific toolchain vendor Clear this entry to disable the toolchain vendor check 24 3 Getting a working Environment 3 3 3 Building a Toolchain PTXdist 1 0 2 handles toolchain building as a simple project like all other projects too
41. oading them from the Pengutronix web site The central place for OSELAS related documentation is http www oselas com This website provides all required packages and documentation at least for software components which are available to the public To build OSELAS BSP JB Kritzel trunk the following archives have to be available on the development host e ptxdist 1 99 10 tgz e ptxdist 1 99 10 patches tgz OSELAS BSP JB Kritzel trunk tar gz e OSELAS Toolchain 1 99 2 tar bz2 If they are not available on the development system yet it is necessary to get them 3 2 PTXdist Installation The PTXdist build system can be used to build a root filesystem for embedded Linux devices In order to start development with PTXdist it is necessary to install the software on the development system This chapter provides information about how to install and configure PTXdist on the development host 3 2 1 Main parts of PTXdist The most important software component which is necessary to build an OSELAS BSP board support package is the PTXdist tool So before starting any work we ll have to install PTXdist on the development host PTXdist consists ofthe following parts 19 3 Getting a working Environment The ptxdist Program ptxdist is installed on the development host during the installation process ptxdist is called to trigger any action like building a software packet cleaning up the tree etc Usually the ptxdist program is used in a
42. on the PCB as shown in figure 7 5 X201 GOL OSO Figure 7 5 ISP Pinning left and how to connect to the STKsoo right The signal directions listed in table 7 1 are from the sight of Kritzel Pin No Function Function Pin No 1 MISO output VCC bidirectional 2 3 SCK input MOSI input 4 5 RES input GND passive 6 Table 7 1 ISP connection Note The VCC pin can be used to supply the ISP from Kritzel or to supply the Kritzel from the ISP 7 4 4 1 Test if the CPU is working Connect the ISP cable to the Kritzel board through X201 If you are using the STKsoo like me you can supply the whole Kritzel from the STKsoo There is no need to solder the USB B to supply the board at this time In this case close the VTARGET jumper on the STKsoo If you already soldered the USB B plug do not connect Kritzel to your host via USB when the VTARGET jumper on the STK50o is closed A first and simple test to check if everything is working is to try to get an ISP connection to the processor You can do it with local host bin avrdude p atmegai6 c stk500v1 t v Note I m using the stk500 to program my devices That s why I m using the c stk500v1 option in all shown commands here If you are using a different programmer change this option 37 7 Assembly This will start the debug console to gain access to the whole processor If it stops with a failure first check if the RES
43. ous out_is_isochronous false suspend pull downs false Enable suspend pull downs for lower power change_usb_version true Change USB Version usb_version 0x0200 Only used when change usb version is enabled HHHHHHHH Misc HHHHHHHH filename eeprom new Filename leave empty to skip file writing What does the entries in this file mean product id Keep this at ox6001 as this will ensure the Linux ftdi_sio will claim this device Otherwise you will need your own kernel driver self powered Kritzel is not self powered So this entry must be false manufacturer Enter your name here or somthing like this product Enter the product name or description here serial Insert here something unique per device If its unique you can use it in udev rules to do something special on a per device base use serial Should be true Otherwise this device seems to have a bug that prevents the kernel driver to identify this device as a BM type remote wakeup This project does not use this feature So keep it false BM type chip The value true ensures the 1ibftdi writes the correct ox4000 as the version of this chip The Linux ftdi sio driver uses this value to determine if this is an AM or BM device Note This should be true only if you are really using a BM type in is isochronous don t know yet out is isochronous don t know yet change usb version Can be true if you want to be USB 2 0 compliant Note The FTDI device
44. pe Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes 47 7 Assembly bInterval 0 Endpoint Descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status 0x0000 Bus Powered And now while the scanner is attached check with the find a11 utility run FIXME Why are root permissions required to do the next step local host bin ftdi eeprom flash eeprom ftdi config This command will disconnect the scanner You must unplug the scanner and plug it in again to let it occure again After plug in you can check the result of the EEPROM programming step with local host bin find all Number of FTDI devices found 1 Checking device O Manufacturer JBE Description Logic Scanner lsusb v Now some values are changed The output should look like this now Bus 001 Device 006 ID 0403 6001 Future Technology Devices International Ltd 8 bit FIFO Device Descriptor bLength 18 bDescriptorType 1 bcdUSB 1 10 bDeviceClass O Defined at Interface level bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSizeO 8 idVendor 0x0403 Future Technology Devices International Ltd idProduct 0x6001 8 bit FIFO bcdDevice 4 00 iManufacturer 1 JBE 48 7 Assembly iProduct 2 Logic Scanner iSerial 3 01 01 bNumConfigurations 1 Configuration Descriptor bLength 9 bDe
45. quired archives To share all source archives between all projects PTXdist can be configured to use only one archive directory for all projects it handles Navigate to menu en try Source Directory and enter the path to the directory where PTXdist should store archives to share between projects 3 2 4 3 Generic Project Location If we already installed the generic projects we should also configure PTXdist to know this location If we already did so we can use the command ptxdist projects to get a list of available projects and ptxdist clone to get a local working copy of a shared generic project Navigate to menu entry Project Searchpath and enter the path to projects that can be used in such a way Here we can configure more than one path each part can be delemited by a colon For example for PTXdist s generic projects and our own previous projects like this usr local lib ptxdist 1 99 10 projects office my projects ptxdist Leave the menu and store the configuration PTXdist is now ready for use 3 3 Toolchains 3 3 1 Abstract Before we can start building our first userland we need a cross toolchain On Linux toolchains are no monolithic beasts Most parts of what we need to cross compile code for the embedded target comes from the GNU Compiler Collection gcc The gcc packet includes the compiler frontend gcc plus several backend tools cc1 g ld etc which actually perform the different stages of the compile process gcc does not
46. reports can be transferred through the USB line H USB connector 1 User s Manual 1 3 Man Page Run the program with kritzel options device name gt Options are s value Define scan interval unit ns Default is 10 ooo ooo 10 ms i value Define stimulus interval unit ns Disabled by default a value Define stimulus active time unit ns Default is 1000 000 1 ms value Define stimulus active level 0 1 Default is 1 active high 0 lt basename gt Use this basename for all output files Default is test file t lt text gt Define the measurement title Default is Measuring r Start scan immediately else wait for the scanner s local start action f format Select the data format on stdout lt format gt could be Rrt Kritzel s native format e vcd Industrial VCD format lt no gt lt name gt Define a probe name lt no gt from 1 to 8 device name gt depends on the device node name udev gives your device If it is the only serial device usually it will be dev ttyUSBo 1 4 Installation To install the package ensure libz is already installed on your system tar xf kritzel 1 0 0 tar bz2 TE cd kritzel 1 0 0 kritzel 1 0 0 configure kritzel 1 0 0 make kritzel 1 0 0 sudo make install Most things are done automatically by configure but there are some parameters that can control how to build the kritzel executable enable debu
47. ritzel does not realize requested stimulation Using stimulation intervall of 1024000 ns length of 500000 ns and level of 1 Scanning Wait a few seconds then terminate it by entering CTRL C 3 Nextrunlocal host bin kritzel histogram p 2 test file krt on this dataset Reading data from file test file krt Histogram for cycle measuring Measuring Reporting interval 500 ns Of signal signal 2 2 Data sets over all 49229 Counted cycles 12118 Erroneous cycles 0 1020000 4 1020500 6031 1026500 1545 1027000 4538 The result should look like this Note Kritzel is not perfect so you will never get only one exact result in the histogram Repeatthe third step on the other probes They should not contain any events in this case Ifthey do there seems to be a short on the PCB Now connect probe 3 7 to the stimulation probe 1 one after each other and repeat the three checking steps shown above 7 4 9 Finishing the housing The LEDs and the buttons are not soldered yet This is important as we need the small holes in the PCB that mark the center of these devices as a reference where to drill the top case and to drill the probe holes Only with not soldered LEDs and buttons we can insert the card into the top case In this step we are drilling the case Referto figure 7 7 and figure 7 8 Start with marking the holes we need for the 9 probe cables Insert the card into the top case and mark with a pencil where the 9 pro
48. robe 1 can be a stimulus output All other probes are input only As probe 1 continues to be an input too the stimulus data will be part of the data set If there is something to measure in relation to the stimulus always select probe 1 as one of the edges to be used for the calculation Note Stimulus generation depends on the capabilities of the underlaying hardware The FirstGeneration Kritzel uses an internal 8 bit timer generating the output stimulus So the stimulus interval and the active time depend on each other You can define the stimulus interval with the i command line parameter the active time with a and the active level with 1 The stimulus signal is a simple PWM signal generated by an 8 bit counter with compare capability To setup the nearest value to the given one Kritzel s firmware first tries to find the best stimulus interval Due to only a few internal clock dividers the intervals are limited to granularity in parentheses 16 us 62 5 ns 128 us 500 ns 512 ps 2 115 11 1 User s Manual Active Level o Active Level 1 Active Time Stimulation Interva Figure 1 6 Stimulus Generation Overview 1 024 ms 4 us 2 048 ms 8 us 4 096 ms 16 ls 16 384 ms 64 ys After selecting the best stimulus interval the firmware searches for the nearest possible active time Refer to the values in parentheses for the granularity in each stimulus interval Based on these va
49. scriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 Bus Powered MaxPower 100mA Interface Descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 2 Logic Scanner Endpoint Descriptor bLength 7 bDescriptorType 5 bEndpointAddress Ox81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status 0x0000 Bus Powered Note This PTXdist project contains a patched version of the ftdi library Without this patch the bmAttributes 49 7 Assembly contains an illegal value so the 1susb v command complains about it If you are not using the tools and libraries from this PTXdist project ensure you are using at least the libftdi o 12 up to 0 11 this failure exists Tip If you are going to build more than one scanner device use different serial numbers in each device With this feature you can create special udev rules ensuring fixed device node names on a serial number base 7 6 Front Panel For a front panel you can
50. shorted the AVCC signal R104 pin 2 to IC100 pin 30 to GND The USB device seemed dead It became alive again after fixing this short If something happens but you don t receive the exact characters you type one or more data bits might be broken between the ATmega16 and the FT245 7 4 7 Step 4 The Input Output Drivers All right near to completion Solder IC300 and IC301 now After that the probe cables must be soldered Figure 7 6 The forth step Probe cables The hole in the PCB should work as a strain relief So use it in a way shown in figure 7 6 in the left picture At the end it should look like the picture on the right side Use different colours for the probes At least for GND and the single bidirectional probe channel This will simplify the usage later on 7 4 8 Checking Step 4 For this test we flash the final firmware into Kritzel So once again connect the ISP to Kritzel and run local host bin avrdude p atmegai6 c stk500v1 U flash w images capturing hex i 41 7 Assembly By activating the stimulation port we can check if the event recognition works as expected To do so short the stimulation output probe 1 with one of the other event input ports one after each other 1 Short stimulation probe 1 with event probe 2 2 Run local host bin kritzel r s 500 i 1000000 a 500000 dev ttyUSBO We are connected to Type kritzel fg Rev 0 1 5 Using scan intervall of 500 ns Note K
51. st s side via USB Kritzel works without a programmed EEPROM but recommend to program it At least the serial number is useful as it provides a rule for udev to generate a fix name whenever this device gets attached to the host Without it its hard to distinguish between real RS232 to USB converter and Kritzel Page 57 shows signal detection and generation Nothing really exciting here Some ESD protection some level shifter Channel 1 and 2 are of type 3 3 V but 5 V tolerant all other channels are using 5 V for their supply voltage And they are negated This will be inverted later in software Using a 7414 here was a bad idea as it s not trivial to invert 6 bits per byte in assembler It needs one register to load prior the invert operation so it needs two instructions Wastes some CPU cycles The ESD protection for channel 1 is also used for its 5 V tolerace Disadvantage here is even if the ouput is tree stated if the CPU continues to send PWM signales the 3 3 V power supply shows ripples 53 9 Schematics 8007 994 10 14 0010 ZF EO SI 10 CO 800c 2180 EGCG EEG aq oy y obe yos eBe quie aJempue H BENE Ul A NOUUEDS 9Z I4M EIZ UUPUSS Yos s ndu qns ans ae yss adogns AND AND DE 42s gsnqns a zul en geqoud 16 m BU 7
52. the target while running various loads on it Thetool kritzel histogram creates a histogram in ASCII format that can be used with gnu plot to get nice graphical histograms Example The scanner outputs a 1 kHz signal on probe 1 This signal is fed into an interrupt input of our target The interrupt input is active low The target s interrupt routine outputs an answer on a separate GPIO It toggles the GPIO whenever it re ceived the interrupt and entered the handler routine This GPIO is connected to the scanner s probe 2 14 1 User s Manual Start the test with kritzel s 500 i 1000000 a 200000 1 0 1 stimul 2 answer t realtime dev ttyUSBO Now run various loads on your target to measure its realtime capabilities When the measurement is done you can build the histogram for this test We are interested in the timing starting with the falling edge of probe 1 interrupt and ending with both edge of the answer signal on probe 2 4 kritzel histogram b 1 e 2 test file krt Histogram realtime Reporting interval 500 ns From signal stimul 1 falling edge to signal answer 2 both edges Data sets over all 214662 Counted events 23733 Erroneous events 0 First collumn Time in ns second collumn Count 8000 112 9500 291 10000 301 10500 376 11500 198 12500 191 13000 154 15000 85 17500 69 20500 12 24500 2 The worst case in this example is about 25 ps The graphical histo
53. use my template made for my devices Figure 7 12 shows an enlarged panel The title photo shows this panel in use ed Pi p gt Figure 7 12 Front Panel Template 7 6 1 Panel s Dimensions Note Notation here is x y unit is mm Lets assume the position o o o o is at the bottom left corner Then the top right corner is at 81 o 38 o All corners must be rounded off The other controls are on LED is at position 6 5 32 0 needs a hole of 1 2 mm in size data loss LED is at position 15 6 7 5 needs a hole of 1 2 mm in size ready LED is at position 44 3 18 8 needs a hole of 1 2 mm in size stop button is at position 44 3 6 5 busy LED is at position 60 3 18 8 needs a hole of 1 2 mm in size start button is at position 60 3 6 5 I printed the panel on some kind of photo paper to get a perfect look With a ticket punch made the LED holes To inhibit any blur I m using an adhesive film at its top And a two side adhesive film to stick the front panel onto the top case 50 8 Layout Component Placement 8 1 Top Side Component Placement GD E OOV Figure 8 1 Top side component placement 51 8 Layout Component Placement 8 2 Bottom Side Component Placement m mm E egur EN oo v Jo EO 32 N e LO FJ y O Sa O3 J BUE T ba HEH eeza 118 c lo G E xd EE 3 u i xd 9071983 m EH SEO S SI erar GSIN 6072 STEAM 28 8
54. vices are currently connected Now we will check the whole communication This project contains a testware called echo for Kritzel It echos all chars from the input without modification to the output Again connect Kritzel to your ISP consider that only one power supply is active the ISP or the USB host and program the testware into it local host bin avrdude p atmegal6 c stk500v1 U flash w images echo hex i Disconnect the ISP and or connect Kritzel again to your USB host Run your favoured terminal program now I m using nanocom here as an example nanocom dev ttyUSBO b 9600 p n s 1 d 8 fn en Press CTRL T for menu options BRERA RD ine Statuselelelelelelereetetetetetelelelelelekelelelelelelelelejeleeeelelek 9600 bps 8 Data Bits n Parity 1 Stop Bits n Flow Control n echo Sr k akk 3k ak ak ak 3k 3K K K K K K K K K aK d d d d d d KK d 3K 3K 3K 3K 3K 3K K I II I K K K K 21 21 21 21 dd K K K K K 40 7 Assembly Note Replace dev ttyUSBO with the device node your Kritzel registered at in your system The serial line settings like baudrate aso are not required here But without them nanocom will output error messages All characters you enter must occur immediately on the screen And they must occur as the same characters you type Ifthey do so Kritzel is working as expected If nothing happens at the steps above check if Kritzel is getting the 5V supply from your host via USB One of my PCBs was broken and
55. viess c o 2 20 oad Er ads innere 7 42 Checking Stepi e lt ar wu un Roe a WU Rn A e d ei ba uU ym OR pe ern 7 43 Step2 TheProcessor css RR m om oO zez 34 4 Checking Step 2 si eo b ok A a e d RO CR ki RC ans 745 Steps The USB device oss kc Ox x d Rok ey X n ku Ro o Roe Roy do og m 3 74 8 CHECKING SEEDS n mu koe wx wee om m exe E E eue d bie Rod e ZE e Soy 7 4 7 Step 4 The Input Output Drivers 2 2s TAS Checking Step e 2 wa ee 2 dha E Rd al aa euo ag 74 9 Finishing the housing s sa ss eee Semen RO Um RR aa x5 ProgrammingtheFFTDUsEEPROM 2 g q h x or k a zee Ua N Oh E sb a J du dog unos dd pe d b Gg A dne b us muqu up ao a ane gr PS 363 Panel s Dimensions u xong pre x W us s d as eme mm w w Ww w ls 8 Layout Component Placement 8 1 Top Side Component Placement _ 000 nn 8 2 Bottom Side Component Placement mn nn 9 Schematics 10 Help 28 29 29 29 31 31 32 34 34 34 34 35 35 35 37 39 4o 41 41 42 45 50 50 51 51 52 53 58 Part User s Manual for JB Kritzel 1 User s Manual This chapter should help any new user to get his her FirstGeneration Kritzel to run All the programs mentioned here in this manual are built from source Refer chapter Il how to do so 1 1 What is Kritzel Kritzel is a simple scanner for general purpose measuring of digital signals up to about 250 kHz It is host based so any data processing occurs at the

Download Pdf Manuals

image

Related Search

here hereditary heretic heredity here movie heretic definition hereinafter heresy definition hereditary meaning here comes the sun here\u0027s johnny hereby here comes the guide hereditary hemochromatosis hereditary angioedema here i am to worship lyrics here comes the sun lyrics heretic movie hereditary spherocytosis herencia hereditary movie here to slay hereditary hemorrhagic telangiectasia heredia costa rica here come the mummies here comes the bus

Related Contents

Instructions for use Emit Finish Station ECB1 ver. 1.22  Vampir 8 User Manual  Developer Manual - Support  KODAK PalmPix Kamera  中央監視MV表示仕様 マルチループコントローラ 〔連続出力形〕  Instructions - cusabio.com  Antec 900 User's Manual  Owner`s Manual  SREF_vol6_Analyse des besoins  Tractor trucks Series MAGNUM EP  

Copyright © All rights reserved.
Failed to retrieve file