Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Ethernet bootloader problem from flash magic

Status
Not open for further replies.

LOSTISLAND

Member level 3
Joined
Jun 8, 2010
Messages
54
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Activity points
1,682
Hi all ,
I’ve got a problem with Flash Magic Ethernet BootLoader .
The original sample for LPC1768 works fine but with a little change I made in the source code of the bootloader program . Here’s the line I added :
SCB->VTOR = 0x00002000; in the code below:

void execute_user_code(void)
{
void (*user_code_entry)(void);
SCB->VTOR = 0x00002000;
user_code_entry = (void (*)(void))(USER_START_SECTOR_ADDRESS | 0x00000001);
user_code_entry();
}


I can load some of my own programs into the microcontroller through ethernet (Via Flash Magic) , But when I load Some others , they don’t work at all .
Thanks in advanced

Bootloader Settings :

IROM1 = 0 , SIZE = 0x80000
IROM2 Not Used

IRAM1 Not Used
IRAM2 = 0x20082000 , Size = 0x1000

/////////////

Program Settings :

IROM1 = 0x2000 , SIZE = 0x80000
IROM2 Not Used

IRAM1 =0x10000000,size=0x8000
IRAM2 = 0x2007C000 , Size = 0x6000


It seems the problem lies on IRAM1 & IRAM2 Settings or lies on the different initialization settings between the bootloader program and my own programs which are loaded into the microcontroller or lies on SCB->VTOR.
I don’t exactly know how to set IRAM1 & IRAM2 in different programs . I just use different places in RAM and don’t know if some places are allocated to something or not or am I free to choose wherever interested or not ?

Isn’t the programs loaded supposed not to dependent on the bootloader program initialization ?
For example PLL ,TIMER, UART,… settings are set for some programs and they work perfectly when not using a bootloader . Now the bootloader has some settings for PLL and timer and uart .
For uart the first initialization is executed(BootLoader) and now the second is executed(The program loaded) with some changes . If I don’t have the exact same settings as bootloader settings on my program , the uart doesn’t work on the program !

The strange point is why there wasn’t the line I added to the bootloader program
(SCB->VTOR = 0x00002000;) ?

any help ?

Thanks in advanced
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top