Content originally posted in LPCWare by mattferrari on Thu Nov 04 10:53:04 MST 2010
Thank you CodeRedSupport for your help - I appreciate your timely replies.
FallGuy - thank you for your idea about the DMA controller. This is an intriguing possibility. My application is to transfer a block of little-endian memory to a big-endian peripheral (serial port) so this at first sounds promising. But since the blocks of data to be transferred will be comprised of a mix of data types (character strings, uint16, uint32) this still may not work. I believe that the DMA Controller will uniformily perform byte swapping over the entire block of data being transferred and would be unable to discriminate between bytes comprising data types requiring swapping (uint16, uint32) and bytes comprising data bytes which must not be swapped (character strings).
Since apparently there is no way to create a big-endian data storage environment, it appears that I will need to discretely perform the byte swapping as needed prior to data storage and transmission. If I'm missing something, please comment - I would love to find a more elegant/global solution. In hindsight, I should have based this design on a big-endian processor, or one capable of being configured as such. Live and learn...
Thank you again for your responses!
Matt