S32K324: Why are variable changes in Cache not visible in the debugger?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K324: Why are variable changes in Cache not visible in the debugger?

Jump to solution
1,084 Views
aprilaaa
Contributor I

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

 

 

 

0 Kudos
Reply
1 Solution
1,038 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

There are some TRACE32 options affecting this

(1) OnCE access - SYStem.CpuAccess

(2) NEXUS access - SYStem.MemAccess and SYStem.Option DUALPORT

Also it depends on used access class (you may see it in the memory dump window for instance) - see attached manual screenshot.

access_classes.png

Try to use access class DC.

Otherwise I would recommend to contact Lauterbach support.

 

View solution in original post

0 Kudos
Reply
2 Replies
1,039 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

There are some TRACE32 options affecting this

(1) OnCE access - SYStem.CpuAccess

(2) NEXUS access - SYStem.MemAccess and SYStem.Option DUALPORT

Also it depends on used access class (you may see it in the memory dump window for instance) - see attached manual screenshot.

access_classes.png

Try to use access class DC.

Otherwise I would recommend to contact Lauterbach support.

 

0 Kudos
Reply
878 Views
rweiss
Contributor V

The screenshot shows the state before the assignment takes place. You would have to do at least one more step to execute the variable assignment.

Tags (1)
0 Kudos
Reply