Memory overlapping on 5282

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory overlapping on 5282

1,219 Views
PeterTruong
Contributor I
Hi,
I'm just wondering if anyone has any info regarding the handling of memory overlapping between internal FLASH and SDRAM on the 5282. So far I have found that the 5282 on my target board (ie. Netburner 5282 module) gives the access priority to the internal FLASH over the SDRAM and this does not cause any execution problem. However, I'm not sure if this is valid/legal to have memory overlapping like this and have a little bit concern that this may cause some conflicts in the future.
In the 5282 manual, I can only find info regarding memory overlapping restriction for DACR and CSAR and the access priority among IPSBAR, RAMBAR, Cache, SDRAM, and chip selects.
 
The reason that I consider overlapping the FLASH and SDRAM is because:
1) Prefer the FLASH containing the boot code to be mapped to 0x0000 0000 and no subsequent relocation (eg. move to 0xFFC0 0000 during boot code execution).
2) The SDRAM is an 8MB module and prefer to have it cover the region at 0x0020 0000 onward.  
 
Regards,
Peter
 
Labels (1)
0 Kudos
2 Replies

277 Views
stzari
Contributor III
Hi Peter,

I can't think of any valid scenario, where overlapping memory blocks would be useful.

You don't need relocation to execute your bootcode from the FLASH, since after Reset CS0 (to which the FLASH is usually connected) is asserted for every external access until you set the bit CSMR0[V] (see chapter 12.3.1.2 in the 5282's User's Manual).

So you can compile and link your bootcode for Flash (e.g. 0xFF000000 on my board) and it will be executed after Reset.

HTH
  stzari
0 Kudos

277 Views
PeterTruong
Contributor I
Hi Stzari,
Thanks for your reply.
The global chip select functionality for CS0 that you refer to is for external memory access during boot up and not for internal FLASH. The internal FLASH has its own base address register for you to set its base address and hence its access is treated differently from that on CS0. I also found that although the processor boots from the internal FLASH the global chip select functionality remains active for all external access until CSMR[V] bit is set. 
 
Because the global chip select does not appliy to the internal FLASH, the technique that you normally used to boot up from CS0 cannot be used.
 
Regards,
Peter T
0 Kudos