SAM4S Xplained Pro: Code continues running after debugging is stopped

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

 

I have an issue whereby when I press "Stop Debugging" using the button in Atmel Studio, the MCU resets and continues running as if in release. I am using the SAM4S Xplained Pro kit.

 

I want the code to stop running when I press stop, i.e., for the MCU to be held in reset. How can I achieve this?

 

Cheers

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not currently, when exiting debug Atmel Studio resets (or not even that, if you did an Attach instead of a launch) and detaches. We do not hold things in reset after we have disconnected from the device that is being debugged.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is quite a major limitation. Not only does the code reset, it periodically resets after I've stopped debugging.

 

Is there a work-around, that doesn't just involve yanking the cable out? Reliably testing hardware interfaces is made incredibly difficult if there isn't one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do an attach instead of a launch, should as far as I know not reset when we attach to the device (we just slam on the breaks instead) and we will not reset after the debug session ends (from the top of my head, so details might be a bit sketchy). Note that we will not program anything when attaching either.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This process works insofar as it stops the MCU power-on-resetting, but when "Stop Debugging" is pressed it still just keeps the program running - I really want the option of reset being held.

 

Can this issue be raised with Atmel, please?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's in the backlog already :) 

 

Why do you want to keep it in reset specifically? 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you - I look forward to the resolution!

 

Save for actually stripping power from the MCU whilst being physically connected, it's the next best thing. Both of these options allow finer control within tests that utilise external hardware, e.g., NAND flash.