One bit shift at the programming (JTAG, daisy chain)

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear AVRfreaks!

I try to program a MEGA16A and an XMEGA128A1 via JTAG. (I use ATSTK600, and AVRSTUDIO 4).
The XMEGA is the first in the daisy chain.
By programming the XMEGA, everything is OK. (devices after 1, instr. bits after 4).
But, at the MEGA16A "a problem occured..", during the prog.
The problem is at the verifying.
Reading the signature, it is correct. Erasing is OK. But the code, readed back from the flash, is shifted left by 1 bit.
Can you help?
Have you seen something like this?
It is because of a bypass register, or something else?

The hex file to be written:
...00001100 10010100 00101010...
Readed back from the flash:
...00011000 00101000 01010101...
Programming FLASH OK
Reading FLASH OK
WARNING: FLASH byte adress 0x0000 is 0x18 (should be 0x0C)
Leaving programming mode OK