Sorry, you need to enable JavaScript to visit this website.

SDK DAP status f0000021

Unsolved
8 posts / 0 new
knifter's picture
knifter
Junior(1)
SDK DAP status f0000021

After having a lot of problems with debugging an application with SDK before due to DDR timings (http://zedboard.org/content/hello-world-does-not-work-revf07-board-does-...), I now run into the exact same pile of errors again:
- I've created a clean project (MicroZed 7010 board files), a processing system, reset, interconnect, single AXI slave and an ILA core
- applied board presets (due to previous problem see topic, I no longer trust this anymore to happen automagically). I checked DDR3 settings are correct this time. Also tried with revision F06 and F07 boards.
- I can program the FPGA from 'Hardware Manager'
- I open SDK with hello world application, compile and run debug (ps7_init and ps7_post_config are run)
This is what happens:
* sometimes is see the hello world output in the console. But I have to reset and program the FPGA in one go for this to _sometimes_ work
* this works only one time, pressing run again will give me 'Error while launching program: Memory write error at 0x100000. APB AP transaction error, DAP status f0000021'
* unplug the MicroZed, JTAG adapter and reprogram the device. Sometimes the ILA cores is not recognized, sometimes I again the the DAP errors, sometimes it works.
* the list goes on forever...
What is wrong with my setup? What can I do to find the problem? I've been having this problems before and it was something with the DDR timings. But this time I've checked these timings and they look fine. I've tried two MicroZed boards (F06 and F07, both 7010). This way of working is undoable for me and I'm beginning to give up these boards. The tool chain seems awfully fragile.
You're probably going to ask me again to do tutorial 1 to X again. I've become quite proficient at doing these.. so I did not do them this time as I assume I will get the same problems, but please tell me if you would like me to do them again..
Thanks in advance for any help

JFoster's picture
JFoster
Moderator(55)
Hello Knifter,

Hello Knifter,

What tutorial are you refering to? What version of Xilinx Vivado and SDK are you using?

Thanks,

Josh

knifter's picture
knifter
Junior(1)
The tutorials I'm referring

The tutorials I'm referring to are these: http://zedboard.org/support/design/1519/10
Basically what I'm doing is like tutorial 1 and 2. I'm using Vivado & SDK 2016.4 and the and the board def. files for that version. Im using an HS2 JTAG adapter.
 

JFoster's picture
JFoster
Moderator(55)
Hello Knifter,

Hello Knifter,

I just went through the Tutorial, and for the MicroZed you are only supposed to have the Zynq Processor in the block Diagram. Please follow the setup exactly as stated in the tutorial. I just verified my MicroZed worked with those tutorials. If your MicroZed still does not work after modifying your block design appropriatly then please let me know and we can investigate further.

--Josh

knifter's picture
knifter
Junior(1)
I've run through the Tutorial

I've run through the Tutorial (Part 1 & 2) and see "hello world" every single time. I can press start again and it still works.
After that I've placed a GPIO block in the block design and ran block automation. The reset system and interconnect are placed. The hello world application still works.
Now I've added:

#define GPIO_ADDR 0x41200000

 

int main()

{

    init_platform();

 

    print("Hello World\n\r");

 

    uint32_t *p = (uint32_t*) GPIO_ADDR;

    *p = 0x1234;

    print("Sent.\n\r");

 

    cleanup_platform();

    return 0;

}

 

And I only see 'Hello world', not sent. Meaning It probably did not get there. Fine, although the memory address is correct. I might do something wrong.

But now the problem start. If I run the code again (I could f.e. comment my errornous line out): "Error while launching program: 

Memory write error at 0x100000. APB AP transaction error, DAP status f0000021"

I have to unplug cables from the MicroZed JTAG adapter for this to go away or sometimes a reset (button) works. Reprogram FPGA and it works once.

 

If I  enable reset in the Run Configuration (Reset entire system + Program FPGA), the problem remains. The HS2/JTAG seems unable to get the MicroZed out of this state. (Error while launching program: 

AP transaction error, DAP status f0000021)

Pressing reset on the MicroZed also seems to work sometimes (But not always!).

I remove the '*p = 0x1234' line I no longer get errors (after reset/disconnect).

 

It seemed to have narrowed down now a bit to the MicroZed coming into a locked up state due to writing to this memory location. Apart from how to solve this I do wonder how I can develop my own AXI Slave (and I will make errors in that..) without having to disconnect the whole board every try.

 

How can I make the tools more stable? Would another type of JTAG adapter help? (HS2 currently)

 

 

 

 

 

 
 

JFoster's picture
JFoster
Moderator(55)
Hello Knifter,

Hello Knifter,

We always reccomend to use the Digilent JTAG HS3 cable. Here is an interesting link for your read.

https://forum.digilentinc.com/topic/580-jtag-hs3-vs-jtag-hs2-when-using-...

--Josh

knifter's picture
knifter
Junior(1)
Ok, so it turns out this HS2

Ok, so it turns out this HS2 adapter is not able to reset the PS. Does this cause the DAP status error?
I will order an HS3 adapter and see how that works.

knifter's picture
knifter
Junior(1)
HS3 results

I now have an HS3 adapter. The difference should be that this adapter should be able to 'soft-'reset the PS.
I've tried the same code (writing to the AXI address enabled). This is the result:
As long as I kept the 'Reset the entire system' checkbox was enabled it worked, the debugger crashed on the offending line, not knowing where the PS was after that. But a restart worked and the CPU was reset.
I disabled the 'Reset the entire system' setting and the debugger crashed. A restart gave me the same DAP error. Maybe this is fine as the system was not reset.
I re-enable 'Reset the entire system' and: 11:16:52 ERROR : AP transaction error, DAP status f0000021

Which remains until I reset the MZ with the rst button. So maybe slightly better results as with the HS2.

 

This is at least a but workable as with keeping the complete reset on does seem to be working. But testing without full reset and ending up with a DAP error still locks up the debug system from which it is not able to get out of by software. Do others have the same? Is this normal?