Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
34
Добавлен:
27.04.2015
Размер:
1.98 Mб
Скачать

OnCE™ Module

12.11.2 Displaying a Specified Register

Example 12-5 shows the procedure for displaying a specified register.

Example 12-5. Display a Specified Register—OnCE

1.Send the command WRITE OPDBR with GO and no EX (OnCE command = 01001001); ODEC selects OPDBR as the destination for serial data.

2.Wait for acknowledge on DS line.

3.Send the 16-bit opcode: MOVE reg, x:OGDB

After all 16 bits have been received, the PDB drives the OPDBR. ODEC generates PRNEW and releases the chip from the halt state, and the contents of the register specified in the instruction is loaded in the OPGDBR. The PRCYC1 signal (an internal signal) that marks the end of the instruction brings the chip again to the halt state, and an acknowledge is issued to the command controller.

4.Wait for acknowledge on DS line.

5.Send the command READ OPGDBR (OnCE command = 11001000); ODEC selects PGDB as the source for serial data, and an acknowledge is issued to the command controller.

6.Wait for acknowledge on DS line.

7.Issue 16 clocks to read out data from selected register.

12.11.3 Displaying X Memory Area Starting at Address xxxx

Example 12-6 shows the procedure for displaying X memory area; this procedure uses Rn to minimize serial traffic.

Example 12-6. Display X Memory Area from Address xxxx—OnCE

1.Send the command WRITE OPDBR with GO and no EX (OnCE command = 01001001); ODEC selects OPDBR as the destination for serial data.

2.Wait for acknowledge on DS line.

3.Send the 16-bit opcode: MOVE R0,x:OGDB

After all 16 bits have been received, the PDB drives the OPDBR. ODEC generates PRNEW and releases the chip from the halt state, and the contents of R0 are loaded in the OPGDBR. The PRCYC1 signal that marks the end of the instruction brings the chip again to the halt state, and an acknowledge is issued to the command controller.

4.Wait for acknowledge on DS line.

5.Send the command READ OPGDBR (OnCE command = 11001000). ODEC selects PGDB as the source for serial data, and an acknowledge is issued to the command controller.

6.Wait for acknowledge on DS line.

7.The command controller generates 16 clocks that shift out the contents of the OPGDBR. The value of R0 is thus saved and will be restored before exiting the debug mode.

8.Send the command WRITE OPDBR with no GO and no EX (OnCE command = 00001001); ODEC selects OPDBR as destination for the serial data.

9.Wait for acknowledge on DS line.

12-56

DSP56824 User’s Manual

 

Using the OnCE Port

Example 12-6. Display X Memory Area from Address xxxx—OnCE (Continued)

10.Send the 16 bits of opcode: MOVE #$xxxx,R0. After all 16 bits have been received, the PDB drives the OPDBR. ODEC generates PRNEW, so the PILR is loaded with the opcode. An acknowledge is issued to the command controller.

11.Wait for acknowledge on DS line.

12.Send the command WRITE OPDBR with GO and no EX (OnCE command = 01001001); ODEC selects OPDBR as the destination for serial data.

13.Wait for acknowledge on DS line.

14.Send the 16 bits of the second word of: MOVE #$xxxx,R0 (the xxxx field) where xxxx is the address to be read.

After all 16 bits have been received, the PDB drives the OPDBR. ODEC releases the chip from the halt state, and the instruction starts execution. The PRCYC1 signal that marks the end of the instruction brings the chip again to the halt state, and an acknowledge is issued to the command controller.

15.Wait for acknowledge on DS line.

16.Send the command WRITE OPDBR with GO and no EX (OnCE command = 01001001); ODEC selects OPDBR as the destination for serial data.

17.Wait for acknowledge on DS line.

18.Send the 16 bit opcode: MOVE X:(R0)+,x:OGDB. After all 16 bits have been received, the PDB drives the OPDBR. ODEC generates PRNEW and releases the chip form the halt state, and the contents of X:(R0) are loaded in the OPGDBR. The PRCYC1 signal that marks the end of the instruction brings the chip again to the halt state, and an acknowledge is issued to the command controller.

19.Wait for acknowledge on DS line.

20.Send the command READ OPGDBR (OnCE command = 11001000). ODEC selects PGDB as the source for serial data and an acknowledge is issued to the command controller.

21.Wait for acknowledge on DS line.

22.Issue 16 clocks to read out data from selected register.

23.Send the command NO SELECTION with GO and no EX (OnCE command 11000000); ODEC releases the chip from the halt state, and the instruction is executed once again (in a REPEAT-like fashion). The PRCYC1 signal that marks the end of the instruction brings the chip again to the halt state, and an acknowledge is issued to the command controller.

24.Wait for acknowledge on DS line.

25.Send the command READ OPGDBR (OnCE command = 11001000). ODEC selects GDB as the source for serial data and an acknowledge is issued to the command controller.

26.Wait for acknowledge on DS line.

27.Issue 16 clocks to read out data from selected register.

28.Repeat from step 23 onward until the entire memory area is examined. At the end of the process, R0 must be restored.

 

OnCE™ Module

12-57

Соседние файлы в папке DSP568xx