Start from flash
2004-05-25 by tendoskeleton
Hello, I have written code that download an AIF into flash, so it doesn't have to download eacht time. Just by power up, the code will execute. Now this downloading goes great and it even works :), but not in the way I want to. When I manualy put the uC in user boot mode (register MEMMAP = 0x1) and I manually set the PC to 0x00000000 (reset vector) with a debugger and let it run, the program works great (read: it blinks the leds like I programmed) So now comes the problem; it doesn't do this automatically by power up. The LPC2104 has to detect valid user code and will check 0x14 for this. In my case there is 0x99FFFF68 (the two complements of the checksum of the other vectors. My situation Interrupt vector table Flash: 0x00 ea00001c 0x04 ea000015 0x08 ea000015 0x0c ea000015 0x10 ea000015 0x14 99ffff68 0x18 ea000014 0x1c ea000014 I think the reason why it doesn't work is because the uC doesn't detect valid user code and so it doesn't goes into user boot mode, put the pc to 0 and execute (like what I did manually) Can you guys confirm that I calculated the right 2 compl. checksum, or did I understand something wrong: ea00001c + ea000015 + ea000015 + ea000015 + ea000015 + 99ffff68 + ea000014 + ea000014 = 0 (32 bits). Right???? So any suggestion what I have to do to get it execute my user code automatically after powerup? Thanks alot Bob