I've been using the uart HAL driver successfully for months now. Our code uses a callback that pulls the bytes one-by-one (the UART_EVENT_RX_CHAR event) so we can do SLIP decoding in the callback function. Recently some source files were changed and when it was rebuilt, uart communication was broken. When I ran the IAR debugger I found a discrepancy in the way incoming bytes are stored in the p_args structure in the callback. The data byte in both runs is the leading 0xC0 in the packet. In the first screenshot, the C0 is aligned in p_args.data as 00FF0000, while in the second, it's aligned as 000000FF. My original code assumed the 00FF0000 alignment, so when the alignment changed, the packet was read as all zeros.
My questions are, is this working as designed? And if so, how am I supposed to pull the incoming byte from the p_args.data field?
Also, any idea what could have caused the alignment to change from one build to the next? There were source code changes, but these projects were imported and delta'd from the same base project so all threads and stacks should have been setup identically.
Thanks,
Tom