Keil Logo

Data Pointers

The Infineon C515C, C517, C517A, and C509 provide 8 data pointers which may be used to speed-up memory access. Using multiple data pointers can improve the execution of library functions such as: memcpy, memmove, memcmp, strcpy, and strcmp. The 8 data pointers of the C515C, C517, C517A and C509 may also reduce the stack load of interrupt functions.

The Cx51 Compiler uses only 2 of the 8 data pointers at a time. In order to keep the stack load in the interrupt routines low, the Cx51 Compiler switches to 2 unused data pointers when switching the register bank. The contents of the register DPSEL are saved on the stack and a new pair of data pointers is selected. Saving the data pointers on the stack is no longer required.

If an interrupt routine does not switch to another register bank (for example, the function is declared without the using attribute), the data pointers must be saved on the stack (using 4 bytes of stack space). To keep the size of the stack as small as possible, use the MOD517(NODP8) directive to compile the interrupt routine and the functions it calls. This generates code for the interrupt using only one data pointer and only 2 bytes of stack space.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.