Samsung S3C4510B Memory Remapping

Hello,

I am writing the firmware for a custom board which uses the Samsung S3C4510B MCU. It board has 512KB of ROM and SRAM.

I would like to remap the memory into the following locations

ROM at Bank0: 0x00000000 - 0x00080000 RAM at Bank1: 0x00100000 - 0x00180000

In my assembly program, I initialised the control register with the following instructions:

;Initialise SYSCFG register LDR r0, =SYSCFG LDR r1, =0x07FFFFA0 STR r1, [r0]

;Initialise EXTDBWTH register LDR r0, =EXTDBWTH LDR r1, =0x06 STR r1, [r0]

;Initialise ROMCON0 register LDR r0, =ROMCON0 LDR r1, =0x00800060 STR r1, [r0]

;Initialise ROMCON1 register LDR r0, =ROMCON0 LDR r1, =0x01804060 STR r1, [r0]

;Initialise REFEXTCON register LDR r0, =REFEXTCON LDR r1, =0x9C218360 STR r1, [r0]

I have used the same values to initialise the registers using AxD and JEENI and it worked. I can access the RAM locations.

However when I run the above codes in the assembly program which I downloaded into the ROM, it does not work. Its not the problem with the rest of my codes as when I don't initialise the registers (ie. using the default mem map), the program runs fine. Is there anything I missed out?

Btw, what are the instructions for implementing copying of codes from the ROM to SRAM after remapping?

Thanks in advance!

Rgds, Leslie

Reply to
mantaray
Loading thread data ...

There is one group of registers in the memory controller that must be written to as a group using a multiple-register-write command. I don't remember which registers it is, but I tripped over that rule when trying to set up the memory map in a '4510.

memcpy()

--
Grant Edwards                   grante             Yow!  Who wants some
                                  at               OYSTERS with SEN-SEN an'
                               visi.com            COOL WHIP?
Reply to
Grant Edwards

Actually the C startup code should do this for you.

--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
Use @monlynx.de instead !
Reply to
42Bastian Schick

Thought I should post a follow-up, in case others might come across the same problem.. I managed to set the registers with the multiple store instruction..

ADRL r0, System> >

some

SEN-SEN an'

Reply to
mantaray

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.