Electronic Components Datasheet Search
  English  ▼

X  

AVR32AP Datasheet(PDF) 97 Page - ATMEL Corporation

Part # AVR32AP
Description  32-bit AVR Microcontroller
PDF  181 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ATMEL [ATMEL Corporation]
Direct Link  http://www.atmel.com
Logo ATMEL - ATMEL Corporation

AVR32AP Datasheet(HTML) 97 Page - ATMEL Corporation

Back Button AVR32AP Datasheet HTML 93Page - ATMEL Corporation AVR32AP Datasheet HTML 94Page - ATMEL Corporation AVR32AP Datasheet HTML 95Page - ATMEL Corporation AVR32AP Datasheet HTML 96Page - ATMEL Corporation AVR32AP Datasheet HTML 97Page - ATMEL Corporation AVR32AP Datasheet HTML 98Page - ATMEL Corporation AVR32AP Datasheet HTML 99Page - ATMEL Corporation AVR32AP Datasheet HTML 100Page - ATMEL Corporation AVR32AP Datasheet HTML 101Page - ATMEL Corporation Next Button
Zoom Inzoom in Zoom Outzoom out
 97 / 181 page
background image
97
32001A–AVR32–06/06
AVR32
1.
Write RAR_DBG to the Debug Program Counter.
2.
Increment RAR_DBG by 2 or 4, so the register points to the start of the next word in the
program memory.
3.
Write 1 to Instruction Replace (IRP) in DC.
4.
Write a retd instruction to DINST. The CPU will exit Debug Mode and stall while waiting
for new instructions.
5.
Write the stored word to DINST. This instruction is fetched by the CPU, and the CPU
continues normal program execution.
9.2.6.1
Instruction replacement example
Table 9-1 shows an example of a code where the user wants to insert a breakpoint.
The tool wants to insert a software breakpoint on the instruction "adc r6,r12,r7" on
PC=0x000016. This is an extended instruction, and only the upper halfword needs to be
replaced by the breakpoint instruction.
1.
The upper halfword is contained within the word located at 0x000014, and the debug
tool stores this value (0xC0ACF807).
2.
The debugger writes a breakpoint instruction (opcode 0xD673) to location 0x000016 in
the CPU’s program memory to replace the most significant word of the breakpointed
instruction.
3.
When the breakpoint instruction executes, the CPU will enter OCD Mode, and DS:DBS
and DS:SWB are set, indicating that OCD Mode is entered due to a software
breakpoint.
4.
The tool performs a normal sequence of operation in OCD Mode.
5.
When the tool is ready to return to normal CPU operation, it reads the RAR_DBG value
to find the return address.
6.
The tool inserts CPU instructions to DINST to increment RAR_DBG by 2, so it is
aligned to the next word in the program memory.
7.
The tool inserts a "retd" instruction to DINST. The tool will receive a Debug Status mes-
sage, which indicates that the CPU has exited OCD Mode, and is now waiting for one
more instruction from the tool.
8.
The tool writes the return address (0x000016) to the Debug Program Counter (DPC).
9.
The tool looks up the stored instruction word (based on the return address) and writes
this value (0xC0ACF807) to the Debug Instruction Register (DINST). The CPU now
resumes normal operation.
Table 9-1.
Example of a user code section
PC value
Opcode
Instruction
0x000010
0x0E9C
mov r12,r7
0x000012
0x201C
sub r12,0x01
0x000014
0xC0AC
rcall label1
0x000016
0xF8070046
adc r6,r12,r7
0x00001A
0x2027
sub r7,0x02



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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