2020-11-30 12:53 AM
Controller H743Zi (nucleo-H743ZI2)
STM32CubeIde : 1.4.2
Cube V1.8.0
cache: enabled
dcache: enabled
Seperate RAM Section with cache/dcachedisabled by MPU region
FreeRtos: CMSIS V1 10.21 / 1.02
// methode 1
uint8_t buffer[100]; //MPU region cache/dcache disabled
int length = sprintf((char*) buffer, "Test\r\n");
length += sprintf((char*) buffer+ length, "Test\r\n"); //this line FAIL
// methode 2
SECTION_CACHE_DISABLED uint8_t buffer[100]; //MPU region cache/dcache disabled
int length = sprintf((char*) buffer, "Test\r\n");
length += sprintf((char*) buffer+ length, "%d\r\n", “Test�?); //this line does NOT FAIL
//methode 3
uint8_t bufferRam[100]; // cache / dcache enabled
int length = sprintf((char*) bufferRam, "Test\r\n");
length += sprintf((char*) bufferRam + length, "Test\r\n"); //this does NOT FAIL
length += sprintf((char*) bufferRam + length, "%d\r\n", “Test�?); //this does NOT FAIL
Why does methode 1 fail?