• AVR Freaks

Hot!POR when hitting a break point

Author
rmorley78
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/11/30 13:48:54
  • Location: 0
  • Status: offline
2019/12/05 14:46:47 (permalink)
0

POR when hitting a break point

I been using a Curiosity PIC32MZ EF eval board for a couple of months with no issues and today it is giving me a BOR every time it stops on a break point I've set. I've monitored the power on the rail and it never drops below 2.6V so this BOR is shouldn't be happening. This is repeatable for all breakpoints not just a certain parts of the code. Is there a way to stop this or do I have to order a new board?
 
Any help at this point would be appreciated. 
 
Rob Morley
 
If anyone want to know this is what I'm using.
  • ICD3
  • MPLAB X v5.15
  • XC32 v2.15
  • Windows 7
#1

4 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3310
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: POR when hitting a break point 2019/12/05 15:43:32 (permalink)
    +2 (2)
    Are you really sure about the BOR?
    Or could it be a watchdog reset? Just by chance ...

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    rmorley78
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2016/11/30 13:48:54
    • Location: 0
    • Status: offline
    Re: POR when hitting a break point 2019/12/06 07:34:12 (permalink)
    0
    It's what I'm seeing in the RCON register, both POR and BOR bits are set and the watchdog and dead man timers are not enabled. If I clear the RCON register after the reset and then check them at the beginning of main after another reset caused by the breakpoint trugger POR and BOR are set.
     
    At this point everything points to a BOR, but I'm not sure if this is the real cause of the reset considering I cannot measure the problem on any of the VDD pins using a high BW oscilloscope. The code will run without any problems as long as none of the break points are triggered as soon as the break point is triggers the PIC32 resets and notes the cause of the reset as a BOR and POR. 
     
    I know what starts the problem but I still don't know what causes it to go from break point trigger to BOR.
    #3
    moser
    Super Member
    • Total Posts : 523
    • Reward points : 0
    • Joined: 2015/06/16 02:53:47
    • Location: Germany
    • Status: offline
    Re: POR when hitting a break point 2019/12/09 02:32:50 (permalink)
    +1 (1)
    rmorley78
    It's what I'm seeing in the RCON register, both POR and BOR bits are set and the watchdog and dead man timers are not enabled. If I clear the RCON register after the reset and then check them at the beginning of main after another reset caused by the breakpoint trugger POR and BOR are set.

    Note, that you definitely have to clear the RCON BOR and RCON POR flags manually at every start after evaluating RCON. Otherwise, it will still be present at the next (software/watchdog/deadman/...) restart, and then they are not meaningful.
     
    Are you sure, you are doing the RCON clear correctly? And when evaluating RCON, did you verify that no other flag in RCON besides BOR and POR is set?
    #4
    rmorley78
    New Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2016/11/30 13:48:54
    • Location: 0
    • Status: offline
    Re: POR when hitting a break point 2019/12/09 07:18:07 (permalink)
    0
    It's hard to tell if RCON (refer to code below)is being cleared correctly when the processor is reset at all break point but yes I believe I am. 
     
    Example of RCON clear using <xc.h>
    RCON = 0;
     
     
    RCON bits 31 and 30 are set as well but they are undefined in the data sheet so I've ignored them for now. The only other bits set are POR and BOR in the RCON register. I am seeing no other reset conditions other than those.
     
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5