AnsweredAssumed Answered

Problem with copying hex data

Question asked by hospodar.ivan on Oct 28, 2015
Latest reply on Oct 28, 2015 by hospodar.ivan
Hello,
I have following problem with copying hex data.

for (i = 0; i < 6; i++) {
printf("%02x", packet[i]); // copy packet to FIFO
}

Printf copy data from packet[] to FIFO.
Everything is ok if copying data like these on first screenshot bellow (0xAA,0xBB,0xCC,0xDD).
But if copiyng different values (but with some data type - 0x01, 0x03, 0x00, 0x05) things going wrong. In the destination FIFO is 0x30, 0x30, 0x00, 0x00,... which is bad.

Correct copy
Incorrect copy

It is weird for me. Where can be a problem?

Thank you.

Outcomes