Skip to content

ATTiny44A works only when reading sended bytes is disabled #38

@mironovdm

Description

@mironovdm

Works fine with ATTiny13A and CP210x. But doesn't work with ATTiny44A, because when tried to connect I got this message:

Unconnected.                            > device com5
WriteDebug, byte 1 of 1: Read 92 expected f3

SerialRead expected 24 bytes, received 18 bytes
07  92  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  55

So we see that device responds with its signature 9207 but there is no sended 0xF3 byte in receiving buffer wich dwdebug tryes to read. I tried to disable reading sended bytes in function SerialSendBytes() in Serial.c and modified it to:

void SerialSendBytes(struct SPort *port, const u8 *out, int outlen) {
  Write(port->handle, out, outlen);
  return;
}

And now dwdebug see the avr:

Unconnected.                            > verbose
Unconnected.                            > device com4
Debug: devicename 'com', n 4.
Debug. DwFindPort(s, 4, 0)
 -- ConnectSerialPort entry. SPort: kind s, index 4, character -1, baud 0, handle $0, portname COM4.
COM4 Trying COM4, baud rate 150000, break length 0050, skipping [00], received 00000000, scale 20%
Trying COM4, baud rate 030000, break length 0050, skipping [0], received 01111000: 8 010110000, scale 40%
Trying COM4, baud rate 012000, break length 0050, skipping [0], received 10010011: 7 013000000, scale 85%
Trying COM4, baud rate 010200, break length 0050, skipping [0], received 01101001: 8 042000000, scale 85%
Trying COM4, baud rate 008670, break length 0050, skipping [0], received 10101101: 7 051000000, scale 95%
Trying COM4, baud rate 008236, break length 0050, skipping [0], received 01010101: expected result.
Finding upper bound.
Trying COM4, baud rate 008400, break length 0012, skipping [0], received 10110101: 7 051000000
Finding lower bound.
Trying COM4, baud rate 008071, break length 0012, skipping [0], received 01010101: expected result.
Trying COM4, baud rate 007909, break length 0012, skipping [0], received 01010101: expected result.
Trying COM4, baud rate 007750, break length 0012, skipping [0], received 01010101: expected result.
Trying COM4, baud rate 007595, break length 0012, skipping [0], received 01010101: expected result.
Trying COM4, baud rate 007443, break length 0012, skipping [0], received 01010101: expected result.
Trying COM4, baud rate 007294, break length 0012, skipping [0], received 10110101: 7 051000000
 -- TryConnectSerialPort complete. SPort: kind s, index 4, character -1, baud 7839, handle $218, portname COM4.
 -- ConnectSerialPort complete. SPort: kind s, index 4, character -1, baud 7839, handle $218, portname COM4.
Connected to ATtiny44 on COM4 at 7839 baud.
0040: bb8a  out   $1a, r24              > r
r0 c1   r4 cf    r8 14   r12 13   r16 4f   r20 b8   r24 00   r28 5f
r1 00   r5 c8    r9 22   r13 5b   r17 9c   r21 32   r25 00   r29 e1
r2 dd   r6 71   r10 bb   r14 9c   r18 00   r22 47   r26 61   r30 3a
r3 af   r7 12   r11 9e   r15 8e   r19 00   r23 9e   r27 00   r31 00
SREG i t h s v n Z c    PC 0040  SP 015f   X 0061   Y e15f   Z 003a
0040: bb8a  out   $1a, r24              >

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions