IMXRT1024 NONCACHEABLE SECTION IN STRUCT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMXRT1024 NONCACHEABLE SECTION IN STRUCT

ソリューションへジャンプ
1,982件の閲覧回数
Lukas_Frank
Senior Contributor I

Hi all,

 

I am just trying to create noncacheable section in LPUART EDMA Ring Buffer example. Is it possible to do?

Just like below:

typedef struct OperationDMA

{

AT_NONCACHEABLE_SECTION_INIT(uint8_t rxBuffer[BUFF_SIZE]);//LIKE THIS

AT_NONCACHEABLE_SECTION_INIT(uint8_t rxBuffer[BUFF_SIZE]) = {0}; //OR LIKE THIS

}OperationDMAType;

 

Thanks and Regards.

0 件の賞賛
返信
1 解決策
1,945件の閲覧回数
carstengroen
Senior Contributor II

This is not the right way to do this (not proper C). You are declaring a datatype (typedef), not an instance of the structure.

You need to do the typedef (where you declare the datatype), and then do an instance of the typedef. This instance is put in non-cacheable section with the following:

 

 

// Declare the datatype
typedef struct OperationDMA {
  uint8_t rxBuffer[BUFF_SIZE]);
  uint8_t someOtherBuffer[BUFF_SIZE];
} OperationDMAType;
// Make an instance of the datatype just declared (typedef'ed) and place it in non-cachable memory
AT_NONCACHEABLE_SECTION_INIT(OperationDMAType myDMA);

 

 

元の投稿で解決策を見る

3 返答(返信)
1,957件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is it possible to do?
-- Yes, like this
AT_NONCACHEABLE_SECTION_INIT(uint8_t rxBuffer[BUFF_SIZE])
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
1,951件の閲覧回数
Lukas_Frank
Senior Contributor I

Hi Dear @jeremyzhou

 

I tried it before and after post the issue. But it is not working. It is returning error "section attribute not allowed for 'rxBufferInStruct_asNonCachable'

 

rxBufferInStruct_asNonCachable is my parameter name in struct.

Could you help me about How could I do that?

 

Thanks and Regards. 

0 件の賞賛
返信
1,946件の閲覧回数
carstengroen
Senior Contributor II

This is not the right way to do this (not proper C). You are declaring a datatype (typedef), not an instance of the structure.

You need to do the typedef (where you declare the datatype), and then do an instance of the typedef. This instance is put in non-cacheable section with the following:

 

 

// Declare the datatype
typedef struct OperationDMA {
  uint8_t rxBuffer[BUFF_SIZE]);
  uint8_t someOtherBuffer[BUFF_SIZE];
} OperationDMAType;
// Make an instance of the datatype just declared (typedef'ed) and place it in non-cachable memory
AT_NONCACHEABLE_SECTION_INIT(OperationDMAType myDMA);