Code Banking

I'm working with a 32K microcontroller using external code banking. The external bank area is in address 0x8000- 0xFFFF and I have 16 banks of 32K.

If I configure a function in bank 0 I see that its code is in address 0x8000, but if I configure this function in bank 1 I see that code is in 0x18000.

I think if the size of the banks is 32K, if I choose Bank 1 for this function I should see the code of this fcn. in address 0x10000.

Parents
  • I think if the size of the banks is 32K, if I choose Bank 1 for this function I should see the code of this fcn. in address 0x10000.

    You probably need to refer to the description of how the code memory is mapped in your system.

    I would guess> that the internal code memory is always mapped to the addresses 0x..0000 to 0x..7FFF, regardless of the selected bank. The external memory thus is mapped to 0xYZ8000 - 0xYZFFFF, with YZ being the number of the bank.

Reply
  • I think if the size of the banks is 32K, if I choose Bank 1 for this function I should see the code of this fcn. in address 0x10000.

    You probably need to refer to the description of how the code memory is mapped in your system.

    I would guess> that the internal code memory is always mapped to the addresses 0x..0000 to 0x..7FFF, regardless of the selected bank. The external memory thus is mapped to 0xYZ8000 - 0xYZFFFF, with YZ being the number of the bank.

Children
More questions in this forum