cancel
Showing results for 
Search instead for 
Did you mean: 

STR912FW44: Data abort after 32k flash boundary (ADR 0x8000 and higher)

pieter2399
Associate II
Posted on September 30, 2008 at 08:44

STR912FW44: Data abort after 32k flash boundary (ADR 0x8000 and higher)

2 REPLIES 2
pieter2399
Associate II
Posted on May 17, 2011 at 11:32

Hi guys,

I am writing a C low level startup sequence for the STR912FW44. As soon as the code tries to read flash memory past the 32k memory (address 0x8000 and higher) I get a data abort exception.

Can anyone give me a hint of what I might be missing or doing wrong?

Thanks!

Pieter

Here is my C initialisation code:

void LowLevelInit(void)

{

/* ''Buffered'' is defined in ''91xconf.h'' */

#ifdef Buffered

__asm__ __volatile__(

''mrc p15, 0, r0, c1, c0, 0 \n\t'' /* Read CP15 c1, Control Register */

''orr r0, r0, #0x8 \n\t'' /* Enable BIU write buffer on AMBA AHB */

''mcr p15, 0, r0, c1, c0, 0 \n\t'' /* Write CP15 c1, Control Register */

: : : ''r0'');

#endif

/*

* Set bits 17 (Data TCM order bit) and bit 18 (Instruction TCM order bit)

* in the Configuration Control Register.

*/

__asm__ __volatile__(

''mov r0, #0x60000 \n\t''

''mcr p15, 1, r0, c15, c1, 0 \n\t''

: : : ''r0'');

/*

* Map Flash Bank 0 at address 0x0 and Bank 1 at address 0x80000,

* when the bank 0 is the boot bank, then enable the Bank 1.

*/

FMI->BBADR = 0x00000000>>2; /* Set Boot bank base address to 0x00000000 */

FMI->BBSR = 4; /* Set Boot bank size to 512KB */

FMI->NBBADR = 0x00080000>>2; /* Set Non boot bank base address to 0x00080000 */

FMI->NBBSR = 2; /* Set Non boot bank size to 32KB */

FMI->CR = 0x18; /* Enable Flash Boot Bank and Non Boot Bank */

/* Enable SRAM */

SCU->SCR0 = 0x187 | (2 << 3); /* Set System configuration register to 96K SRAM size */

}

pieter2399
Associate II
Posted on May 17, 2011 at 11:32

Sorry, wrong forum. I will repost in STR9

Regards,

Pieter