Invalidating Cache

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

Invalidating Cache

Jump to solution
465 Views
greenwichmeanie
Contributor III

We're using an S32K341. I understand that I can place DMA buffers into a noncacheable region but I'd prefer to perform DMA transfers and invalidate / clean cache by address.

We're using the RTD. Searching through the install, we can see these "by address" cache commands in files `Cache_IP.c/.h` but they weren't generated with our `.mex` file.

In the past I have used the CMSIS interface to perform this task but the code doesn't appear set up for this as far as I can tell.

For some background, we're using C++ and I've defined a class that will enforce the alignment and padding to the cache line lengths. I have a UART driver that encapsulates the RTD UART calls.

How can I access these cache functions?

0 Kudos
Reply
1 Solution
404 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need to add Cache_Ip component into your project in Peripherals tool, enable CACHE support in it and finally Update code.

PetrS_0-1763982932209.png

BR, Petr

View solution in original post

1 Reply
405 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need to add Cache_Ip component into your project in Peripherals tool, enable CACHE support in it and finally Update code.

PetrS_0-1763982932209.png

BR, Petr

%3CLINGO-SUB%20id%3D%22lingo-sub-2243129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EInvalidating%20Cache%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2243129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe're%20using%20an%20S32K341.%20I%20understand%20that%20I%20can%20place%20DMA%20buffers%20into%20a%20noncacheable%20region%20but%20I'd%20prefer%20to%20perform%20DMA%20transfers%20and%20invalidate%20%2F%20clean%20cache%20by%20address.%3C%2FP%3E%3CP%3EWe're%20using%20the%20RTD.%20Searching%20through%20the%20install%2C%20we%20can%20see%20these%20%22by%20address%22%20cache%20commands%20in%20files%20%60Cache_IP.c%2F.h%60%20but%20they%20weren't%20generated%20with%20our%20%60.mex%60%20file.%3C%2FP%3E%3CP%3EIn%20the%20past%20I%20have%20used%20the%20CMSIS%20interface%20to%20perform%20this%20task%20but%20the%20code%20doesn't%20appear%20set%20up%20for%20this%20as%20far%20as%20I%20can%20tell.%3C%2FP%3E%3CP%3EFor%20some%20background%2C%20we're%20using%20C%2B%2B%20and%20I've%20defined%20a%20class%20that%20will%20enforce%20the%20alignment%20and%20padding%20to%20the%20cache%20line%20lengths.%20I%20have%20a%20UART%20driver%20that%20encapsulates%20the%20RTD%20UART%20calls.%3C%2FP%3E%3CP%3EHow%20can%20I%20access%20these%20cache%20functions%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E