I am having trouble getting the simple DLB example in the uPP guide to work for me. The code is part of a SYSBIOS project, so I have not been able to use the DSP/BIOS v5.xx driver. Here is the test code I am using:
....... extraction from working SYSBIOS DSP application.......
case RCMD_UPP_TEST_RCVR: // 0xD4 -- DLB test
UPP_DLB_B_A_Init();
UPP_DLB_B_A_Start();
WaitMsec(20); // Wait for end of 256K transfer -- should take around 2.5 msec? Sysclk is 299 MHz
if((UPP->UPISR & 0x00000008L) == 0)
{
m_SEND_NAK(DSP_EX_UPP_TIMEOUT);
}
else
{
m_SEND_ACK;
}
break;
void UPP_DLB_B_A_Init(void)
{
int i;
for(i=0; i<0x20000; i++)
{
UppRcvBuffer[i] = 0;
UppDlbSendBuffer[i] = i;
}
//reset uPP
SETBIT(UPP->UPPCR, UPP_UPPCR_SWRST);
for(i = 0; i < 300; i++){}; //wait 200 clock cycles for reset.
CLRBIT(UPP->UPPCR, UPP_UPPCR_SWRST);
//setup control registers
UPP->UPCTL=0x52020006;
UPP->UPICR=0x01000000; // CLKDIVB = 1
UPP->UPIVR=0x0BBB0000;
UPP->UPDLB=0x00002000;
UPP->UPPCR=0x00000008L;
}
void UPP_DLB_B_A_Start(void)
{
//setup DMA-I registers
UPP->UPID0= (uint32_t)&UppRcvBuffer[0];
UPP->UPID1=0x04000100; // Line count(1024) and Bytes per line(256) (Transfer size = LineCount*BytesPerLine = 256K)
UPP->UPQD0= (uint32_t)&UppDlbSendBuffer[0];
UPP->UPQD1=0x04000100; // Line count(1024) and Bytes per line(256) (Transfer size = LineCount*BytesPerLine = 256K)
}
When I run the test command, the uPP resgisters show that is is enabled, but no DMA transfers occur. I checked that the clock is active and the module is in the enabled state. What am I missing?