Advertisement
uaa

new timing for LGT8x/gcc-7.3.0

uaa
Jul 23rd, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.40 KB | None | 0 0
  1.  
  2. SoftwareSerialExample-730.ino.elf: file format elf32-avr
  3.  
  4. - Tx Timing 1: from start bit to first bit
  5.  
  6. 0000036e <_ZN14SoftwareSerial5writeEh>:
  7. AVR LGT
  8. 3d4: 20 83 st Z, r18
  9. ------------
  10. 1 1 1 1 3d6: e7 01 movw r28, r14
  11. 3d8: 21 97 sbiw r28, 0x01 ; delay_loop
  12. 3da: f1 f7 brne .-4 ; not count here
  13. 3dc: 00 00 nop ; not count here
  14. 1 1 1 1 3de: 28 e0 ldi r18, 0x08 ; 8
  15. 1 1 1 1 3e0: 46 2f mov r20, r22
  16. 1 1 1 1 3e2: 50 e0 ldi r21, 0x00 ; 0
  17. 2 2 1 1 3e4: 30 81 ld r19, Z
  18. 1 2 1 2 3e6: 60 ff sbrs r22, 0
  19. 2 1 3e8: 1c c0 rjmp .+56 ; 0x422 <__LOCK_REGION_LENGTH__+0x22>
  20. 1 1 3ea: 38 2b or r19, r24
  21. 2 2 1 1 3ec: 30 83 st Z, r19
  22.  
  23. 1 1 422: 39 23 and r19, r25
  24. 2 1 424: e3 cf rjmp .-58 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x7e>
  25. ------------
  26. 14 11 10 9
  27.  
  28. - Tx Timing 2: between bits
  29.  
  30. AVR LGT
  31. ------------
  32. 1 1 1 1 3e0: 46 2f mov r20, r22
  33. 1 1 1 1 3e2: 50 e0 ldi r21, 0x00 ; 0
  34. 2 2 1 1 3e4: 30 81 ld r19, Z
  35. 1 2 1 2 3e6: 60 ff sbrs r22, 0
  36. 2 1 3e8: 1c c0 rjmp .+56 ; 0x422 <__LOCK_REGION_LENGTH__+0x22>
  37. 1 1 3ea: 38 2b or r19, r24
  38. 2 2 1 1 3ec: 30 83 st Z, r19
  39. 1 1 1 1 3ee: e7 01 movw r28, r14
  40. 3f0: 21 97 sbiw r28, 0x01 ; delay_loop
  41. 3f2: f1 f7 brne .-4 ; not count here
  42. 3f4: 00 00 nop ; not count here
  43. 1 1 1 1 3f6: ba 01 movw r22, r20
  44. 1 1 1 1 3f8: 75 95 asr r23
  45. 1 1 1 1 3fa: 67 95 ror r22
  46. 1 1 1 1 3fc: 21 50 subi r18, 0x01 ; 1
  47. 2 2 2 2 3fe: 81 f7 brne .-32 ; 0x3e0 <_ZN14SoftwareSerial5writeEh+0x72>
  48.  
  49. 1 1 422: 39 23 and r19, r25
  50. 2 1 424: e3 cf rjmp .-58 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x7e>
  51. ------------
  52. 19 16 15 14
  53.  
  54. - Tx Timing 3: from last bit to stop bit
  55.  
  56. AVR LGT
  57. ------------
  58. 3ec: 30 83 st Z, r19
  59. 1 1 1 1 3ee: e7 01 movw r28, r14
  60. 3f0: 21 97 sbiw r28, 0x01 ; delay_loop
  61. 3f2: f1 f7 brne .-4 ; not count here
  62. 3f4: 00 00 nop ; not count here
  63. 1 1 1 1 3f6: ba 01 movw r22, r20
  64. 1 1 1 1 3f8: 75 95 asr r23
  65. 1 1 1 1 3fa: 67 95 ror r22
  66. 1 1 1 1 3fc: 21 50 subi r18, 0x01 ; 1
  67. 1 1 1 1 3fe: 81 f7 brne .-32 ; 0x3e0 <_ZN14SoftwareSerial5writeEh+0x72>
  68. 1 1 1 1 400: 11 23 and r17, r17
  69. 1 2 1 2 402: 89 f0 breq .+34 ; 0x426 <__LOCK_REGION_LENGTH__+0x26>
  70. 2 1 404: 80 81 ld r24, Z
  71. 1 1 406: 89 23 and r24, r25
  72. 2 1 408: 80 83 st Z, r24
  73.  
  74. 2 1 426: 90 81 ld r25, Z
  75. 1 1 428: 89 2b or r24, r25
  76. 2 1 42a: ee cf rjmp .-36 ; 0x408 <__LOCK_REGION_LENGTH__+0x8>
  77. ------------
  78. 13 14 11 12
  79.  
  80. - Rx Timing 1: raise interrupt signal
  81.  
  82. 4clk cycles, maybe AVR/LGT same
  83.  
  84. - Rx Timing 2: CPU recognize interrupt signal
  85.  
  86. 4clk cycles, maybe AVR/LGT same
  87.  
  88. - Rx Timing 3: jmp @ vectors ~ before centering delay
  89.  
  90. AVR LGT
  91. ------------
  92. 00000000 <__vectors>:
  93. 3 3 3 3 c: 0c 94 03 03 jmp 0x606 ; 0x606 <__vector_3>
  94.  
  95. 00000606 <__vector_3>:
  96. 2 2 1 1 606: 1f 92 push r1
  97. 2 2 1 1 608: 0f 92 push r0
  98. 1 1 1 1 60a: 0f b6 in r0, 0x3f ; 63
  99. 2 2 1 1 60c: 0f 92 push r0
  100. 1 1 1 1 60e: 11 24 eor r1, r1
  101. 2 2 1 1 610: 2f 93 push r18
  102. 2 2 1 1 612: 3f 93 push r19
  103. 2 2 1 1 614: 4f 93 push r20
  104. 2 2 1 1 616: 5f 93 push r21
  105. 2 2 1 1 618: 6f 93 push r22
  106. 2 2 1 1 61a: 7f 93 push r23
  107. 2 2 1 1 61c: 8f 93 push r24
  108. 2 2 1 1 61e: 9f 93 push r25
  109. 2 2 1 1 620: af 93 push r26
  110. 2 2 1 1 622: bf 93 push r27
  111. 2 2 1 1 624: ef 93 push r30
  112. 2 2 1 1 626: ff 93 push r31
  113. 2 2 2 2 628: e0 91 88 01 lds r30, 0x0188 ; 0x800188 <_ZN14SoftwareSerial13active_objectE>
  114. 2 2 2 2 62c: f0 91 89 01 lds r31, 0x0189 ; 0x800189 <_ZN14SoftwareSerial13active_objectE+0x1>
  115. 2 2 1 1 630: 30 97 sbiw r30, 0x00 ; 0
  116. 1 1 1 1 632: 49 f0 breq .+18 ; 0x646 <__vector_3+0x40>
  117. 2 2 1 1 634: a6 85 ldd r26, Z+14 ; 0x0e
  118. 2 2 1 1 636: b7 85 ldd r27, Z+15 ; 0x0f
  119. 2 2 1 1 638: 85 85 ldd r24, Z+13 ; 0x0d
  120. 2 2 1 1 63a: 96 8d ldd r25, Z+30 ; 0x1e
  121. 1 2 1 2 63c: 91 ff sbrs r25, 1
  122. 2 1 63e: 14 c0 rjmp .+40 ; 0x668 <__vector_3+0x62>
  123. 2 1 640: 9c 91 ld r25, X
  124. 1 1 642: 89 23 and r24, r25
  125. 2 2 644: a1 f4 brne .+40 ; 0x66e <__vector_3+0x68>
  126.  
  127. 2 1 668: 9c 91 ld r25, X
  128. 1 1 66a: 89 23 and r24, r25
  129. 1 1 66c: 61 f7 brne .-40 ; 0x646 <__vector_3+0x40>
  130. 2 2 1 1 66e: a3 89 ldd r26, Z+19 ; 0x13
  131. 2 2 1 1 670: b4 89 ldd r27, Z+20 ; 0x14
  132. 2 2 1 1 672: 9c 91 ld r25, X
  133. 2 2 1 1 674: 85 89 ldd r24, Z+21 ; 0x15
  134. 1 1 1 1 676: 80 95 com r24
  135. 1 1 1 1 678: 89 23 and r24, r25
  136. 2 2 1 1 67a: 8c 93 st X, r24
  137. 2 2 1 1 67c: 86 89 ldd r24, Z+22 ; 0x16
  138. 2 2 1 1 67e: 97 89 ldd r25, Z+23 ; 0x17
  139. 680: 01 97 sbiw r24, 0x01 ; delay_loop
  140. 682: f1 f7 brne .-4 ; not count here
  141. 684: 00 00 nop ; not count here
  142. ------------
  143. 73 73 44 45
  144.  
  145. - Rx Timing 4: after centering delay ~ read signal pin
  146.  
  147. AVR LGT
  148. ------------
  149. 680: 01 97 sbiw r24, 0x01 ; delay_loop
  150. 682: f1 f7 brne .-4 ; not count here
  151. 684: 00 00 nop ; not count here
  152. 2 1 686: 60 8d ldd r22, Z+24 ; 0x18
  153. 2 1 688: 71 8d ldd r23, Z+25 ; 0x19
  154. 2 1 68a: a6 85 ldd r26, Z+14 ; 0x0e
  155. 2 1 68c: b7 85 ldd r27, Z+15 ; 0x0f
  156. 2 1 68e: 55 85 ldd r21, Z+13 ; 0x0d
  157. 1 1 690: 38 e0 ldi r19, 0x08 ; 8
  158. 1 1 692: 20 e0 ldi r18, 0x00 ; 0
  159. 1 1 694: cb 01 movw r24, r22
  160. 696: 01 97 sbiw r24, 0x01 ; dealy_loop
  161. 698: f1 f7 brne .-4 ; not count here
  162. 69a: 00 00 nop ; not count here
  163. 1 1 69c: 82 2f mov r24, r18
  164. 1 1 69e: 90 e0 ldi r25, 0x00 ; 0
  165. 1 1 6a0: 95 95 asr r25
  166. 1 1 6a2: 87 95 ror r24
  167. 1 1 6a4: 28 2f mov r18, r24
  168. 2 1 6a6: 4c 91 ld r20, X
  169. ------------
  170. 20 14
  171.  
  172. - Rx Timing 5: inside read loop
  173.  
  174. AVR LGT
  175. ------------
  176. 1 1 1 1 694: cb 01 movw r24, r22
  177. 696: 01 97 sbiw r24, 0x01 ; delay_loop
  178. 698: f1 f7 brne .-4 ; not count here
  179. 1 1 1 1 69a: 00 00 nop ; not count here
  180. 1 1 1 1 69c: 82 2f mov r24, r18
  181. 1 1 1 1 69e: 90 e0 ldi r25, 0x00 ; 0
  182. 1 1 1 1 6a0: 95 95 asr r25
  183. 1 1 1 1 6a2: 87 95 ror r24
  184. 1 1 1 1 6a4: 28 2f mov r18, r24
  185. 2 2 1 1 6a6: 4c 91 ld r20, X
  186. 1 1 1 1 6a8: 45 23 and r20, r21
  187. 1 2 1 2 6aa: 09 f0 breq .+2 ; 0x6ae <__vector_3+0xa8>
  188. 1 1 6ac: 20 68 ori r18, 0x80 ; 128
  189. 1 1 1 1 6ae: 31 50 subi r19, 0x01 ; 1
  190. 2 2 2 2 6b0: 89 f7 brne .-30 ; 0x694 <__vector_3+0x8e>
  191. ------------
  192. 15 15 14 14
  193.  
  194. - Rx Timing 6: after last bit read ~ before stop bit delay
  195.  
  196. AVR LGT
  197. ------------
  198. 6a6: 4c 91 ld r20, X
  199. 1 1 1 1 6a8: 45 23 and r20, r21
  200. 1 2 1 2 6aa: 09 f0 breq .+2 ; 0x6ae <__vector_3+0xa8>
  201. 1 1 6ac: 20 68 ori r18, 0x80 ; 128
  202. 1 1 1 1 6ae: 31 50 subi r19, 0x01 ; 1
  203. 1 1 1 1 6b0: 89 f7 brne .-30 ; 0x694 <__vector_3+0x8e>
  204.  
  205. 2 2 1 1 6b2: 86 8d ldd r24, Z+30 ; 0x1e
  206. 1 2 1 2 6b4: 81 fd sbrc r24, 1
  207. 1 1 6b6: 20 95 com r18
  208. 2 2 2 2 6b8: 80 91 87 01 lds r24, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
  209. 1 1 1 1 6bc: 90 e0 ldi r25, 0x00 ; 0
  210. 2 2 1 1 6be: 01 96 adiw r24, 0x01 ; 1
  211. 1 1 1 1 6c0: 8f 73 andi r24, 0x3F ; 63
  212. 1 1 1 1 6c2: 99 27 eor r25, r25
  213. 2 2 2 2 6c4: 30 91 86 01 lds r19, 0x0186 ; 0x800186 <_ZN14SoftwareSerial20_receive_buffer_headE>
  214. 1 1 1 1 6c8: 38 17 cp r19, r24
  215. 1 2 1 2 6ca: a1 f0 breq .+40 ; 0x6f4 <__vector_3+0xee>
  216. 2 2 6cc: a0 91 87 01 lds r26, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
  217. 1 1 6d0: b0 e0 ldi r27, 0x00 ; 0
  218. 1 1 6d2: aa 5b subi r26, 0xBA ; 186
  219. 1 1 6d4: be 4f sbci r27, 0xFE ; 254
  220. 2 1 6d6: 2c 93 st X, r18
  221. 2 2 6d8: 80 93 87 01 sts 0x0187, r24 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
  222. 2 2 1 1 6dc: 82 8d ldd r24, Z+26 ; 0x1a
  223. 2 2 1 1 6de: 93 8d ldd r25, Z+27 ; 0x1b
  224. 6e0: 01 97 sbiw r24, 0x01 ; delay_loop
  225. 6e2: f1 f7 brne .-4 ; not count here
  226. 6e4: 00 00 nop
  227.  
  228. 2 1 6f4: 86 8d ldd r24, Z+30 ; 0x1e (buffer overflow)
  229. 1 1 6f6: 81 60 ori r24, 0x01 ; 1
  230. 2 1 6f8: 86 8f std Z+30, r24 ; 0x1e
  231. 2 1 6fa: f0 cf rjmp .-32 ; 0x6dc <__vector_3+0xd6>
  232. ------------
  233. 33 32 28 25
  234.  
  235. - Rx Timing 7: after stop bit delay ~ re-enable interrupt
  236.  
  237. AVR LGT
  238. ------------
  239. 6e0: 01 97 sbiw r24, 0x01 ; delay_loop
  240. 6e2: f1 f7 brne .-4 ; not count here
  241. 6e4: 00 00 nop ; not count here
  242. 2 1 6e6: a3 89 ldd r26, Z+19 ; 0x13
  243. 2 1 6e8: b4 89 ldd r27, Z+20 ; 0x14
  244. 2 1 6ea: 8c 91 ld r24, X
  245. 2 1 6ec: 95 89 ldd r25, Z+21 ; 0x15
  246. 1 1 6ee: 89 2b or r24, r25
  247. 2 1 6f0: 8c 93 st X, r24
  248. ------------
  249. 11 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement