This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C51 Not usig Dual datapointer

We assumed that this verry good compiler could recognice "for" statements moving bytes from one buffer to another. This seams not to be right. From the manual I can se that the dual dp only works with a limited number of lib functions (strcpy, memcpy...)
Do anyone have experience in using dual dp on dallas 320 and do we have to set up any directives for the compiler to use the dual dp all over the program.

Henning

Parents
  • You are right. Dual data pointers are only used by Keil library functions and any assembly language functions you may happen to write.

    The choice whether to use dual memory pointers is a target level option.

    Library functions such as memcpy will be significantly faster when when dual memory pointers are selected. However, there is an impact on interrupt service routines. With dual memory pointers selected, interrupt sevice routines have to save two data pointers where there was only one before.

    If your application has high frequency interrupts, but low frequency library function calls, you may be better off keeping dual data pointers disabled.

Reply
  • You are right. Dual data pointers are only used by Keil library functions and any assembly language functions you may happen to write.

    The choice whether to use dual memory pointers is a target level option.

    Library functions such as memcpy will be significantly faster when when dual memory pointers are selected. However, there is an impact on interrupt service routines. With dual memory pointers selected, interrupt sevice routines have to save two data pointers where there was only one before.

    If your application has high frequency interrupts, but low frequency library function calls, you may be better off keeping dual data pointers disabled.

Children
No data