I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / MISC Areas / Mattel JuiceBox
JTAG Bus Driver Problems?
Is the bus driver working, or am I mis-interpreting something?

New MessageJTAG Bus Driver Problems? (modified 0 times) bkgoodman
Profile
My JTAG chain appears to be working as the device detection appears to be okay - but I think that my bus reads/writes are wrong.

Detect gives me the following:


IR length: 4
Chain length: 1
Device Id: 00011111000011110000111100001111
Manufacturer: Samsung
Part: s3c44b0x
Stepping: 0
Filename: /usr/local/share/jtag/samsung/s3c44b0x/s3c44b0x
No. Manufacturer Part Stepping Instruction Register
---------------------------------------------------------------------------------------------
0 Samsung s3c44b0x 0 BYPASS BR

But then when I start peeking, I the data all seems to be wrong - or certinally inconsistant with anything I am reading on the site, or on the datasheet.

If I read addresses 0, 2, 4, 6, 8 and 10, I get:


bus_read(0x00000000) = 0x00000090 (144)
bus_read(0x00000002) = 0x00000000 (0)
bus_read(0x00000004) = 0x000000F8 (248)
bus_read(0x00000006) = 0x0000009F (159)
bus_read(0x00000008) = 0x000000F8 (248)
bus_read(0x0000000a) = 0x0000009F (159)

I don't know if its write or wrong - but they all are 8-bit values only. If I read these addresses again:


bus_read(0x00000000) = 0x00000090 (144)
bus_read(0x00000002) = 0x00000000 (0)
bus_read(0x00000004) = 0x000000F8 (248)
bus_read(0x00000006) = 0x0000009F (159)
bus_read(0x00000008) = 0x000000F8 (248)
bus_read(0x0000000a) = 0x0000009F (159)

...I get the same data - I don't know if it's right, but at least it's consistant.

If I read these addresses, I get this data:


bus_read(0x0001c000) = 0x000000A2 (162)
bus_read(0x0001c002) = 0x0000004E (78)
bus_read(0x0001c004) = 0x000000B1 (177)
bus_read(0x0001c006) = 0x00000084 (132)
bus_read(0x0001c008) = 0x00000028 (40)
bus_read(0x0001c00a) = 0x00000088 (136)

...and if I re-read it - I get the same data again. Again - 8-bit only.

If I try to read when the documentation describes as the LCD registers, I get:


bus_read(0x01f00000) = 0x00000088 (136)
bus_read(0x01f00004) = 0x00000088 (136)
bus_read(0x01f00008) = 0x00000088 (136)
bus_read(0x01f0000c) = 0x00000088 (136)
bus_read(0x01f00010) = 0x00000088 (136)

This is all junk - it will always just reflect back the last location read. (See above, it was 0x88).

The "Cart ID" from the Wiki - does the same thing - reflecting the last location read. These seem to me they are "unmapped" addresses:


bus_read(0x00590000) = 0x00000088 (136)

So am I correct in my believe that something is wrong here? Are the reads all supposed to be 8-bit? Anyone know what I should expect from these peeks? Anyone see any pattern in this madness?

Thanks,
-BKG


---------
Brad Goodman
[myfirstname]@bradgoodman.com
10-01-2006 15:48:19

New MessageRE:JTAG Bus Driver Problems? (modified 1 times) greghol
Profile
Can you send me your BSDL file? /usr/local/share/jtag/samsung/s3c44b0x/s3c44b0x
Ill try it out on my JB with jtag-0.5.1.

The 16 bit read/writes are fubar on the jtag-0.5.1 program and I fixed(hack)it when I got it working with
my AMD 29LV160 2MB flash hooked up to some S3C4510B SoCs in 16 bit mode.

Look at my patch and full tared source tree here:
http://pages.sbcglobal.net/greghol/routers/

I took the stock jtag-0.5.1 applied the Samsung Bus Patch on the JTAG sourceforge site and started to
fix it and add the 29LV160 support.

1) untar base jtag-0.5.1
2) apply Samsung bus patch from official jtag site
3) apply my jtag051-29lv160-patch.tar.bz2 patch

This is my working directory with *.o files and everything. The jtag program
should run on most x86 linux boxes as is. Mandrake, RH, RH(FC) etc.
http://pages.sbcglobal.net/greghol/routers/jtag-29lv160.tar.bz2

You can see what I changed to get the 16 bit stuff working right in my patch.

Add your support for your flash based on whats there. You may only need to
add new part based on vendor and part number IDs.


Greg

10-01-2006 16:54:44

New MessageRE:JTAG Bus Driver Problems? (modified 0 times) bkgoodman
Profile
So I looked over your patches to the S3C4510 to see how they would apply to the s3C440bx (or whatever that the JB uses) that I donloaded per the Wiki directions.


  • It appears as though your patches basically set the BE lines correctly, depending on the bus width[/list]

  • the 4510 driver seems to use separate chip-selects for DRAM access and ROM access - where the JB code seems to use a single chip select for everything. (Is this correct?)[/list]

  • The JB code seems to always set either BE1 for all READS, and BE2, for all WRITES. This doesn't make sense to me - but is it right?[/list]

  • Wouldn't it be true that the internal access I was running wouldn't even work at all - because they're internal to the chip?[/list]

    So...I'm wondering if I apply these patches to the JB chip driver, if this is going to fix things (i.e. they are more-or-less correct as-is,) or really screw things up...(even more)

    P.S. On my 2MB JB - what are the locations for DRAM and internal ROM??

  • 10-01-2006 19:50:25

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) Dgoreth
    Profile
    Hey folks. I have been lurking for a while, getting info and working through some of the things here with the Juicebox. I am interested in making this thing work with some form of Linux, but I have been starting at the very beginning, and my software skills are not what they should be... so I am a bit behind. I currently have a PCB drawn up that has the RS-232 and Jtag connections. I have been looking at my available chips, and I was wondering if anyone saw a problem with using a 74HCT541 instead of the 74XX244 chip for the wiggler interface. it is pin compatable, but is there going to be any kind of timing issue? I have the 541 lying around here, and I was hoping I could use that instead of ordering another IC.

    Thanks in advance, and everyone keep up the good work.

    10-03-2006 04:04:32

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) jbfan
    Profile

    ...I was wondering if anyone saw a problem with using a 74HCT541 instead of the 74XX244 chip for the wiggler interface...
    You don't really need to be concerned with timing, JTAG is a relatively slow interface, the '541 logic will work as well as the '244. What is important is that the chip can be powered from 3.3 volts (JuiceBox) and will tolerate 5 volt inputs (parallel port). The HCT family is usually powered from 5V and the inputs are not to exceed the actual supply voltage so the 74HCT541 probably won't work.
    The LVT family (74LVT244) supports "mixed-mode" operation - 3.3V supply with 3.3V or 5V input/output.

    -J

    10-03-2006 06:29:54

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) bkgoodman
    Profile
    So I haven't heard any responses, and am kind of at a loss...

    What would I expect to be able to access through the JTAG?

  • Internal ROM?
  • DRAM?
  • Internal SRAM?
  • Internal CPU registers?

    I'm kind of of the believe that it could be only "external bus devices" - i.e. FLASH - maybe DRAM (through a different mechanism). Is this correct?

  • 10-03-2006 20:02:42

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) jbfan
    Profile

    What would I expect to be able to access through the JTAG?
    Everything, any address or register that the processor can access can be accessed through JTAG.
    Someone had pointed me to this document for details of arm7tdmi debugging http://www.arm.com/pdfs/DDI0210C_7tdmi_r4p1_trm.pdf

    Not sure why the Openwince Jtag Program (OJP) is only doing byte reads or how to change that behavior. What I like about OJP is that it is a low-level generic JTAG controller and would be perfect for designing a board level test system. But it looks like it requires writing/modifying code whenever you want to do anything new with it.

    Not to sound like a broken record - you should try jtager, it is specifically written to talk to arm7 and arm9 processors including the embedded (ICE) debug logic. You have the ability read and write memory in byte, word, and long. There is a single command to read a binary file into memory (no clue how to do this with OJP).
    Jtager does have "issues"; 'make install' doesn't install the required config file (or even make the /etc/jtager/ directory for it) you have to do that by hand. No idea if it works under Cygwin.
    Once it is up and running you only need 3 commands to write a program to memory and start it running;

  • halt - stop the processor
  • memset [--base=]addr --infile=pathname - no upper case letters in pathname?-(another issue)
  • restart [[--pc=]dest] - start program at address "dest"

    -J

  • 10-04-2006 01:08:21

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) bkgoodman
    Profile

    Not to sound like a broken record - you should try jtager

    Oh - I actually didn't pick up on that - I will definitely try it! It could be that OJP is just totally messed up - I didn't realize that most people used jtagger.

    Thanks!

    -BKG

    10-04-2006 10:59:29

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) bkgoodman
    Profile
    Boo-Yeah!

    Jtager worked like a charm - at least with the LCD_2 demo!

    You're right - OpenWINCE/JTag is a "generic" utility, thats a great platform for really expanding into functionality of any device - but it doesn't do anything really specific for ARM devices (or any others) other than the bus driver to read/write FLASH.

    JTagger is a very good ARM7/9 - specific program that lets you use all the ICE-type capabilities of the ARM.

    So, now I'll see if I can get uCLinux to build...

    Danka!

    10-05-2006 20:04:54

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) Dgoreth
    Profile
    ok I have the serial portion up and running, but I am hitting a roadblock with the Jtag. I have it installed and running on the PC, but it is telling me this:

    Using parallel data port and status port -- 0x378 and 0x379
    Jtag interface has been reset successfully!
    target core type: ARM920T
    JTAGER:> halt
    halt: Failed to read/write the JTAG instruction register. The JTAG
    instruction register always outputs a fixed known value during
    the CAPTURE-DR stage. E.g. for ARM7TDMI target, its JTAG
    instruction register always outputs b0001. But now we read a
    different value. Something is wrong.


    I know that is not the right kind of hardware. how do I change it to the S3C44B0?

    And I am trying a 74LS244.. could this be the reason, or an entirely different issue?

    10-08-2006 01:51:23

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) bkgoodman
    Profile
    Go in to: /etc/jtager/jtager.conf

    Under [TARGET] change the "core=" to the
    proper value for the JB/s3c44b0/s3c44b0x (Probibly one of the latter two - don't have it on me)

    10-08-2006 07:50:08

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) Dgoreth
    Profile
    aahh I must have messed something up in the install then because that is not a "Legal Option" according to the comment. I guess my linux noobishness is showing. I saw somewhere something about a bdsl file that is needed, come to think of it. Should be a snap to reinstall now that I have gotten rid of those pesky readline.h errors.

    thanks for the help bkgoodman

    10-08-2006 15:40:05

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) greghol
    Profile
    Dgoreth,

    You dont want to use a 74LS part as it is a 5V part. (Dont know what the behavour of the part would be if you going to run it with 3.3V supply.)
    A 3.3V signal driving its TTL input(LS) is ok but 44BOX jtag pins may not be 5V tolerent so driving the JTAG pins may not be a good thing with the LS 5V output.

    I would use a part mentioned earlier in the thread. I use a 74AS244 on my JTAG interface and it works fine with many different boards.

    Greg

    10-08-2006 23:14:13

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) jbfan
    Profile

    is not a "Legal Option"... ...something about a bdsl file that is needed...
    "core = arm7tdmi" is the correct value for the JB, AFAIK the BSDL file is "built in" to Jtager.

    -J

    10-09-2006 18:05:38

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) Dgoreth
    Profile
    Ahhhh.. ok I think I am slowly starting to understand. :) I am *mostly* sure that I have it up and running correctly now. Just need to order a chip for this thing.

    I got the software to the point that I type in detect, and it pauses for about 5 seconds or so, then returns nothing. I assume this is because I am using that 74LS244 chip. We shall see once I get a chance to order a couple of those little buggers.

    10-09-2006 23:00:48

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) Dgoreth
    Profile
    -----------------------------------------------------------------------------------------------------------------------
    I would use a part mentioned earlier in the thread. I use a 74AS244 on my JTAG interface and it works fine with many different boards.
    -----------------------------------------------------------------------------------------------------------------------


    I went out and got the 74AS244 chip you reccomended, but alas, still no dice. I was looking at the data sheet for this chip, and something did not look right. I am seeing that the 74AS244 chip is also a 5v part. the 74AC244 is the 3V part. I am going to try to order a couple of those, and hopefully, this time it will work.

    11-01-2006 05:52:24

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) jbfan
    Profile

    ...the 74AC244 is the 3V part...
    While this is correct for the supply voltage (Vcc) remember that the inputs that are connected to the parallel port need to tolerate up to 5V. The max input voltage for the 'AC244 part is the supply (Vcc). The LVT family is designed to bridge the gap between 3.3V and 5V.

    That said - I have been using an 'HC244 for JTAGing the JB without too many problems. The 'HC244 has similar supply/input voltage constraints as the 'AC244 so it may work.

    -J

    11-01-2006 07:44:03

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) greghol
    Profile
    Sorry about that Dgoreth... I rechecked my interface and I have a AC244 not a AS244. I dont know why I typed AS.
    11-01-2006 22:09:40

    New MessageRE:JTAG Bus Driver Problems? (modified 0 times) DavidM348
    Profile
    Hi all!

    Looking at the JTAG cable here http://www.sparkfun.com/commerce/product_info.php?products_id=275 , I just wanted to know if this wiggler clone would work with JTAGER? I've read on this board that is has been successfully used with OCD Comander, just wanted to know if anyone has tried this cable with other software (like JTAGER)?

    Thanks!

    -David

    11-03-2006 22:15:16

    Reply to Thread | Printer |
    All times are PSTPowered by UltraBoard v1.62



    Copyright © 2000, Netmake Inc. All Rights Reserved.
    See Terms and Conditions for more information.




    i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3