A question about PR_ SECTION(adcLists)

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

A question about PR_ SECTION(adcLists)

411 Views
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?

 

      

Tags (1)
0 Kudos
1 Reply

400 Views
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 Kudos