Вывод РОНа » History » Version 3
krufter_multiclet, 07/19/2013 11:05 AM
1 | 1 | krufter_multiclet | h1. Вывод РОНа |
---|---|---|---|
2 | 1 | krufter_multiclet | |
3 | 3 | krufter_multiclet | +Для платы HW1-MCp04:+ |
4 | 2 | krufter_multiclet | |
5 | 2 | krufter_multiclet | <pre> |
6 | 2 | krufter_multiclet | .include "HDL50001_pcf.inc" |
7 | 2 | krufter_multiclet | |
8 | 2 | krufter_multiclet | .alias ron2 4 |
9 | 2 | krufter_multiclet | .alias ron3 5 |
10 | 2 | krufter_multiclet | |
11 | 2 | krufter_multiclet | .alias UART_DATA UART0_DATA |
12 | 2 | krufter_multiclet | .alias UART_BDR UART0_BDR |
13 | 2 | krufter_multiclet | .alias UART_ST UART0_ST |
14 | 2 | krufter_multiclet | .alias UART_CR UART0_CR |
15 | 2 | krufter_multiclet | |
16 | 2 | krufter_multiclet | .alias UART_PORT_PIN 0x300 |
17 | 2 | krufter_multiclet | .alias UART_PORT_BPS GPIOB_BPS |
18 | 2 | krufter_multiclet | |
19 | 2 | krufter_multiclet | .text |
20 | 2 | krufter_multiclet | |
21 | 2 | krufter_multiclet | paragraph1: |
22 | 2 | krufter_multiclet | setl #ron3, 0x12345678 |
23 | 2 | krufter_multiclet | jmp initUART |
24 | 2 | krufter_multiclet | complete |
25 | 2 | krufter_multiclet | |
26 | 2 | krufter_multiclet | initUART: |
27 | 2 | krufter_multiclet | getl 0x00000300 |
28 | 2 | krufter_multiclet | wrl @1, UART_PORT_BPS |
29 | 2 | krufter_multiclet | getl 0x00000104 |
30 | 2 | krufter_multiclet | wrl @1, UART_BDR |
31 | 2 | krufter_multiclet | getl 0x00000003 |
32 | 2 | krufter_multiclet | wrl @1, UART_CR |
33 | 2 | krufter_multiclet | jmp send_byte_UART |
34 | 2 | krufter_multiclet | setl #ron2, 7 |
35 | 2 | krufter_multiclet | complete |
36 | 2 | krufter_multiclet | |
37 | 2 | krufter_multiclet | send_byte_UART: |
38 | 2 | krufter_multiclet | getl #ron2 |
39 | 2 | krufter_multiclet | jne @1, send_byte_UART |
40 | 2 | krufter_multiclet | je @2, buf_TXD |
41 | 2 | krufter_multiclet | getq #ron3 |
42 | 2 | krufter_multiclet | slrq @1, 8 |
43 | 2 | krufter_multiclet | setq #ron3, @1 |
44 | 2 | krufter_multiclet | wrl @3, UART_DATA |
45 | 2 | krufter_multiclet | subl @7, 1 |
46 | 2 | krufter_multiclet | setl #ron2, @1 |
47 | 2 | krufter_multiclet | complete |
48 | 2 | krufter_multiclet | |
49 | 2 | krufter_multiclet | buf_TXD: |
50 | 2 | krufter_multiclet | rdl UART_ST |
51 | 2 | krufter_multiclet | getl 0x00000004 |
52 | 2 | krufter_multiclet | and @1, @2 |
53 | 2 | krufter_multiclet | je @1, buf_TXD |
54 | 2 | krufter_multiclet | jne @2, end |
55 | 2 | krufter_multiclet | complete |
56 | 2 | krufter_multiclet | |
57 | 2 | krufter_multiclet | end: |
58 | 2 | krufter_multiclet | getl 0x1000 |
59 | 2 | krufter_multiclet | complete |
60 | 2 | krufter_multiclet | </pre> |
61 | 2 | krufter_multiclet | |
62 | 3 | krufter_multiclet | +Для платы LDM-MCp04:+ |
63 | 2 | krufter_multiclet | |
64 | 1 | krufter_multiclet | <pre> |
65 | 1 | krufter_multiclet | .include "HDL50001_pcf.inc" |
66 | 1 | krufter_multiclet | |
67 | 1 | krufter_multiclet | .alias ron2 4 |
68 | 1 | krufter_multiclet | .alias ron3 5 |
69 | 1 | krufter_multiclet | |
70 | 1 | krufter_multiclet | .alias UART_DATA UART3_DATA |
71 | 1 | krufter_multiclet | .alias UART_BDR UART3_BDR |
72 | 1 | krufter_multiclet | .alias UART_ST UART3_ST |
73 | 1 | krufter_multiclet | .alias UART_CR UART3_CR |
74 | 1 | krufter_multiclet | |
75 | 1 | krufter_multiclet | .alias UART_PORT_PIN 0x300 |
76 | 1 | krufter_multiclet | .alias UART_PORT_BPS GPIOD_BPS |
77 | 1 | krufter_multiclet | |
78 | 1 | krufter_multiclet | .text |
79 | 1 | krufter_multiclet | |
80 | 1 | krufter_multiclet | paragraph1: |
81 | 1 | krufter_multiclet | setl #ron3, 0x12345678 |
82 | 1 | krufter_multiclet | jmp initUART |
83 | 1 | krufter_multiclet | complete |
84 | 1 | krufter_multiclet | |
85 | 1 | krufter_multiclet | initUART: |
86 | 1 | krufter_multiclet | getl 0x00000300 |
87 | 1 | krufter_multiclet | wrl @1, UART_PORT_BPS |
88 | 1 | krufter_multiclet | getl 0x00000104 |
89 | 1 | krufter_multiclet | wrl @1, UART_BDR |
90 | 1 | krufter_multiclet | getl 0x00000003 |
91 | 1 | krufter_multiclet | wrl @1, UART_CR |
92 | 1 | krufter_multiclet | jmp send_byte_UART |
93 | 1 | krufter_multiclet | setl #ron2, 7 |
94 | 1 | krufter_multiclet | complete |
95 | 1 | krufter_multiclet | |
96 | 1 | krufter_multiclet | send_byte_UART: |
97 | 1 | krufter_multiclet | getl #ron2 |
98 | 1 | krufter_multiclet | jne @1, send_byte_UART |
99 | 1 | krufter_multiclet | je @2, buf_TXD |
100 | 1 | krufter_multiclet | getq #ron3 |
101 | 1 | krufter_multiclet | slrq @1, 8 |
102 | 1 | krufter_multiclet | setq #ron3, @1 |
103 | 1 | krufter_multiclet | wrl @3, UART_DATA |
104 | 1 | krufter_multiclet | subl @7, 1 |
105 | 1 | krufter_multiclet | setl #ron2, @1 |
106 | 1 | krufter_multiclet | complete |
107 | 1 | krufter_multiclet | |
108 | 1 | krufter_multiclet | buf_TXD: |
109 | 1 | krufter_multiclet | rdl UART_ST |
110 | 1 | krufter_multiclet | getl 0x00000004 |
111 | 1 | krufter_multiclet | and @1, @2 |
112 | 1 | krufter_multiclet | je @1, buf_TXD |
113 | 1 | krufter_multiclet | jne @2, end |
114 | 1 | krufter_multiclet | complete |
115 | 1 | krufter_multiclet | |
116 | 1 | krufter_multiclet | end: |
117 | 1 | krufter_multiclet | getl 0x1000 |
118 | 1 | krufter_multiclet | complete |
119 | 1 | krufter_multiclet | </pre> |