2425330_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2425330_en-US

2425330_en-US

How to disable data cache of mpc5775k for data exchange between cores?

Dear sir:

    I am debugging a program for mpc5775k based on the example of "Example_MPC5775K-Semaphores-S32DS". The core0 will write data to the sharestruct located at 0x40000000., core 1 will read out data from the sharestruct. The issue is that the data read out by core 1 never change, I think which is from cache, not updated . The core 1 's startup.s file is copied from the example,which have DISABLE_CACHE part. The core 0's startup file is the one that auto generated by S32DS. If use the same file as core 1, the program stalk. I donot know the reason. My question is that how to disable the data cache , so when core 0 write data ,and core 1 process the data and transfer the data on time ? Thanks & regards.屏幕截图 2026-11-03 134056.png屏幕截图 2026-11-03 134159.png

Re: How to disable data cache of mpc5775k for data exchange between cores?

Based on your description, the issue may be caused by the shared memory being cacheable. The original Example_MPC5775K-Semaphores-S32DS disables I-cache and D-cache on both cores because the shared memory must not be cached. It also defines a dedicated shared-memory section in the linker file and protects access using SEMA42.

As a first check, please verify that the shared region containing sharestruct is configured as cache-inhibited on both cores. Disabling the complete data cache is possible, but configuring only the shared region as cache-inhibited is normally preferable because globally disabling the cache affects performance.

Also verify that sharestruct is declared volatile and that both cores use the same address and compatible linker definitions.

The startup file from the example should not be copied independently, as it may rely on other initialization and linker settings from that example. Please provide the Core 0 and Core 1 startup files, linker files, S32 Design Studio version, and the instruction where execution stops after replacing the Core 0 startup file.

Main changes: I focused the answer on the likely root cause, cache configuration on both cores, while avoiding the unsupported assumption that cache is definitely responsible. I also requested the minimum project details needed to analyze the startup hang.

Re: How to disable data cache of mpc5775k for data exchange between cores?

  The issue solved by replace the startup.s  of core1 in the example with the auto generated startup.s file ,and recompile the project, the program seem to work fine. core 0 write to shared ram, and core 1 read out correctly.

标记 (1)
无评分
版本历史
最后更新:
3 周之前
更新人: