Skip to content

Conversation

aKaReZa75
Copy link

Summary

This pull request fixes a bug in the xx1527 model where the address bytes were displayed in the wrong order.

Problem

The original code incorrectly formats the 24-bit address by reversing the byte order:

address = 'Address 0x%X %X %X' % (addr & 0xFF, (addr >> 8) & 0xFF, addr >> 16)

This results in the least significant byte appearing first, which is misleading and inconsistent with common address representations.

Fix

Replaced the line with:

address = 'Address 0x%X %X %X' % (addr >> 16, (addr >> 8) & 0xFF, addr & 0xFF)

This correctly displays the most significant byte first, ensuring the address is shown in standard big-endian order (MSB → LSB).

Impact

  • The address output is now correctly formatted.
  • No other functionality is affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant