PSAS Support Forum

This is the official board for all PSAS/QMAT users. Welcome !
It is currently Tue Sep 07, 2010 1:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Jtag help needed
PostPosted: Sat Aug 29, 2009 11:45 am 
Offline

Joined: Mon Sep 22, 2008 3:46 pm
Posts: 1061
Hi there !

As you probably know we are trying to build a free open source FTDI ftcjtag.dll arm interface.

Currently I'm trying to halt CPU using DBGREQ :

Code:
      WriteDataByteBuffer WriteDataBuffer;
       FTC_STATUS ftStatus = FTC_SUCCESS;
      ReadDataByteBuffer ReadDataBuffer;
       DWORD dwNumBytesReturned = 0;
       ReadCmdSequenceDataByteBuffer ReadCmdSequenceDataBuffer;
      WriteDataBuffer[0] = '\x00';
      ftStatus = JTAG_Write(ftHandle, false, 2, &WriteDataBuffer, 1, TEST_LOGIC_STATE);
      //ftStatus = JTAG_Write(ftHandle, false, 2, &WriteDataBuffer, 1, PAUSE_INSTRUCTION_REGISTER_STATE);

      ftStatus = JTAG_ClearDeviceCmdSequence(ftHandle);
      WriteDataBuffer[0] = '\x04'; // SCAN_N command
      ftStatus = JTAG_AddDeviceWriteCmd(ftHandle, true, 4, &WriteDataBuffer, 1, RUN_TEST_IDLE_STATE);
      //ftStatus = JTAG_Read(ftHandle, false, 32, &ReadDataBuffer, &dwNumBytesReturned, PAUSE_TEST_DATA_REGISTER_STATE);
      WriteDataBuffer[0] = '\x08'; // Select Scan Chain 2
      ftStatus = JTAG_AddDeviceWriteCmd(ftHandle, false, 5, &WriteDataBuffer, 1, RUN_TEST_IDLE_STATE);
      WriteDataBuffer[0] = '\x0C'; // INTEST command
      ftStatus = JTAG_AddDeviceWriteCmd(ftHandle, true, 4, &WriteDataBuffer, 1, RUN_TEST_IDLE_STATE);
      //ftStatus = JTAG_Read(ftHandle, false, 32, &ReadDataBuffer, &dwNumBytesReturned, PAUSE_TEST_DATA_REGISTER_STATE);
      WriteDataBuffer[0] = '\x02';
      WriteDataBuffer[1] = '\x00';
      WriteDataBuffer[2] = '\x00';
      WriteDataBuffer[3] = '\x00';
      WriteDataBuffer[4] = '\x01';

      ftStatus = JTAG_AddDeviceWriteCmd(ftHandle, false, 37, &WriteDataBuffer, 5,RUN_TEST_IDLE_STATE);
      ftStatus = JTAG_ExecuteCmdSequence(ftHandle,&ReadCmdSequenceDataBuffer,&dwNumBytesReturned);


However, it seems that this doesn't work. Any ideas what might go wrong ?

Cya,

Viper BJK


Top
 Profile  
 
 Post subject: Re: Jtag help needed
PostPosted: Sat Aug 29, 2009 7:20 pm 
Offline

Joined: Tue Oct 14, 2008 7:23 am
Posts: 59
what you use a ftdi chip ?


Top
 Profile  
 
 Post subject: Re: Jtag help needed
PostPosted: Sun Aug 30, 2009 7:49 pm 
Offline

Joined: Mon Sep 22, 2008 3:46 pm
Posts: 1061
yes. FTDI 2232H chipset. (Amontec JtagKey2P).

See examples for used dll above over here :
http://www.ftdichip.com/Projects/MPSSE/FTCJTAG.htm

Cya,
Viper BJK


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group