Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SoftwareSerialExample-540.ino.elf: file format elf32-avr
- - Tx Timing 1: from start bit to first bit
- 00000382 <_ZN14SoftwareSerial5writeEh>:
- LGT 3d4: 40 83 st Z, r20
- ------
- 1 1 3d6: ec 01 movw r28, r24
- 3d8: 21 97 sbiw r28, 0x01 ; delay_loop
- 3da: 00 00 nop ; not count here
- 3dc: e9 f7 brne .-6 ; not count here
- 3de: 00 00 nop ; not count here
- 1 1 3e0: 48 e0 ldi r20, 0x08 ; 8
- 1 1 3e2: 50 81 ld r21, Z
- 1 2 3e4: 60 ff sbrs r22, 0
- 1 3e6: 02 c0 rjmp .+4 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x6a>
- 1 3e8: 52 2b or r21, r18
- 1 3ea: 01 c0 rjmp .+2 ; 0x3ee <_ZN14SoftwareSerial5writeEh+0x6c>
- 1 3ec: 53 23 and r21, r19
- 1 1 3ee: 50 83 st Z, r21
- ------
- 7 8
- - Tx Timing 2: between bits
- 1 1 3e2: 50 81 ld r21, Z
- 1 2 3e4: 60 ff sbrs r22, 0
- 1 3e6: 02 c0 rjmp .+4 ; 0x3ec <_ZN14SoftwareSerial5writeEh+0x6a>
- 1 3e8: 52 2b or r21, r18
- 1 3ea: 01 c0 rjmp .+2 ; 0x3ee <_ZN14SoftwareSerial5writeEh+0x6c>
- 1 3ec: 53 23 and r21, r19
- 1 1 3ee: 50 83 st Z, r21
- 1 1 3f0: ec 01 movw r28, r24
- 3f2: 21 97 sbiw r28, 0x01 ; delay_loop
- 3f4: 00 00 nop ; not count here
- 3f6: e9 f7 brne .-6 ; not count here
- 3f8: 00 00 nop ; not count here
- 1 1 3fa: 66 95 lsr r22
- 1 1 3fc: 41 50 subi r20, 0x01 ; 1
- 2 2 3fe: 89 f7 brne .-30 ; 0x3e2 <_ZN14SoftwareSerial5writeEh+0x60>
- ------
- 10 11
- - Tx Timing 3: from last bit to stop bit
- 3ee: 50 83 st Z, r21
- 1 1 3f0: ec 01 movw r28, r24
- 3f2: 21 97 sbiw r28, 0x01 ; delay_loop
- 3f4: 00 00 nop ; not count here
- 3f6: e9 f7 brne .-6 ; not count here
- 3f8: 00 00 nop ; not count here
- 1 1 3fa: 66 95 lsr r22
- 1 1 3fc: 41 50 subi r20, 0x01 ; 1
- 1 1 3fe: 89 f7 brne .-30 ; 0x3e2 <_ZN14SoftwareSerial5writeEh+0x60>
- 1 1 400: 80 81 ld r24, Z
- 1 1 402: 77 23 and r23, r23
- 1 2 404: 19 f0 breq .+6 ; 0x40c <__LOCK_REGION_LENGTH__+0xc>
- 1 406: 83 23 and r24, r19
- 1 408: 80 83 st Z, r24
- 1 40c: 28 2b or r18, r24
- 1 40e: 20 83 st Z, r18
- ------
- 9 10
- - 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
- 00000000 <__vectors>:
- 3 3 c: 0c 94 09 03 jmp 0x612 ; 0x612 <__vector_3>
- 00000612 <__vector_3>:
- 1 1 612: 1f 92 push r1
- 1 1 614: 0f 92 push r0
- 1 1 616: 0f b6 in r0, 0x3f ; 63
- 1 1 618: 0f 92 push r0
- 1 1 61a: 11 24 eor r1, r1
- 1 1 61c: 2f 93 push r18
- 1 1 61e: 3f 93 push r19
- 1 1 620: 4f 93 push r20
- 1 1 622: 5f 93 push r21
- 1 1 624: 6f 93 push r22
- 1 1 626: 7f 93 push r23
- 1 1 628: 8f 93 push r24
- 1 1 62a: 9f 93 push r25
- 1 1 62c: af 93 push r26
- 1 1 62e: bf 93 push r27
- 1 1 630: ef 93 push r30
- 1 1 632: ff 93 push r31
- 2 2 634: e0 91 88 01 lds r30, 0x0188 ; 0x800188 <_ZN14SoftwareSerial13active_objectE>
- 2 2 638: f0 91 89 01 lds r31, 0x0189 ; 0x800189 <_ZN14SoftwareSerial13active_objectE+0x1>
- 1 1 63c: 30 97 sbiw r30, 0x00 ; 0
- 2 2 63e: 09 f4 brne .+2 ; 0x642 <__vector_3+0x30>
- 640: 57 c0 rjmp .+174 ; 0x6f0 <__vector_3+0xde>
- 1 1 642: 96 8d ldd r25, Z+30 ; 0x1e
- 1 1 644: a6 85 ldd r26, Z+14 ; 0x0e
- 1 1 646: b7 85 ldd r27, Z+15 ; 0x0f
- 1 1 648: 85 85 ldd r24, Z+13 ; 0x0d
- 1 2 64a: 91 ff sbrs r25, 1
- 1 64c: 04 c0 rjmp .+8 ; 0x656 <__vector_3+0x44>
- 1 64e: 9c 91 ld r25, X
- 1 650: 89 23 and r24, r25
- 2 652: 29 f4 brne .+10 ; 0x65e <__vector_3+0x4c>
- 654: 4d c0 rjmp .+154 ; 0x6f0 <__vector_3+0xde>
- 1 656: 9c 91 ld r25, X
- 1 658: 89 23 and r24, r25
- 2 65a: 09 f0 breq .+2 ; 0x65e <__vector_3+0x4c>
- 65c: 49 c0 rjmp .+146 ; 0x6f0 <__vector_3+0xde>
- 1 1 65e: a3 89 ldd r26, Z+19 ; 0x13
- 1 1 660: b4 89 ldd r27, Z+20 ; 0x14
- 1 1 662: 9c 91 ld r25, X
- 1 1 664: 85 89 ldd r24, Z+21 ; 0x15
- 1 1 666: 80 95 com r24
- 1 1 668: 89 23 and r24, r25
- 1 1 66a: 8c 93 st X, r24
- 1 1 66c: 86 89 ldd r24, Z+22 ; 0x16
- 1 1 66e: 97 89 ldd r25, Z+23 ; 0x17
- 670: 01 97 sbiw r24, 0x01 ; delay_loop
- 672: 00 00 nop ; not count here
- 674: e9 f7 brne .-6 ; not count here
- 676: 00 00 nop ; not count here
- ------
- 46 46
- - Rx Timing 4: after centering delay ~ read signal pin
- 670: 01 97 sbiw r24, 0x01 ; delay_loop
- 672: 00 00 nop ; not count here
- 674: e9 f7 brne .-6 ; not count here
- 676: 00 00 nop ; not count here
- 1 678: 60 8d ldd r22, Z+24 ; 0x18
- 1 67a: 71 8d ldd r23, Z+25 ; 0x19
- 1 67c: a6 85 ldd r26, Z+14 ; 0x0e
- 1 67e: b7 85 ldd r27, Z+15 ; 0x0f
- 1 680: 55 85 ldd r21, Z+13 ; 0x0d
- 1 682: 38 e0 ldi r19, 0x08 ; 8
- 1 684: 20 e0 ldi r18, 0x00 ; 0
- 1 686: cb 01 movw r24, r22
- 688: 01 97 sbiw r24, 0x01 ; delay_loop
- 68a: 00 00 nop ; not count here
- 68c: e9 f7 brne .-6 ; not count here
- 68e: 00 00 nop ; not count here
- 1 690: 82 2f mov r24, r18
- 1 692: 90 e0 ldi r25, 0x00 ; 0
- 1 694: 95 95 asr r25
- 1 696: 87 95 ror r24
- 1 698: 28 2f mov r18, r24
- 1 69a: 4c 91 ld r20, X
- -------
- 14
- - Rx Timing 5: inside read loop
- 1 1 686: cb 01 movw r24, r22
- 688: 01 97 sbiw r24, 0x01 ; delay_loop
- 68a: 00 00 nop ; not count here
- 68c: e9 f7 brne .-6 ; not count here
- 68e: 00 00 nop ; not count here
- 1 1 690: 82 2f mov r24, r18
- 1 1 692: 90 e0 ldi r25, 0x00 ; 0
- 1 1 694: 95 95 asr r25
- 1 1 696: 87 95 ror r24
- 1 1 698: 28 2f mov r18, r24
- 1 1 69a: 4c 91 ld r20, X
- 1 1 69c: 45 23 and r20, r21
- 1 2 69e: 09 f0 breq .+2 ; 0x6a2 <__vector_3+0x90>
- 1 6a0: 20 68 ori r18, 0x80 ; 128
- 1 1 6a2: 31 50 subi r19, 0x01 ; 1
- 2 2 6a4: 81 f7 brne .-32 ; 0x686 <__vector_3+0x74>
- -------
- 13 13
- - Rx Timing 6: after last bit read ~ before stop bit delay
- 69a: 4c 91 ld r20, X
- 1 1 69c: 45 23 and r20, r21
- 1 2 69e: 09 f0 breq .+2 ; 0x6a2 <__vector_3+0x90>
- 1 6a0: 20 68 ori r18, 0x80 ; 128
- 1 1 6a2: 31 50 subi r19, 0x01 ; 1
- 1 1 6a4: 81 f7 brne .-32 ; 0x686 <__vector_3+0x74>
- 1 1 6a6: 86 8d ldd r24, Z+30 ; 0x1e
- 1 2 6a8: 81 fd sbrc r24, 1
- 1 6aa: 20 95 com r18
- 2 2 6ac: 80 91 87 01 lds r24, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 1 1 6b0: 90 e0 ldi r25, 0x00 ; 0
- 1 1 6b2: 01 96 adiw r24, 0x01 ; 1
- 1 1 6b4: 8f 73 andi r24, 0x3F ; 63
- 1 1 6b6: 99 27 eor r25, r25
- 2 2 6b8: 30 91 86 01 lds r19, 0x0186 ; 0x800186 <_ZN14SoftwareSerial20_receive_buffer_headE>
- 1 1 6bc: 38 17 cp r19, r24
- 1 2 6be: 49 f0 breq .+18 ; 0x6d2 <__vector_3+0xc0>
- 2 6c0: a0 91 87 01 lds r26, 0x0187 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 1 6c4: b0 e0 ldi r27, 0x00 ; 0
- 1 6c6: aa 5b subi r26, 0xBA ; 186
- 1 6c8: be 4f sbci r27, 0xFE ; 254
- 1 6ca: 2c 93 st X, r18
- 2 6cc: 80 93 87 01 sts 0x0187, r24 ; 0x800187 <_ZN14SoftwareSerial20_receive_buffer_tailE>
- 1 6d0: 03 c0 rjmp .+6 ; 0x6d8 <__vector_3+0xc6>
- 1 6d2: 86 8d ldd r24, Z+30 ; 0x1e (buffer overflow)
- 1 6d4: 81 60 ori r24, 0x01 ; 1
- 1 6d6: 86 8f std Z+30, r24 ; 0x1e
- 1 1 6d8: 82 8d ldd r24, Z+26 ; 0x1a
- 1 1 6da: 93 8d ldd r25, Z+27 ; 0x1b
- 6dc: 01 97 sbiw r24, 0x01 ; delay_loop
- 6de: 00 00 nop ; not count here
- 6e0: e9 f7 brne .-6 ; not count here
- 6e2: 00 00 nop ; not count here
- -------
- 29 24
- - Rx Timing 7: after stop bit delay ~ re-enable interrupt
- 6dc: 01 97 sbiw r24, 0x01 ; delay_loop
- 6de: 00 00 nop ; not count here
- 6e0: e9 f7 brne .-6 ; not count here
- 6e2: 00 00 nop ; not count here
- 1 6e4: a3 89 ldd r26, Z+19 ; 0x13
- 1 6e6: b4 89 ldd r27, Z+20 ; 0x14
- 1 6e8: 9c 91 ld r25, X
- 1 6ea: 85 89 ldd r24, Z+21 ; 0x15
- 1 6ec: 89 2b or r24, r25
- 1 6ee: 8c 93 st X, r24
- -------
- 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement