Post Go back to editing

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

Thread Summary

The user encountered a DCPLBMissWithoutReplacement error when using adi_uart_Write() in a standalone project, despite successful UART initialization. The solution involves checking cache protection options in System.svc and ensuring valid addresses and non-NULL pointers are used. An accompanying answer suggests the error could also be caused by indexing off the end of an array.
AI Generated Content

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.

Parents Reply Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.