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

why LPC1788 bit-band region do not cover internal SRAM completely?

hi to all,
i am working on a project that in it i need to do some process on large amount of data (nearly 10Kb) and generate some output signal by deciding on each bit of my data and indeed i am in pinch by timing problems, so i decided to use some feature that ARM putted in CORTEX-M processor that called bit-banding that permit to developers access to variables that stored in specific area in memory in bit dimension in very optimized manner.
i am using LPC1788 CPU that define below memory layout:
1. 0x1000 0000 - 0x1000 FFFF For devices with 64 kB of local SRAM
2. 0x2000 0000 - 0x2000 1FFF Peripheral RAM - bank 0 (first 8 kB)
3. 0x2000 2000 - 0x2000 3FFF Peripheral RAM - bank 0 (second 8 kB)
4. 0x2000 4000 - 0x2000 7FFF Peripheral RAM - bank 1 (16 kB)
and it also define below bit-band area for SRAM:
-. 0x20000000 - 0x200FFFFF SRAM bit-band region
-. 0x22000000 - 0x23FFFFFF SRAM bit-band alias
as you can see bit-band region only cover some part of memory region (part 2&3&4) not part (1) that called by official datasheet as CPU SRAM (part 2&3&4 called as peripheral SRAM).
i know that with compiler linker script and other option or by using "at" attribute i can force compiler to place a variable in bit-band region, but i do not know that is correct to force compiler to place variable in that region or no (by default compiler place variable in part.1 of memory)?? what is meaning of Peripheral RAM?? can i change setting in some way to mcu address 64KB cpu SRAM(part 1) in bit-band region??

thanks for your attention

  • >>can i change setting in some way to mcu address 64KB cpu SRAM(part 1) in bit-band region??

    No

    >>but i do not know that is correct to force compiler to place variable in that region or no

    Use a scatter file, name the region, use __attribute__ to place specific data in there, or have the heap reside there and malloc() from it.