Jump to content
  • 0

Serial Wire Debug(SWD) and JTAG analyzer


yogeshL

Question

I am a new user and just started to use the digital discovery. I want to analyze SWD and JTAG protocols for a project– currently these protocols are not supported in Waveform, is there any plans to support it in the future? This would be really helpful. Thank you!

Link to comment
Share on other sites

Recommended Posts

  • 0
On 1/12/2022 at 3:19 PM, attila said:

Hi @yogeshL

The latest version adds JTAG support:

 

Hi Attila,

I just received my AD2 yesterday and am positively surprised on the possibilities of this device. I have worked in testing for many years (decades) specifically on IEEE 1149 (JTAG) and immediately started looking for jtag/swd support of on the device. 

I found this post, and see that it went in beta in January 2018, but the official release I find is a version 3.18.1 more than 4 years after the beta. Will there be a release or will I have to go for beta versions?

SVF file support would also be great as this could help in configuring FPGAs and the use SWD for MCU programming so the device serve even more purposes on top of all the awesome stuff it already does.

EDIT: Ah, nope it is the date you joined and not the date of the beta I was looking at ;o)

/Mike

Edited by MFrandsen
Link to comment
Share on other sites

  • 0

Hello

I was looking for a solution for Serial wire debug (SWD), not sure if you already on it or it is planning phase. I am using Analog Discovery and Digital Discovery, but was not able to find anything regarding serial wire debug

Please suggest

Thanks,

Jalaj

Link to comment
Share on other sites

  • 0

Hello 

After installing the new release, digilent.waveforms_beta_v3.19.23_64bit.exe, i observed that SWD is there in Logic analysis  but couldn't find it in Protocol section. Can you also please add SWD in protocol section, so that i can send command via protocol and analyze response on Logic section

Thanks,

Jalaj

Link to comment
Share on other sites

  • 0

Hello

I tried the SWD decoding in Digital Discovery Logic analyzer, it is able to decode the data. Thanks for building the capability.

However I was also using another HW from Saleig which was also decoding the SWD and gave attached decoded response. I was able to see a more detailed decoding. Would request you to incorporate these details in Digilent software also.

Many Thanks,

Jalaj

MicrosoftTeams-image (2).png

Link to comment
Share on other sites

  • 0

Hello

I tried the SWD protocol using Digital Discovery to send SWD Read pattern, but i didn't received response as i was receiving earlier. Further i have attached the snapshot for a read command captured via Logic analyzer. I am not sure if the read command is sending the right pattern. Please suggest.

Regards

Jalaj

MicrosoftTeams-image (3).png

Link to comment
Share on other sites

  • 0

Hello Attila,

I am from Jalaj's team. I wanted to know here that A32 is fixed to 0,1,2, and 3. Does this represents number of words ?

Moreover, if we want to read a value from a address or write a value to a address, how is that possible ? There is no option to enter the 32 bit address in hex form.

Thanks,

Shalin

Link to comment
Share on other sites

  • 0

Hello Attila,

Thank you for the prompt reply. I have a query here. For instance, if we want to read a value at the address 0x40086FF8, then how is it possible ?

Similarly, in write case, for example, if we want to write a value 0x3 at address 0x40086FF8, then how is this possible ?

Thanks,

Shalin

Link to comment
Share on other sites

  • 0

Hello Attila,

While doing the write operation, the data requires to be written to a address location here. Could you please modify your command in the form,

write (Address, Data)

The above address and data will be in hex format. The address represents the address location where the data will be written.

 

Similarly, in read, please modify as

read (Address, Numbytes)

In above command, address (in hex format) is the address location from where the data value will be read and the Numbytes represents number of words/data values to be read from that location. If we type Numbytes as 1, then it will read and show 1 data value (in hex format) at the address location, whereas if we type 2, then it will read and show 2 data values at that address location. 

Thanks,

Shalin

 

Link to comment
Share on other sites

  • 0

Hi @Shalin

The read and write operation/functions generate a pattern with: Start, APnDP, RDnWR, A[2:3]....

21 hours ago, attila said:

image.png

 

For higher level operation you should use something like this:

15 hours ago, attila said:

I'm not familiar with ARM DP but you probably have to write to some register (address select) then do a read or write.

image.png

 

Link to comment
Share on other sites

  • 0

Hello Atilla,

I agree with the above mentioned steps quoted by you. I also agree that we need to write first with a data value based on a specific A32 address. My query here is, for example, if we need to write the above mentioned data hDEADBEEF to a memory address for example, 0x40086ff8. Then how will that be possible ?

Here, A32 is an address of AP or DP register access and is a part of 8 bit pattern request. The above mentioned address location 0x40086ff8 represents 32 bit address which comes after ACK and Trn. Mainly, you will have to add this field in your version so that we can access 32 bit address because currently we are only able to access address A32 which is a part of 8 bit pattern request.

Thanks,

Shalin

Link to comment
Share on other sites

  • 0

Hello Attila, 

yes, you are right. The SWD you implemented is as per specifications and i remember you asked for Logic Analyzer data to debug why we are not able to communicate with part.

Shalin,

I think you should share both the scenarios, one in which part is able to communicate (wherein you are sending commands via different SWD hardware (Seger). You should capture the same via Logic Analyzer and share both command and response.

In second case, you send the command via Digilent Discovery, and then capture the command and response on Logic Analyzer.

Then it will be easier to compare

Regards,

Jalaj

Link to comment
Share on other sites

  • 0

Hello Atilla,

I captured the the waveform against a read command on Digillent logic analyzer (LA) in SWD mode. The Digilent LA is showing incorrect debugging sequence. I have compared the Digilent LA results with another LA and have attached both the digilent project file and sequence captured from another LA (in pdf file). You can match the sequence which appears incorrect in digilent LA. The correct sequence is in pdf file in the order Abort>Select>CSW>TAR>DRW. Please see and let me know.

Thanks,

Shalin

debugging error LA waveform.dwf3logic Saleae read command debugging.pdf

Link to comment
Share on other sites

  • 0

There is one more thing to add to my previous post, at some places in captured Digilent LA sequence, you can see that 32 bit data is not being displayed completely. For example, in the case of ABORT register at the end, there are only ACK bits (3 bits) being displayed and the 32 bit data is absent. In addition, you can compare the results with the attached PDF file which shows results captured from different LA. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...