Memory address length

Hi all,

I'm not sure where to find this information, but I need to know what the length of the memory addresses on Arduino Due is. Is it the same 16 bit as the UNO or is it 32 bit?

Thanks

See Sam3x datasheet section 7 page 31 for the memory mapping with addresses.

az492008:
I'm not sure where to find this information, but I need to know what the length of the memory addresses on Arduino Due is. Is it the same 16 bit as the UNO or is it 32 bit?

It's 32 bits.

Great, thanks both!

According to the datasheet, the data bus is 32-bit. The external memory address bus is 24-bit. The internal SRAM: 96 KB (two banks: 64KB (16-bit) and 32KB (15 bits)), and flash memory 512K (19 bits).

promacjoe:
According to the datasheet, the data bus is 32-bit. The external memory address bus is 24-bit. The internal SRAM: 96 KB (two banks: 64KB (16-bit) and 32KB (15 bits)), and flash memory 512K (19 bits).

That's a very weird way of looking at. I am assuming the OP is interested in the C/C++ programmers model. The address bus is 32 bit, and an address is 32 bits. The size of a pointer is 32 bits.

The whole 32 bits is taken as the address, there are no "19 bit" addresses. Whether there is a memory at a particular address, and how the bank/chip select is managed are separate questions irrelevant to the C/C++ programmer.

I know it looks strange, but, other than the number of bits for each internal address bus, the information was obtained directly off the datasheet.

The data buses 32-bit wide.

The external address bus is 24 bits wide. This will allow you to access up to 16 MB of memory. It also has 8 chip selects.

The internal memory address is as follows. Since this memory is internal, You cannot add to it.

SRAM: 96 KB (two banks: 64KB (16-bit) and 32KB (15 bits)). The number of bits for each is implied, and not directly given by the datasheet. but that is what it takes for each bank.

Flash memory 512K (19 bits). again the number of bits is implied.

in general, the C programming language does not dictate the number of address bits available on any particular chip. and although it can augmented through the I/O port , The amount of physical addressable memory cannot be changed. if you want to argue with someone, argue with the person who wrote the datasheet.

The following is a direct quote from the datasheet.

" 7.3 External Memories
The 144-pin SAM3X and 217-pin SAM3X8H(1) feature one External Memory Bus to offer interface to a wide range
of external memories and to any parallel peripheral.
Note: 1. This device is not commercially available. Mounted only on the SAM3X-EK evaluation kit.

7.3.1 External Memory Bus

Integrates Four External Memory Controllers:
. Static Memory Controller
. NAND Flash Controller
. SLC NAND Flash ECC Controller
. Single Data Rate Synchronous Dynamic Random Access Memory (SDR-SDRAM)

Up to 24-bit Address Bus (up to 16 Mbytes linear per chip select)

Up to 8 chip selects, Configurable Assignment "

Refer to the datasheet for more information on each type controller/memory.

The datasheet doesn't actually say directly, but the address bus in Cortex M3 is 32 bits, an address is 32 bits - full stop. All the rest is irrelevant.

The C compiler does dictate the size of a pointer when you select the machine architecture, in this case "mcpu=cortex-m3" means that a pointer is C is 32 bits, you have no choice about that. You can't create a 19 bit pointer, or a 24 bit pointer.

There is no such as a thing as a 19 bit address on SAM3X, that is just nonsense by people with a little knowledge trying to confuse others :slight_smile:

ALL ADDRESSES ARE 32 BITS! :slight_smile:

length of the memory addresses on Arduino Due

The external memory address bus is 24-bit. The internal SRAM: 96 KB (two banks: 64KB (16-bit) and 32KB (15 bits)), and flash memory 512K (19 bits).

All of those "blocks" of memory are addressed by the same 32bit addresses, and are subsets of the 32bit address space. So flash is at 0x0 to 0x7FFFF, internal SRAM is at 0x20070000 through 0x20087FFF, external RAM could be at 0x60000000 (except there isn't any external RAM on a Due.) Peripherals, system registers, and some ROM are also in the same shared 32bit address space.

(This is somewhat different than the AVR, where there are separate address spaces for the program memory and the RAM/Peripherals. (and yet another for EEPROM.))

See Section 7 of the SAM3X datasheet: "Memories", and Section 10.5 "Cortex M3 Memory Model"