We've recently got hold of this board, but found it impossible to program the onboard K65 via JTAG (J18) despite removing J32 as described in the UsersGuide page 12.
J32 disconnects SWD_CLK from OpenSDA, leaving it free to be controlled by our debugger.
Unfortunately, no jumper is available for disconnecting SWD_DIO from OpenSDA. This means SWD_DIO is held by the OpenSDA device, causing trouble with the JTAG debugger.
First: Has anyone had the same experience?
Second: Any suggestions on how to workaround this? We've thought about erasing the OpenSDA, thus causing its GPIO to tristate, hopefully allowing us to control the K65 JTAG port via J18.
Relevant schematics are on TWR-K65F180M-SCH.pdf page 5 (signals PTA0 and PTA3)
Solved! Go to Solution.
OK, here is the solution, this binary needs to be updated on the TWR-k65 board and after that it just works fine.
https://community.nxp.com/thread/358952
- Press and hold RESET button (SW1).
- Connect the mini-USB port (J7) to give power to the board. It should enumerate as a BOOTLOADER volume.
- Drag and drop the attached J-Link binary.
- Disconnect and connect the USB cable.
- Now it should enumerate as J-Link debug interface. Try to connect with KDS using the Segger connection.
Binary is also attached here
OK, here is the solution, this binary needs to be updated on the TWR-k65 board and after that it just works fine.
https://community.nxp.com/thread/358952
- Press and hold RESET button (SW1).
- Connect the mini-USB port (J7) to give power to the board. It should enumerate as a BOOTLOADER volume.
- Drag and drop the attached J-Link binary.
- Disconnect and connect the USB cable.
- Now it should enumerate as J-Link debug interface. Try to connect with KDS using the Segger connection.
Binary is also attached here
Hi Martin,
Which revision you get for TWR-K65? Is it RevD? I see the topic listed that you are using RevA0.
Hao
Hi Hao :smileyhappy:
Well, the label on the box says 'Rev A0' and labels on the PCB state '700-28036 RevA' resp 'SCH-29036 RevD'. Take your pick.
//mA
martinfiltenborgWere you able to resolve your issue ?
I am in the same boat now, any help is appreciated.
Thanks
Hi Martin
I've reproduced your procedure to debug the TWR-K65F180M.
However I succeeded to debug the board by using the J-link through the J18 interface, as the Fig1 shows.
I'd like to suggest that you need check the hardware configuration again and make sure the setting is completely correct.
If it still doesn't work, please contact with the local distributor to reply for another board instead of this one.
Fig 1
Hope it helps.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ping :smileyhappy:
Good to hear.
Yes, settings seem to be a too-little-documented issue. Two people here have independently from each other come to the conclusion that correct settings are 'Default' + J32=OFF (SWD clock disconnection) as documented on page 12 of "TWR-K65F180M User's Guide, Rev. 0". What settings do you use?
Also, we'd like to know which revision of the PCB (not the schematic...) you've used for your successful procedure. If different revisions are out there, we need know this to be sure if your scenario is different from ours.
Here, we're using a Segger ARM flasher device intended for production use. You use a Jlink. Both should do the job nicely.
Hardware : We have several K65-boards. They all work identically. Unlikely that exchanging one of them for yet another board will help.
Edit: What WILL help is powering up the board holding RESET button. This causes the OpenSDA cpu to enter bootload-mode, tristating its IO. A more permanent solution is lifting U7 pin 4 (SWDIO).
Hi Martin,
The version of my board is as same as yours.
I was wondering if you can share the screenshot of error message when you use the external debug tool.
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Screenshot. Sure:
Those working with the Segger tell me that it seems their flasher is unable to hold the board in reset during powerup (Segger delivers power through JTAG).
The same Segger Flasher works flawlessly with an aging TWR-K60N512 board :smileyhappy:
By now, we've had a chance to connect a Lauterbach uTrace to the TWR-K65 board and see it work OK. This means the above issue is restricted to use with Segger's Flasher (SEGGER - The Embedded Experts - Flasher ARM ).
Hi Martin,
I've already contacted with the AE and he pointed out that the OpenSDA interface should load the J-Link OpenSDA firmware before use the external debugger.
I've attached the the J-Link OpenSDA firmware and try it.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------