I trying to extract a u32 from a char array and the results are not what I expected.
Memory dump shows: 0xA0000680: FF 22 3C 87 01 00 A pu8Buf is set to 0xA0000680 pu8Buf+= 2; // value is 0xA0000682 pu32Buf = (u32*)pu8Buf; // value is 0xA0000682 u32Data = *pu32Buf; // value is 22FF873C Should it not have the value of 873C0001
Why was the data extracted from the addr pointer two bytes lower than the u32 address pointer locations?
Thanks,
I changed my code to perform byte reads from the data buffer and order the data with logical shifts and or's.
The data that I needed to have from that buffer was
00 01 87 3c
in a u32DataItem
"The data that I needed to have from that buffer was"
That was my understanding. Did you accomplish it, or do still require assistance?
I was able to extract the fields correcly from the buffer. This was a buffer that was received over a UART from a data radio that implemented the ModBuf. I'm now processing all the responses from the commands that were issued.
Thanks for your help