I am currently working with the S32K324 and noticed an issue when use trace32 observing variables during debugging. Specifically, I can observe changes to variables in non-cacheable sections, but not those in cacheable sections.
// This change is visible
volatile uint32 g_cnt __attribute__((section(".non_cacheable_data")));
// This change is NOT visible
volatile BaseType_t testResult = 0x33U;
g_cnt++; // Observed change: OK
testResult = 0x5AU; // Observed change: FAIL (Value remains 0x33 or unchanged in memory window)
aprilaaa_0-1769408579878.png
aprilaaa_0-1769408474300.png