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
  • 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

Reply
  • 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

Children
  • 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