i got this reply at another forum which works for me :)
After connecting using SWD, you have to power the board OFF and ON to return to JTAG mode.Please first check that.
If that does not solve the problem, then the most likely explanation for your problem is that one of the signals used for JTAG and not for SWD (TDI or TDO) is not correctly connected on your board. Or maybe one of the anex signals. (RST or TRST) Please see the JTAG connector here (All signals are required if the CPU provides them.):http://forum.raisonance.com/viewtopic.php?id=2449
Retrieving data ...