Put A array in Paged RAM and the Array index is a variable -Addressing error

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

Put A array in Paged RAM and the Array index is a variable -Addressing error

545 Views
suomichen
Contributor I

Hello:

         I wanted to put some data into paged RAM, including arrays, but when I tested it, I found an addressing exception if the index of the array was a variable.

         Below are the test cases and the results:    test exampletest example

                                            test result:

Result.png

    The result shows that the index of the array was a variable addressing error, and the index of the array was a  constant addressing correct.

    How can I get around this issue? Could someone please explain in more detail how to solve this problemThanks a bunch!

0 Kudos
1 Reply

525 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

on the basis of memory model the variables and pointers are far or near in default. Because I do not see entire project to see everything I think better is to share an example code you can test. Moreover, it is necessary to correctly understand memory map and addressing modes.

Please look into attachment. I suppose you use XEP100 device.

I believe it will help you.

Best regards,

Ladislav

0 Kudos