Advertisement
uaa

new timing for LGT8x/gcc-5.4.0

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