A data CPLB miss has occurred without a corresponding CPLB entry - BF707 EZ-Kit UART

I am trying to set up UART communication to my PC, in a new standalone project. I have written a function, myPrintf(), to direct strings to print to Putty. When I add this function to the BF707_char_echo project, it works fine. However, in my standalone project, after I successfully initiate the UART, when the program reaches the adi_uart_Write() inside of my function, I am given the following error:

A non-recoverable error or exception has occurred.
Description: A data CPLB miss has occurred without a corresponding CPLB entry.
General Type: RunTimeError
Specific Type: DCPLBMissWithoutReplacement
Error PC: 0x11a02366

In disassembly, I see:

1493 if((eResult = SubmitBuffer(pDevice,
11a02366: R1=[P1+0x38];

My UART initialization consists of the code inside the main function in UART_char_echo.c, up until but not including the UART processing loop. This sections runs fine. The issue only occurs when I try to print with my function (which internally calls adi_uart_Write(). My function is as follows.

void myPrintf(char* format,...){
char tempBuffer[1000];
char printBuffer[1000];
ADI_UART_RESULT result;
va_list args;
va_start(args, format);
uint32_t length;

length = snprintf(tempBuffer, 0, format, args);
length += 1;

vsnprintf(printBuffer, length, format, args);
va_end(args);
printf("About to write a string!\r\n");
if((result = adi_uart_Write(ghUART,
&printBuffer[0],
length
)) != ADI_UART_SUCCESS)
{
REPORT_ERROR("Could not do a write 0x%08X \n", result);
}
}


I would like some insight about what is happening. Please let me know if I can provide more information.

  • Hi,

    The _cplb_miss_without_replacement is called by the default exception handler when a CPLB Miss exception has occurred, and the default handler is unable to find a CPLB entry in the table which corresponds to the address which caused the miss.

    We recommend you to check your cache protection options. Double click the "System.svc", navigate to the 'Startup Code/LDF' tab. In the 'Startup Code' tab there are options for Instruction and Data Cache - enable or disable these as required.

    The other possible cause of the CPLB miss without replacement in your program could be the use of an invalid address, or when there is a NULL pointer.

    For more details please refer the below linked Ezone threads which might help you resolve your issue:
    ez.analog.com/.../202507

    If you are still facing issues,please share us the  project which replicates this issue along with the steps to reproduce.

    Regards,
    Santha kumari.K