Hi,
When using the McBSP in Clock Stop Mode (SPI), the packet length can be 8 -32 bits. If the packet length is set for 8 bits, and since the 5509A doesn't allow byte-aligned transfers, which half of the word gets sent or received (MSB's or LSB's)? The documentation seems to indicate the LSB's, but it's not specfically stated anywhere.
Thanks,
Bill
Look at the McBSP documentation for the SPCR1 register. The RJUST bits select the justification for received bytes, except in companding modes.
There seems to be no specification for the transmitted bytes, and I'm only assuming that it would be LSBs.
If you are transmitting 8-bit data then the data should go in DXR1[7:0]. The rest of DXR1 will be ignored. The XCOMPAND field allows you to specify whether the the data is sent MSB-first or LSB-first.
By the way, you might be interested in looking at the code under "Examples" on this wiki page:
http://wiki.davincidsp.com/index.php/SPI_Boot_on_5502_EVM
Specifically, under examples look at the "Writing the Image" example. It has a project which uses McBSP on 5502 as a SPI master to do 8-bit writes (and reads) to a SPI flash.
Brad
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Thanks Brian and Brad. I'll check the example you suggested.