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

Code banking & XDATA banking together

Hello,

We are working on a project having 2 code banking with using 128K Flash,

External SRAM 32k is used for XDATA; can we increase the SRAM by 128K;

Can we use code banking with XDATA banking together.

thanks in advance

I checked the link below>>
http://www.keil.com/forum/docs/thread646.asp

  • Yes, you can use code banking and xdata banking at the same time. XBANKING.A51 handles only code banking. L51_BANK.A51 handles code banking, and also implements some forms of code banking.

    Thanks to historical quirks, I happen to use both files in my project. I configure L51_BANK.A51 just for code banking, and let the (older) XBANKING.A51 code continues to do the data banking.

    The only upper limit on the size of your xdata when banked is the value of the tag bytes in the far pointers. The limit is just less than 8MB, so it's not a problem in practice. Actually addressing the memory is up to your address decoding hardware.

    ; R3 Value | Memory Type | Memory Class | Address Range                       *
    ; -----------------------+--------------+--------------------------           *
    ;    00    | data/idata  | DATA/IDATA   | I:0x00     .. I:0xFF                *
    ;    01    | xdata       | XDATA        | X:0x0000   .. X:0xFFFF              *
    ;  02..7F  | far         | HDATA        | X:0x010000 .. X:0x7E0000            *
    ;  81..FD  | far const   | HCONST       | C:0x800000 .. C:0xFC0000 (see note) *
    ;    FE    | pdata       | XDATA        | one 256-byte page in XDATA memory   *
    ;    FF    | code        | CODE         | C:0x0000   .. C:0xFFFF