You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
found an issue how arm interprets direct assignment of crc in the buffer *((uint32_t *)(crc)) = htole32(desfire_crc);
On non-arm this does as expected at the position of crc pointer CRC is added to the right side of the buffer crc, crc+1, crc+2, crc+3
On the ARM that we are using things are opposite crc is added to the left of the buffer crc, crc-1,crc-2,crc-3 :)
We corrected the code with memcpy: memcpy(crc, &htole32(desfire_crc), sizeof(uint32_t));
Hope this helps someone
The text was updated successfully, but these errors were encountered:
Dear,
found an issue how arm interprets direct assignment of crc in the buffer
*((uint32_t *)(crc)) = htole32(desfire_crc);
On non-arm this does as expected at the position of crc pointer CRC is added to the right side of the buffer crc, crc+1, crc+2, crc+3
On the ARM that we are using things are opposite crc is added to the left of the buffer crc, crc-1,crc-2,crc-3 :)
We corrected the code with memcpy:
memcpy(crc, &htole32(desfire_crc), sizeof(uint32_t));
Hope this helps someone
The text was updated successfully, but these errors were encountered: