This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can not program device

Hi,

I have 2 pins that connected to transistors that turn on high-side FETs. One turns on 3.3v for the rest of the system and another one 4v.

When I turn on 3.3v everything is fine, but when I turn on 4v I can not reprogram device anymore in Keil - says Device not found.

4v lines (controlled by P0.05) do not even cross SWCLK or SWDIO lines. What could be the problem?

Device continues to operate properly, just cant do anything with the debugger.

Also eventually after a while i can reprogram the device (after i completely power it off, disconnect JTAG and UART-USB!!!).

Any idea what could be the problem?

Thanks!

  • @Sergey: Are you sure ? 1.6A is a little bit too high. When you mentioned you can't do step-by-step debugging, what exactly happened ? Have you made sure you don't use any code optimization (in C/C++ tab in setting). With optimization you won't be able to debug. If you only try to debug very simple code (without GSM for example), would it work?

  • No, its normal for GSM module to have peak current 1.6-2A, they are very short spikes, but that does happen. Not sure why you are surprised? There is no optimization turned on. When I start the debug It stops on main but once I press StepOver first function which is nothing else than setting pin to output and setting it on I get a warning that Processor cant be halted and the whole bunch of register read errors. Please see the screenshot in attachment: Screenshot So it doesnt even go into GSM part it starts behaving weirdly on the first command.

  • Sorry, I am not very familiar with the GSM module, quite surprised that it can get to 2A. I was suspecting that the high peak current can cause voltage drop and then cause the nRF51 to reset.

    I assume that you have set the optimization level to 0. Do you have very long track for SWD pins ?

    Your issue sounds pretty similar to this one. Could you try to isolate the nRF51 from the rest of the board ?

    You can send us your schematic and layout to our support portal (MyPage) for further investigation.

  • There is no reset happening during the normal operation, but may be in debug there are some special conditions that trigger it?

    Ive submitted schematics and layout via support page. SWD pin traces are pretty long indeed. We are working on adding bigger capacitor, but that was to pass a CE requirement, it might help overal system stability as well, Ill keep you posted.

  • Hi Sergey,

    I suspect the long pin traces could cause an issue, if it's longer than 15cm I would suggest you to add external pull up (SWDIO) and pull down (SWDCLK) resistors.

Related