A question about PR_ SECTION(adcLists)

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

A question about PR_ SECTION(adcLists)

528件の閲覧回数
maxxu
Contributor IV

hi

How to understand" pr_ Section" , what is its function and where is its reference?

In addition, my command is three, if the result array is also three members, the program can not run, the result array must be four members,why?

mycode about ADC0Command:

           PR_SECTION(adcLists)

          volatile char ADC0CommandList[3][4] = {

                     {0x40,0xD2,0x10,0x00},

                     {0x00,0xCB,0x00,0x00},

                     {0xC0,0xD3,0x00,0x00}

                };  

mycode about ADC0Result:

  volatile unsigned short ADC0ResultList[4] = {0, 0, 0, 0};

  volatile unsigned short ADC1ResultList[4] = {0, 0, 0, 0};

Why should the members of the result array be larger than those of the command array in order for the program to run normally?

 

      

タグ(1)
0 件の賞賛
返信
1 返信

517件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

Hello Maxuu,

the expression "pr _SECTION" defines dedicated section in RAM memory for certain variables. it is defined in the Linker Files\*.prm file in project. It could be changed if needed. So if you use such SW example please ask author for detail explanation of intention of this memory organization.

Best Regards,

Stano.

0 件の賞賛
返信