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

CPU Reset during a Debug session

Hi All,

I am trying to reset the CPU in the middle of a debugging session. I am using Application Interrupt and Reset control register by setting the SysResetReq bit in the SCB block. (this preserves the current debugging session also).

However, as I am using ASM its a bit cumbersome.  This is the code snippet I am trying to use..

AIRCR   EQU 0xE000ED0C.

.

ldrr10, =0x05FA0000
LDRR8, =AIRCR ;
STRR8, [R10];

Any feedback/input help will always be appreciated.

Thanks!!

BR,

\ksnf3000

Parents
  • Hi Ali,

    Thanks for the STM link, I will try this out with the STM32 board tommorrow and let you know the result.

    jblack however, this complete reset has actually removed all the data, as you correctly pointed out ; so effectively whatever debugging data I thought was useful, now also has been resetted. And I think when I used a value of 1 (instead of 4) this was not happening. i will have to do this again to make sure as it seems very unpredictable. my main goal is : i write data to SRAM; perform a software reset; and then continue with the remainder of my program which now accesses the SRAM so that I can see how much data is retained after the software reset.

    Thanks!!

    BR,

    \Kashif

Reply
  • Hi Ali,

    Thanks for the STM link, I will try this out with the STM32 board tommorrow and let you know the result.

    jblack however, this complete reset has actually removed all the data, as you correctly pointed out ; so effectively whatever debugging data I thought was useful, now also has been resetted. And I think when I used a value of 1 (instead of 4) this was not happening. i will have to do this again to make sure as it seems very unpredictable. my main goal is : i write data to SRAM; perform a software reset; and then continue with the remainder of my program which now accesses the SRAM so that I can see how much data is retained after the software reset.

    Thanks!!

    BR,

    \Kashif

Children
  • jblack  @Ali:  I have found something interesting. I think the value 0x05FA0004 or 0x05FA0001 which we are trying to write is not written in 1 cycle but multiple cycles. So probably that's the reason the code goes back in a loop and starts again and does not reset everything to zero. So, to confirm this I added DSB 

    loop   ldr .....

    B loop

    On applying a break point at B loop I see that all registers have been reset to 0 and the debugger now points to the Start in the startup code effectively resetting the CPU. I think the DSB instruction makes sure that this writing fully takes place and then only is the CPU completely reset.

    Please correct my understanding if I am wrong here.

    BR,

    \Kashif

  • Hi,

    We had got complementary 10 number of kit with name as below from ARM University

    STM32F4DISCOVERY(STMicroelectronic STM32F4-Discovery kit andWolfson Audio Card with ARM Keil MDK Software Development Tools.)


    Please send the Datasheets for the above mentioned Kit.


    Please send some DSP Example testcases to be executed on this Kit.


    Please send some general microcontroller based Example testcases to be executed on this Kit.


    Thanks& Regards

    Dr.Sayed Abdulhayan

    Electronics& Communication Department

    Dayananda Sagar College of Engineering

    Visvesvaraya Technological University

    Bangalore,India-560078

    Mob-00-91-9986096513