Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SoftwareSerialExample-730.ino.elf: file format elf32-avr
- - Tx Timing 1: from start bit to first bit
- 0000036e <_ZN14SoftwareSerial5writeEh>:
- AVR LGT
- 3d4: 20 83 st Z, r18
- ------------
- 1 1 1 1 3d6: e7 01 movw r28, r14
- 3d8: 21 97 sbiw r28, 0x01 ; delay_loop
- 3da: f1 f7 brne .-4 ; not count here
- 3dc: 00 00 nop ; not count here
- 1 1 1 1 3de: 28 e0 ldi r18, 0x08 ; 8
- 1 1 1 1 3e0: 46 2f mov r20, r22
- 1 1 1 1 3e2: 50 e0 ldi r21, 0x00 ; 0
- 2 2 1 1 3e4: 30 81 ld r19, Z
- 1 2 1 2 3e6: 60 ff sbrs r22, 0
- 2 1 3e8: 1c c0 rjmp .+56 ; 0x422 <__LOCK_REGION_LENGTH__+0x22>
- 1 1 3ea: 38 2b or r19, r24
- 2 2 1 1 3ec: 30 83 st Z, r19
- 1 1 422: 39 23 and r19, r25
- 2 1 424: e3 cf rjmp .-58 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x7e>
- ------------
- 14 11 10 9
- - Tx Timing 2: between bits
- AVR LGT
- ------------
- 1 1 1 1 3e0: 46 2f mov r20, r22
- 1 1 1 1 3e2: 50 e0 ldi r21, 0x00 ; 0
- 2 2 1 1 3e4: 30 81 ld r19, Z
- 1 2 1 2 3e6: 60 ff sbrs r22, 0
- 2 1 3e8: 1c c0 rjmp .+56 ; 0x422 <__LOCK_REGION_LENGTH__+0x22>
- 1 1 3ea: 38 2b or r19, r24
- 2 2 1 1 3ec: 30 83 st Z, r19
- 1 1 1 1 3ee: e7 01 movw r28, r14
- 3f0: 21 97 sbiw r28, 0x01 ; delay_loop
- 3f2: f1 f7 brne .-4 ; not count here
- 3f4: 00 00 nop ; not count here
- 1 1 1 1 3f6: ba 01 movw r22, r20
- 1 1 1 1 3f8: 75 95 asr r23
- 1 1 1 1 3fa: 67 95 ror r22
- 1 1 1 1 3fc: 21 50 subi r18, 0x01 ; 1
- 2 2 2 2 3fe: 81 f7 brne .-32 ; 0x3e0 <_ZN14SoftwareSerial5writeEh+0x72>
- 1 1 422: 39 23 and r19, r25
- 2 1 424: e3 cf rjmp .-58 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x7e>
- ------------
- 19 16 15 14
- - Tx Timing 3: from last bit to stop bit
- AVR LGT
- ------------
- 3ec: 30 83 st Z, r19
- 1 1 1 1 3ee: e7 01 movw r28, r14
- 3f0: 21 97 sbiw r28, 0x01 ; delay_loop
- 3f2: f1 f7 brne .-4 ; not count here
- 3f4: 00 00 nop ; not count here
- 1 1 1 1 3f6: ba 01 movw r22, r20
- 1 1 1 1 3f8: 75 95 asr r23
- 1 1 1 1 3fa: 67 95 ror r22
- 1 1 1 1 3fc: 21 50 subi r18, 0x01 ; 1
- 1 1 1 1 3fe: 81 f7 brne .-32 ; 0x3e0 <_ZN14SoftwareSerial5writeEh+0x72>
- 1 1 1 1 400: 11 23 and r17, r17
- 1 2 1 2 402: 89 f0 breq .+34 ; 0x426 <__LOCK_REGION_LENGTH__+0x26>
- 2 1 404: 80 81 ld r24, Z
- 1 1 406: 89 23 and r24, r25
- 2 1 408: 80 83 st Z, r24
- 2 1 426: 90 81 ld r25, Z
- 1 1 428: 89 2b or r24, r25
- 2 1 42a: ee cf rjmp .-36 ; 0x408 <__LOCK_REGION_LENGTH__+0x8>
- ------------
- 13 14 11 12
- - Rx Timing 1: raise interrupt signal
- 4clk cycles, maybe AVR/LGT same
- - Rx Timing 2: CPU recognize interrupt signal
- 4clk cycles, maybe AVR/LGT same
- - Rx Timing 3: jmp @ vectors ~ before centering delay
- AVR LGT
- ------------
- 00000000 <__vectors>:
- 3 3 3 3 c: 0c 94 03 03 jmp 0x606 ; 0x606 <__vector_3>
- 00000606 <__vector_3>:
- 2 2 1 1 606: 1f 92 push r1
- 2 2 1 1 608: 0f 92 push r0
- 1 1 1 1 60a: 0f b6 in r0, 0x3f ; 63
- 2 2 1 1 60c: 0f 92 push r0
- 1 1 1 1 60e: 11 24 eor r1, r1
- 2 2 1 1 610: 2f 93 push r18
- 2 2 1 1 612: 3f 93 push r19
- 2 2 1 1 614: 4f 93 push r20
- 2 2 1 1 616: 5f 93 push r21
- 2 2 1 1 618: 6f 93 push r22
- 2 2 1 1 61a: 7f 93 push r23
- 2 2 1 1 61c: 8f 93 push r24
- 2 2 1 1 61e: 9f 93 push r25
- 2 2 1 1 620: af 93 push r26
- 2 2 1 1 622: bf 93 push r27
- 2 2 1 1 624: ef 93 push r30
- 2 2 1 1 626: ff 93 push r31
- 2 2 2 2 628: e0 91 88 01 lds r30, 0x0188 ; 0x800188 <_ZN14SoftwareSerial13active_objectE>
- 2 2 2 2 62c: f0 91 89 01 lds r31, 0x0189 ; 0x800189 <_ZN14SoftwareSerial13active_objectE+0x1>
- 2 2 1 1 630: 30 97 sbiw r30, 0x00 ; 0
- 1 1 1 1 632: 49 f0 breq .+18 ; 0x646 <__vector_3+0x40>
- 2 2 1 1 634: a6 85 ldd r26, Z+14 ; 0x0e
- 2 2 1 1 636: b7 85 ldd r27, Z+15 ; 0x0f
- 2 2 1 1 638: 85 85 ldd r24, Z+13 ; 0x0d
- 2 2 1 1 63a: 96 8d ldd r25, Z+30 ; 0x1e
- 1 2 1 2 63c: 91 ff sbrs r25, 1
- 2 1 63e: 14 c0 rjmp .+40 ; 0x668 <__vector_3+0x62>
- 2 1 640: 9c 91 ld r25, X
- 1 1 642: 89 23 and r24, r25
- 2 2 644: a1 f4 brne .+40 ; 0x66e <__vector_3+0x68>
- 2 1 668: 9c 91 ld r25, X
- 1 1 66a: 89 23 and r24, r25
- 1 1 66c: 61 f7 brne .-40 ; 0x646 <__vector_3+0x40>
- 2 2 1 1 66e: a3 89 ldd r26, Z+19 ; 0x13
- 2 2 1 1 670: b4 89 ldd r27, Z+20 ; 0x14
- 2 2 1 1 672: 9c 91 ld r25, X
- 2 2 1 1 674: 85 89 ldd r24, Z+21 ; 0x15
- 1 1 1 1 676: 80 95 com r24
- 1 1 1 1 678: 89 23 and r24, r25
- 2 2 1 1 67a: 8c 93 st X, r24
- 2 2 1 1 67c: 86 89 ldd r24, Z+22 ; 0x16
- 2 2 1 1 67e: 97 89 ldd r25, Z+23 ; 0x17
- 680: 01 97 sbiw r24, 0x01 ; delay_loop
- 682: f1 f7 brne .-4 ; not count here
- 684: 00 00 nop ; not count here
- ------------
- 73 73 44 45
- - Rx Timing 4: after centering delay ~ read signal pin
- AVR LGT
- ------------
- 680: 01 97 sbiw r24, 0x01 ; delay_loop
- 682: f1 f7 brne .-4 ; not count here
- 684: 00 00 nop ; not count here
- 2 1 686: 60 8d ldd r22, Z+24 ; 0x18
- 2 1 688: 71 8d ldd r23, Z+25 ; 0x19
- 2 1 68a: a6 85 ldd r26, Z+14 ; 0x0e
- 2 1 68c: b7 85 ldd r27, Z+15 ; 0x0f
- 2 1 68e: 55 85 ldd r21, Z+13 ; 0x0d
- 1 1 690: 38 e0 ldi r19, 0x08 ; 8
- 1 1 692: 20 e0 ldi r18, 0x00 ; 0
- 1 1 694: cb 01 movw r24, r22
- 696: 01 97 sbiw r24, 0x01 ; dealy_loop
- 698: f1 f7 brne .-4 ; not count here
- 69a: 00 00 nop ; not count here
- 1 1 69c: 82 2f mov r24, r18
- 1 1 69e: 90 e0 ldi r25, 0x00 ; 0
- 1 1 6a0: 95 95 asr r25
- 1 1 6a2: 87 95 ror r24
- 1 1 6a4: 28 2f mov r18, r24
- 2 1 6a6: 4c 91 ld r20, X
- ------------
- 20 14
- - Rx Timing 5: inside read loop
- AVR LGT
- ------------
- 1 1 1 1 694: cb 01 movw r24, r22
- 696: 01 97 sbiw r24, 0x01 ; delay_loop
- 698: f1 f7 brne .-4 ; not count here
- 1 1 1 1 69a: 00 00 nop ; not count here
- 1 1 1 1 69c: 82 2f mov r24, r18
- 1 1 1 1 69e: 90 e0 ldi r25, 0x00 ; 0
- 1 1 1 1 6a0: 95 95 asr r25
- 1 1 1 1 6a2: 87 95 ror r24
- 1 1 1 1 6a4: 28 2f mov r18, r24
- 2 2 1 1 6a6: 4c 91 ld r20, X
- 1 1 1 1 6a8: 45 23 and r20, r21
- 1 2 1 2 6aa: 09 f0 breq .+2 ; 0x6ae <__vector_3+0xa8>
- 1 1 6ac: 20 68 ori r18, 0x80 ; 128
- 1 1 1 1 6ae: 31 50 subi r19, 0x01 ; 1
- 2 2 2 2 6b0: 89 f7 brne .-30 ; 0x694 <__vector_3+0x8e>
- ------------
- 15 15 14 14
- - Rx Timing 6: after last bit read ~ before stop bit delay
- AVR LGT
- ------------
- 6a6: 4c 91 ld r20, X
- 1 1 1 1 6a8: 45 23 and r20, r21
- 1 2 1 2 6aa: 09 f0 breq .+2 ; 0x6ae <__vector_3+0xa8>
- 1 1 6ac: 20 68 ori r18, 0x80 ; 128
- 1 1 1 1 6ae: 31 50 subi r19, 0x01 ; 1
- 1 1 1 1 6b0: 89 f7 brne .-30 ; 0x694 <__vector_3+0x8e>
- 2 2 1 1 6b2: 86 8d ldd r24, Z+30 ; 0x1e
- 1 2 1 2 6b4: 81 fd sbrc r24, 1
- 1 1 6b6: 20 95 com r18
- 2 2 2 2 6b8: 80 91 87 01 lds r24, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 1 1 1 1 6bc: 90 e0 ldi r25, 0x00 ; 0
- 2 2 1 1 6be: 01 96 adiw r24, 0x01 ; 1
- 1 1 1 1 6c0: 8f 73 andi r24, 0x3F ; 63
- 1 1 1 1 6c2: 99 27 eor r25, r25
- 2 2 2 2 6c4: 30 91 86 01 lds r19, 0x0186 ; 0x800186 <_ZN14SoftwareSerial20_receive_buffer_headE>
- 1 1 1 1 6c8: 38 17 cp r19, r24
- 1 2 1 2 6ca: a1 f0 breq .+40 ; 0x6f4 <__vector_3+0xee>
- 2 2 6cc: a0 91 87 01 lds r26, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 1 1 6d0: b0 e0 ldi r27, 0x00 ; 0
- 1 1 6d2: aa 5b subi r26, 0xBA ; 186
- 1 1 6d4: be 4f sbci r27, 0xFE ; 254
- 2 1 6d6: 2c 93 st X, r18
- 2 2 6d8: 80 93 87 01 sts 0x0187, r24 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 2 2 1 1 6dc: 82 8d ldd r24, Z+26 ; 0x1a
- 2 2 1 1 6de: 93 8d ldd r25, Z+27 ; 0x1b
- 6e0: 01 97 sbiw r24, 0x01 ; delay_loop
- 6e2: f1 f7 brne .-4 ; not count here
- 6e4: 00 00 nop
- 2 1 6f4: 86 8d ldd r24, Z+30 ; 0x1e (buffer overflow)
- 1 1 6f6: 81 60 ori r24, 0x01 ; 1
- 2 1 6f8: 86 8f std Z+30, r24 ; 0x1e
- 2 1 6fa: f0 cf rjmp .-32 ; 0x6dc <__vector_3+0xd6>
- ------------
- 33 32 28 25
- - Rx Timing 7: after stop bit delay ~ re-enable interrupt
- AVR LGT
- ------------
- 6e0: 01 97 sbiw r24, 0x01 ; delay_loop
- 6e2: f1 f7 brne .-4 ; not count here
- 6e4: 00 00 nop ; not count here
- 2 1 6e6: a3 89 ldd r26, Z+19 ; 0x13
- 2 1 6e8: b4 89 ldd r27, Z+20 ; 0x14
- 2 1 6ea: 8c 91 ld r24, X
- 2 1 6ec: 95 89 ldd r25, Z+21 ; 0x15
- 1 1 6ee: 89 2b or r24, r25
- 2 1 6f0: 8c 93 st X, r24
- ------------
- 11 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement