-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My DAPLink interface does not reset target (nRF51822) after download program. #166
Comments
Hi @iotvietmember, what are you using to program over DAP-HID? Is it pyOCD, OpenOCD or some other tool? The DAP-HID endpoint provides a debugging interface that is completely controlled by the PC. Whatever tool you are using must reset the target. |
Thanks for your reply. |
Good to hear. Should this issue be closed then? |
Why? |
Are you having problems with Keil uVision 4? |
May be. |
Thanks c1728p9! |
@iotvietmember are you still having problem with Keil? Keil should work as well as pyOCD does. It sounds like you found a setting in Keil/uVision that solved your problem. |
@c1728p9 No, I am still having problem with Keil. I tried to use some settings in Keil/uVision but this problem is not OK |
When using uVision what reset mode are you using? Autodetect, HW RESET, SYSRESETREQ or VECTRESET? Also, you mention that CMSIS-DAP works fine with Keil. Can you clarify what you mean by this? DAPLink implements the CMSIS-DAP protocol. Is this another version of firmware? |
I used all reset options, such as Autodetect, HW RESET, SYSRESETREQ or VECTRESET but do not successful. |
I've been seeing the same issue as iotvietmember. After loading the firmware into the LPC11U35 and disconnecting and reconnecting the USB cable, while holding the reset button, I copy the two files to the DAPLink drive: The details.txt contains the following: DAPLink Firmware - see https://mbed.com/daplink Here is what I am seeing: If I run the pyocd.py utility: In Keil (V5.21a most recent) in the "Options for Target"->Utilities tab-> Settings , When I download to the target from within Keil (Download Icon or Menu->Flash->Download) *** Using Compiler 'V5.06 update 3 (build 300)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Although the message above ends with "Application running ..." , the nRF51822 Pressing and releasing the reset button on the SWD programmer will start I have also tried it with the "Reset and Run" un-checked with the same behavior. Earlier in the thread, @c1728p9 asked about reset mode. I have tried all 4 options: |
@OSHChip-Owner Your problem is the same issue as me |
@iotvietmember Yes I know, as I have written at the top of my comment. The purpose of my comment is to give much more details to @c1728p9 to |
Hi @iotvietmember and @OSHChip-Owner, I took a look at this and was able to reproduce the problem. In uVision when the Reset and Run option is set and you program via Menu->Flash->Download uVision tries to reset the nrf51 by setting the nRESET pin low using the DAP_SWJ_Pins command (confirmed by capturing wireshark logs) regardless of reset options. The problem is that the nrf51 doesn't have a reset pin so this does nothing. Additionally, as a test I created a build for the ArchBLE which does an nrf51 specific reset when it would normally set the reset pin low. This image can be found here. Unfortunately, there is not a generic DAPLink fix for this, as this change will break reset on other targets. I opened a tick on silver.arm.com for this since Reset and Run is always using a pin reset rather than the selected reset type. |
Hi @c1728p9 , Thanks for looking into this. I downloaded the image you created, and can confirm that downloads within Keil V5.24 now starts the program in the target (an nRF51822) as desired. Are the sources for the changes you made to V244 to work around the Keil issue available? This firmware also seems to have solved another issue I had, which was that settings such as Thanks, |
Hi @OSHChip-Owner I pushed my reset changes here (note - these are hacks): As for the auto_rst.cfg persistence, this is because the lpc11u35 didn't have a flash driver in DAPLink. The recently released version 0244 has a flash driver for the lpc11u35 (added in #255), so if you try the most recent release settings will persist. |
Hi.
I have a problem with DAPLink interface.
DAPLink connect to nRF51822 over SWD (SWDCLK, SWDIO) and TX, RX.
If I use drag-drop method with MSD to program firmware to target, target will be reset after done (Automation-allowed=1, Auto Reset=1).
But after I download program to target (DAP-HID), target will not be reset!
That is my problem. Please help me! Thanks
The text was updated successfully, but these errors were encountered: