3
\$\begingroup\$

I was reading about ARM M series and somewhere it was written that: "the flash memory area is aliased from address 0x0000 0000". what does it mean?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ It means that it can be accessed using this memory address in addition to some other mapping. \$\endgroup\$
    – Eugene Sh.
    Nov 9, 2017 at 16:05

2 Answers 2

4
\$\begingroup\$

A typical microprocessor system works by having a CPU send an address to the memory subsystem along with either a read request or a write request containing a piece of data to be written. Various other devices in the system will look at the addresses sent out from the CPU, decide whether they are "interesting", and react accordingly.

A typical memory subsystem will have an address input along with some control inputs, and a data input and output. Some interface logic will look for the CPU to generate addresses that match certain criteria and, if such addresses are observed, signal the memory that it should read or write them (the memory subsystem will receive the lower portion of the address, which it will use to select an individual byte or word).

If a system has 64KB of memory mapped from 0x08000000-0x0800FFFF and the CPU issues request to write 0x99 to 0x08001234, then the memory will process that as a request to write 0x1234. If the memory were also wired to respond to addresses 0x00000000-0x0000FFFF (which might be accomplished by simply having its interface logic ignore bit 27 of the address), then a request by the CPU to read address 0x00001234 would be seen by the memory as a request to read 0x1234 (the location that was previously written).

In many cases, the memory itself won't know or care that the write was done at a different address from the read. It simply sees a write to what it regards as address 0x1234, and a read from that same address.

\$\endgroup\$
0
\$\begingroup\$

In Cortex-M, the processor always boots by reading the stack pointer from address 0x00000000, and the vector table starts at 0x00000004. The documentation you're reading here will be referring to an implementation of the processor, since it affects the memory system (not the processor).

Depending on how the design is arranged with bootloader and main code, it might be possible to 'remap' the memory map after boot. This might, for example, give you a way to change the interrupt vectors. Typically before changing the configuration of the address decoders, you would branch to the 'new' address of your code. To make this easier, two different memory addresses can map to the same physical memory (this wastes address space, but there is 'plenty' with 1Gb of code space on these devices).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.