I'm having trouble getting the Universal Parallel Port (UPP) to make contiguous block transfers. (Using the c6748 on the LogicPD EVM board.)
Here is my code:
#define BLOCK_LENGTH 0xFFC0
// This load the address of the data buffer
UPP->UPID0 = (uint32_t)&data_buffer;
// This calls for 2 lines of BLOCK_LENGTH bytes to be transferred
UPP->UPID1 = BLOCK_LENGTH + 0x00020000;
// Offset between lines -- so the data should be contiguous in memory
UPP->UPID2 = BLOCK_LENGTH;
Unfortunately, my UPP is not offsetting the blocks of data into contiguous memory locations. Instead, it overwrites the previous memory locations (and leaves the trailing memory locations empty). The memory then contains only the last block of data, following by many unfilled memory locations.
When I change solely the number of lines to 1 (as with the last line of code as UPP->UPID1 = BLOCK_LENGTH + 0x00010000), then the UPP transfers only one block of data, and does it correctly. In other words, my code works properly when transferring one block of data, but not for multiple block transfers.
What am I doing wrong?