Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Porting the Jam player is pretty simple. I use it for programming EPC2 EEPROMs (used with FLEX10K FPGAs), and for programming MAX II CPLDs. Porting the Jam player basically involves supplying toggle I/O routines for controlling the JTAG pins. --- Quote End --- I had more times to check the source code of JAM STAPL and compile it for UNIX. Since I need to port the code for embedded linux board with OMAP3. I configure the MUX pins of the ARM processor to associate to specific GPIO that I will use for TCK,TMS,TDI,TDO. So now what I need to understand in the jbistub.c from JAM is why : 1- Before each read it does this write of 0x7E: ch_data = 0x7e; write(com_port, &ch_data, 1); THIS mean that 01111110 and since TCK = bit 0 TMS = bit 1 TDI = bit 6 TDO = bit 7 So TCK = 0, TMS = 1, TDI = 1 and TDO = 0 So why doing this before each read? Is it only specific to parallel port of JTAG specific? From this document page 9 http://www.altera.com/literature/hb/max2/max2_mii51015.pdf 2- Second question why looping 100 for the read? parallel port specific or JTAG? Maybe a validation to simply be sure to read the value and not missing it because the read is done to fast??? That seem to me a poor way to code this? for (i = 0; (i < 100) && (result != 1); ++i) { result = read(com_port, &ch_data, 1); } if (result == 1) { tdo = ch_data & 0x01; } else { fprintf(stderr, "Error: BitBlaster not responding\n"); } Regards, Kevyn-Alexandre Paré