2013-03-12 2:07 AM
Hello,
I have a problem when I try to connect IAR to the STM32F207 by the JTAG protocol. I have no problem when I use SWD instead of JTAG. I made a test with a J-Link probe and the SEGGER J-Flash ARM software, and I got an error : ''Unexpected core ID. (Found: 0x00000000, Expected: 0x4BA00477, Mask: 0xFFFFFFFF)''. Any help would be appreciated ! Thank. #jtag2013-03-12 3:43 AM
Other information about my problem : On IAR ARM, the debugger works with the SWD protocol but not with the JTAG protocol.
I have also problem with semi hosting on SWO protocol : it works with a STM32F207ZG, but not with a STM32F207IG. I have checked my hardware and I see no difference between my 2 boards. Is it possible that the GPIO configuration or clock configuration have any influence on the debug protocols ?2013-03-12 3:58 AM
Is it possible that the GPIO configuration or clock configuration have any influence on the debug protocols ?
Of course, at least the GPIO configuration is a common source of debugging trouble. SWD uses less pins than JTAG, what could make up for the observed difference. Just check your layout and software with the designation of JTAG/SWD pins in the datasheet. I had rare cases were I needed to reduce the JTAG clock. But that was with CoIDE, which had been setting rather arbitrary defaults.
2013-03-12 4:06 AM
Thank you for your answer.
On my 2 boards, the JTAG pins are reserved for this feature and so they are not set/used by my software. That's why I don't understand why the JTAG protocol does not work. I will try to reduce the clock. If the SWD protocol works, is that possible that the semi hosting by SWO does not work ? I think this is quite strange ...2013-03-12 4:16 AM
The failure of JTDO to return scan chain data seems quite probable.
It's certainly possible to reconfigure the GPIO pins, or do things in the core that preclude debugger break in, but as SWD works I tend to favor issues with pins (not connected, grounded, shorted, etc) Resetting the device with BOOT0 = High, is a good way to exclude user code issues.2013-03-12 9:26 AM
Thank you Clive.
I think you are right : the problem seems to come from the signals. We fund that some signals are not at the right Voltage level. So we have checked our hardware and all JTAG pins seems now correctly connected, but the problem remains. Is there any known issues with J-Link ? I will try with other probes. Best regards,2013-03-12 9:31 AM
It remains also my problem with the ''Library low-level interface'' : it is working via semihosting, but not via SWO.
I don't understand why. Is there any difference between SWD and SWO on the hardware side ? Do I have to check any parameter on IAR ? Thank you in advance for your help.2013-03-12 10:57 AM
What version of J-Link are you using? The older ones (perhaps V5 and V6) probably don't support SWV (Serial Wire Viewer) which is kind of like the DCC (Debug Communications Channel) of the older ARM7/9 type parts.
I've personally had some mixed success with SWV, but without an interrupt it is generally less useful than streaming telemetry from a serial port. I tend to prefer the Segger J-Link over Keil's U-Link or ST's ST-Link, the former only works with Keil, and the latter is less commercial in it's implementation.2013-03-15 1:16 AM
Hello,
The problem is solved : it was the inversion of 2 pins on the JTag connector. SWD was working correctly before the modification, so I deduce that the SWO protocol uses the 2 free pins from the JTag connection. Best regards, Thomas