RT-N66U Jtag

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5  Next
Author Message
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Aug 04, 2012 13:40    Post subject: Reply with quote
Just incase anyone has a chance to work on this before I get home from work.


Discovering JTAG pinouts

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
Sponsor
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Aug 04, 2012 14:20    Post subject: Reply with quote
The theory that the jtag pins has been swapped is in my opinion a bit far-fetched.

The mfgr uses professional jtag equipment which usually comes with a ribbon cable and a pogo pin header and they don't want to re-wire it for one certain router model.

Swapping the pins does not add any higher level of security (it is not difficult to figure it out) and it would only create a "non-standard" problem for themselves.

Input signals (TDI, TMS, and TCLK) has pullups to Vcc, usually 5-10 Kohm (weak pullup), nTRST is pulled down to ground by 500ohm-1Kohm (strong pulldown).
TDO is as mentioned in Dark_Shadows link neither pulled down nor pulled up, it is undefined (floating).

TDO and nTRST should be easy to find with a multimeter and if they are in the correct place then you can be sure the other 3 pins are also where they should be.

_________________
Kernel panic: Aiee, killing interrupt handler!
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Aug 04, 2012 14:34    Post subject: Reply with quote
I and a couple others sources agree with you, however the author of zJTAG is insisting otherwise. Just want to cover all the bases. Especially since the PCB traces aren't visible.

@BW, can you post your -probeonly with the pinouts of the first post?

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 13049
Location: Behind The Reset Button

PostPosted: Sat Aug 04, 2012 16:52    Post subject: Reply with quote
Dark_Shadow wrote:
I and a couple others sources agree with you, however the author of zJTAG is insisting otherwise. Just want to cover all the bases. Especially since the PCB traces aren't visible.

@BW, can you post your -probeonly with the pinouts of the first post?

I did.. all ffff's but as said, it did change the behavior of the leds so it is doing something. I believe the pinouts in the 1st post are correct. The software just needs a little work.

I agree with LOM. It would make no sense for the oem to change the jtag pinout from standard, or at least diff from their other routers.. case in point, the n16 uses the same pinout.

I was just taking a break from a project at home (ejector pump.. ick Sad ) to see if there were any new developments in this thread.

_________________
[Moderator Deleted] Shocked
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Aug 04, 2012 17:03    Post subject: Reply with quote
barryware wrote:
Dark_Shadow wrote:

@BW, can you post your -probeonly with the pinouts of the first post?

I did..
I went back through the thread and didn't see the post, did I miss something?
_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 13049
Location: Behind The Reset Button

PostPosted: Sat Aug 04, 2012 18:47    Post subject: Reply with quote
Dark_Shadow wrote:
barryware wrote:
Dark_Shadow wrote:

@BW, can you post your -probeonly with the pinouts of the first post?

I did..
I went back through the thread and didn't see the post, did I miss something?

the very 1st post. I didn't post a screen shot or capture.. no need, I explained it.. all ff's in regard to the processor id.
removing the sd card didn't change anything. I am certain that the pinout is correct as posted in the 1st post of this thread.

1). I don't think asus would change the pinout of this router vs the other routers they build.

2). this is the only connection config that changed the status of the led's when doing a probeonly with jtag (tjtag).

I'm just trying to get jtag working incase flashing the rt-ac66 to this router doesn't turn out right. As we know, you do not need jtag to flash a cfe to a working router. butt Razz if doing so leaves the router inoperable, then jtag will be needed to flash the original cfe back.

besides.. this is fun..

_________________
[Moderator Deleted] Shocked
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Sat Aug 04, 2012 19:03    Post subject: Sample zJTAG Runs On RT-N66U Reply with quote
SAMPLE TUMPA zJTAG V0.6 RUNS
WITH "STANDARD MIPS EJTAG (NO Vref)" WIRING

Code:

ROUTER              TUMPA
1 = nTrst  ------   3
3 = tdi    ------    5
5 = tdo    ------   13
7 = tms    ------   7
9 = tck    ------    9
                    1 VTAR (Vref) not connected
2 ~ 10 = ground

C:\Windows\system32>zjtag -probeonly /skipdetect /L1:0

==============================================
zJTAG EJTAG Debrick Utility V0.6
==============================================


Set I/O speed to 30000 KHz

USB TAP device has been initialized. Please confirm VREF signal connected!
Press any key to continue... ONCE target board is powered on!

Probing bus ... Done

Detected IR Length is 1

CPU assumed running under LITTLE endian

CPU Chip ID: 11101100011101001011001101111100 (EC74B37C)
*** CHIP DETECTION OVERRIDDEN ***

- EJTAG IMPCODE ....... : 01011111011011001011111111011011 (5F6CBFDB)
- EJTAG Version ....... : 2.6
- EJTAG DMA Support ... : Yes
- EJTAG Implementation flags: R3k DINTsup ASID_8 ASID_6 MIPS64

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Skipped
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done
Loading CPU Configuration Code ... Skipped

Probing Flash at Address: 0x1FC00000 ...
Detected Chip ID (VenID:DevID = 0000 : 0000)
*** Unknown or NO Flash Chip Detected ***


*** REQUESTED OPERATION IS COMPLETE ***



C:\Windows\system32>zjtag -probeonly /skipdetect /L1:0

==============================================
zJTAG EJTAG Debrick Utility V0.6
==============================================


Set I/O speed to 30000 KHz

USB TAP device has been initialized. Please confirm VREF signal connected!
Press any key to continue... ONCE target board is powered on!

Probing bus ... Done

Detected IR Length is 1

CPU assumed running under LITTLE endian

CPU Chip ID: 11101100011101001011001101111100 (EC74B37C)
*** CHIP DETECTION OVERRIDDEN ***

- EJTAG IMPCODE ....... : 00000000000000000000000000000000 (00000000)
- EJTAG Version ....... : 1 or 2.0
- EJTAG DMA Support ... : Yes
- EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Done
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done
Loading CPU Configuration Code ... Skipped

Probing Flash at Address: 0x1FC00000 ...
Detected Chip ID (VenID:DevID = 0000 : 0000)
*** Unknown or NO Flash Chip Detected ***


*** REQUESTED OPERATION IS COMPLETE ***



C:\Windows\system32>zjtag -probeonly /skipdetect /L1:0

==============================================
zJTAG EJTAG Debrick Utility V0.6
==============================================


Set I/O speed to 30000 KHz

USB TAP device has been initialized. Please confirm VREF signal connected!
Press any key to continue... ONCE target board is powered on!

Probing bus ... Done

Detected IR Length is 0

CPU assumed running under LITTLE endian

CPU Chip ID: 00000000000000000000000000000000 (00000000)
*** CHIP DETECTION OVERRIDDEN ***

- EJTAG IMPCODE ....... : 00000000000000000000000000000000 (00000000)
- EJTAG Version ....... : 1 or 2.0
- EJTAG DMA Support ... : Yes
- EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Done
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done
Loading CPU Configuration Code ... Skipped

Probing Flash at Address: 0x1FC00000 ...
Detected Chip ID (VenID:DevID = 0000 : 0000)
*** Unknown or NO Flash Chip Detected ***


*** REQUESTED OPERATION IS COMPLETE ***


C:\Windows\system32>zjtag -probeonly /skipdetect /L1:3

==============================================
zJTAG EJTAG Debrick Utility V0.6
==============================================


Set I/O speed to 7500 KHz

USB TAP device has been initialized. Please confirm VREF signal connected!
Press any key to continue... ONCE target board is powered on!

Probing bus ... Done

Detected IR Length is 0

CPU assumed running under LITTLE endian

CPU Chip ID: 00000000000000000000000000000000 (00000000)
*** CHIP DETECTION OVERRIDDEN ***

- EJTAG IMPCODE ....... : 00000000000000000000000000000000 (00000000)
- EJTAG Version ....... : 1 or 2.0
- EJTAG DMA Support ... : Yes
- EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Done
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done
Loading CPU Configuration Code ... Skipped

Probing Flash at Address: 0x1FC00000 ...
Detected Chip ID (VenID:DevID = 0000 : 0000)
*** Unknown or NO Flash Chip Detected ***


*** REQUESTED OPERATION IS COMPLETE ***

- Magnetron1.1
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Aug 04, 2012 20:14    Post subject: Reply with quote
ok, now that make 3 diff chips detected on the same model
_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 13049
Location: Behind The Reset Button

PostPosted: Sat Aug 04, 2012 22:06    Post subject: Reply with quote
Dark_Shadow wrote:
ok, now that make 3 diff chips detected on the same model

at least we got our moneys worth Razz

three processors in the same unit.. life does not get any better Smile

_________________
[Moderator Deleted] Shocked
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sun Aug 05, 2012 3:05    Post subject: Reply with quote
Got XP fired up to use TJTAG and the universal JATG adapter.

berry, you should check your connections.

I got

Code:
CPU Chip ID: 00000000000011000011000101111111 (000C317F)

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sun Aug 05, 2012 5:28    Post subject: Reply with quote
Dark_Shadow wrote:
Got XP fired up to use TJTAG and the universal JATG adapter.

berry, you should check your connections.

I got

Code:
CPU Chip ID: 00000000000011000011000101111111 (000C317F)


That is a very good chip id, it is a 4706 in MIPS jtag mode!

_________________
Kernel panic: Aiee, killing interrupt handler!
CT9LFT
DD-WRT Novice


Joined: 21 May 2012
Posts: 8
Location: 127.0.0.1

PostPosted: Sun Aug 05, 2012 6:11    Post subject: Reply with quote
Dark_Shadow wrote:
Got XP fired up to use TJTAG and the universal JATG adapter.

berry, you should check your connections.

I got

Code:
CPU Chip ID: 00000000000011000011000101111111 (000C317F)


Please post complete output?
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Sun Aug 05, 2012 11:33    Post subject: Reply with quote
Sample RT-N66U JTAG Runs Using Tiao Universal JTAG Parallel Port Adapter And
TJTAG302RC2-1 Software On Windows XP PC


Wiring:
1.) Standard MIPS EJTAG
2.) Vref and nTRST not needed

Instructions:
1.)Type in command at the prompt but don't press enter.
2.)Power off router.
3.)Power on router and the instant that all leds flash press enter. Timing is somewhat critical.
4.)To execute another command follow steps 1 to 3 above.


C:\WINDOWS\system32>tjtag302rc2-1 -probeonly

==============================================
EJTAG Debrick Utility v3.0.2 RC2-1 Tornado-MOD
==============================================

Selected port = 0x378

Intial value of Control register is 000000EC
Intial value of status register is 0000007F
01111111 (0000007F)

Status bit 7 Busy Inverted pin 11 = 1
Status bit 6 *Ack pin 10 = 1
Status bit 5 Paper-out pin 12 = 1
Status bit 4 Select pin 13 = 1
Status bit 3 *Error pin 15 = 1
* means low = true, e.g., *Error

VCC connected
values of Control register after init 0x000000EC
value of status register after init 0x0000007F
system reset complete

Detected IR chain length = 32
Number of device(s) = 1

idcode 0x000c317f 32
Probing bus ... Done

Instruction Length set to 5

CPU Chip ID: 00000000000011000011000101111111 (000C317F)
*** Unknown or NO CPU Chip ID Detected ***

*** Possible Causes:
1) Device is not Connected.
2) Device is not Powered On.
3) Improper JTAG Cable.
4) Unrecognized CPU Chip ID.



C:\WINDOWS\system32>tjtag302rc2-1 -probeonly /skipdetect

==============================================
EJTAG Debrick Utility v3.0.2 RC2-1 Tornado-MOD
==============================================

Selected port = 0x378

Intial value of Control register is 000000EC
Intial value of status register is 0000007F
01111111 (0000007F)

Status bit 7 Busy Inverted pin 11 = 1
Status bit 6 *Ack pin 10 = 1
Status bit 5 Paper-out pin 12 = 1
Status bit 4 Select pin 13 = 1
Status bit 3 *Error pin 15 = 1
* means low = true, e.g., *Error

VCC connected
values of Control register after init 0x000000EC
value of status register after init 0x0000007F
system reset complete

Detected IR chain length = 32
Number of device(s) = 1

idcode 0x000c317f 32 <=== Processor ID
Probing bus ... Done

Instruction Length set to 0

CPU Chip ID: 00000000000000000000000000000000 (00000000)
*** CHIP DETECTION OVERRIDDEN ***

- EJTAG IMPCODE ....... : 00000000000000000000000000000000 (00000000)
- EJTAG Version ....... : 1 or 2.0
- EJTAG DMA Support ... : Yes
- EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... DMA Read Addr = FF300000 Data = (FFFFFFFF)ERROR ON READ
DMA Write Addr = FF300000 Data = ERROR ON WRITE
Done
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Init PrAcc ... Skipped
Clearing Watchdog ... DMA Write Addr = B8000080 Data = ERROR ON WRITE
Done
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Write Addr = 1FC00555 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Read Addr = 1FC00000 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC00002 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC0001C Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC0001E Data = (FFFFFFFF)ERROR ON READ
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Write Addr = 1FC00555 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Read Addr = 1FC00000 Data = (FFFFFFFF)ERROR ON READ
00000000111111111111111100000000 (00FFFF00)
DMA Read Addr = 1FC00200 Data = (FFFFFFFF)ERROR ON READ
00000000111111111111111111111111 (00FFFFFF)
DMA Read Addr = 1FC00002 Data = (FFFFFFFF)ERROR ON READ
00000000000000001111111111111111 (0000FFFF)
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Write Addr = 1FC00554 Data = ERROR ON WRITE
DMA Write Addr = 1FC00AAA Data = ERROR ON WRITE
DMA Read Addr = 1FC00000 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC00002 Data = (FFFFFFFF)ERROR ON READ
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC0AAAA Data = ERROR ON WRITE
DMA Write Addr = 1FC05554 Data = ERROR ON WRITE
DMA Write Addr = 1FC0AAAA Data = ERROR ON WRITE
DMA Read Addr = 1FC00000 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC00002 Data = (FFFFFFFF)ERROR ON READ
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Write Addr = 1FC00000 Data = ERROR ON WRITE
DMA Read Addr = 1FC00000 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 1FC00002 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 11300000 Data = (FFFFFFFF)ERROR ON READ
DMA Read Addr = 11300000 Data = (FFFFFFFF)ERROR ON READ
^C <=== Got tired of watching
C:\WINDOWS\system32>

Update:
I think Mr.T has some software work to do!

- Magnetron1.1


Last edited by Magnetron1.1 on Sun Aug 05, 2012 12:13; edited 1 time in total
CT9LFT
DD-WRT Novice


Joined: 21 May 2012
Posts: 8
Location: 127.0.0.1

PostPosted: Sun Aug 05, 2012 12:03    Post subject: Reply with quote
17F should be BRCM mfgr ID. But strange processor id 000C3 ? I was expecting something like 04706

Quote:

Yes, timing does matter, from the zjtag options:

Code:


        *) When using this utility, usually it is best to type the command line
           out, then power up the router, about 0.5 second delay, hit <ENTER>
           quickly to avoid bad CFE code lead to <CPU NOT enter Debug mode>
           or the CPUs watchdog interfering with the EJTAG operations.



Please note: When using TJTAG with /skipdetect parameter, unlike zJTAG, you must also use /instrlen parameter. For example :
Code:
/skipdetect /instrlen:5


Last edited by CT9LFT on Sun Aug 05, 2012 12:36; edited 1 time in total
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Sun Aug 05, 2012 12:46    Post subject: Reply with quote
CT9LFT wrote:


Please note: When using TJTAG with /skipdetect parameter, unlike zJTAG, you must also use /instrlen parameter. For example :
Code:
/skipdetect /instrlen:5



Yes ... But in this case setting the /instrlen parameter has no effect on the outcome. Clearly, there are deeper issues that need solving.

- Magnetron1.1
Goto page Previous  1, 2, 3, 4, 5  Next Display posts from previous:    Page 3 of 5
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum