| Electronic Components Datasheet Search |
|
UM0434 Datasheet(PDF) 327 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0434 Datasheet(HTML) 327 Page - STMicroelectronics |
|
327 / 390 page ![]() Debug support UM0434 328/391 debug state where it is halted and awaiting single-step commands or a release to normal mode. 3. Scan out the OSR value to determine that the CPU clock is running and the CPU has entered debug state. This can be done in conjunction with a CPUSCR read. The OSR is shifted out during the Shift-IR state. The CPUSCR is shifted out during the Shift-DR state. The debugger should save the scanned-out value of CPUSCR for later restoration. 4. Select the DBCR0 register and update it with DBCR0[EDM] set. 5. Clear the DBSR status bits. 6. Write appropriate values to the DBCR0–DBCR3, IAC, DAC, and DBCNT registers. Note: The initial write to DBCR0 only affects the EDM bit, so the remaining portion of the register must now be initialized, keeping the EDM bit set. At this point the system is ready to begin debug operations. Depending on the desired operation, different steps must occur. 1. Optionally set the OCR[DMDIS] control bit to ensure that no TLB misses occur while performing the debug operations. 2. Optionally ensure that the values entered into the MSR portion of the CPUSCR during the following steps cause interrupts to be disabled (clearing MSR[EE] and MSR[CE]). This ensures that external interrupt sources do not cause single-step errors. To single-step the CPU: 1. The debugger scans in either a new or a previously saved value of the CPUSCR (with appropriate modification of the PC and IR as described in Chapter : Control state register (CTL) on page 321”) with a Go+NoExit OnCE command value. 2. The debugger scans out the OSR with no register selected, GO cleared, and determines that the PCU has re-entered the debug state and that no ERR condition occurred. To return the CPU to normal operation (without disabling external debug mode): 1. OCR[DMDIS] and OCR[DR] should be cleared, leaving OCR[WKUP] set. 2. The debugger restores the CPUSCR with a previously saved value of the CPUSCR (with appropriate modification of the PC and IR as described in Chapter : Control state register (CTL) on page 321”), with a Go+Exit OnCE command value. 3. OCR[WKUP] may then be cleared. To exit external debug mode: 1. The debugger should place the CPU in the debug state through the OCR[DR] with OCR[WKUP] set, scanning out and saving the CPUSCR. 2. The debugger should write to DBCR0–DBCR3 as needed, likely clearing every enable except DBCR0[EDM]. 3. The debugger should write the DBSR to a cleared state. 4. The debugger should rewrite the DBCR0 with all bits including EDM cleared. 5. The debugger should clear OCR[DR]. 6. The debugger restores the CPUSCR with the previously saved value of the CPUSCR (with appropriate modification of the PC and IR as described in Chapter : Control state register (CTL) on page 321”) with a Go+Exit OnCE command value. 7. OCR[WKUP] may then be cleared. Note: These steps are only examples rather than an exact template for debugger operations. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |