2009-09-28 10:33 PM
Can't start my application from UART IAP
2011-05-17 04:23 AM
Hi all.
I'm having troubles in starting my application downloaded with the UART IAP (AN2557) All is well if I build the example project and download it, but nothing works if I build my own project: download is ok but the program doesn't start. I'm using Keil uVision v3.85 and I've compared sample project and my project side by side: they have the same compiler and linker settings. The source is also similar: just setup the clock, change the vectors with the NVIC_SetVectorTable and have some fun with leds, Systicks and IWDG. Since I've built my project from scratch, is there any relevant setting that I cannot see from IDE Project property ??? I did NOT try to use the sample project to build my sources because I'm against this procedure. We should be ale to create our project from scratch, shouldn't we ? Any hint ???2011-05-17 04:23 AM
I had the same problem creating a new project with Anglia's IDEaliST. I never did find out why. I simply replaced the sample hello code with my own, except for the startup file, and it ran OK.
Perhaps Anglia's sjo can provide an answer. :D Cheers, Hal [ This message was edited by: raptorhal on 16-09-2009 15:30 ]2011-05-17 04:23 AM
One update and some apologies.
The bootloader successfully jumps to my application, which start correctly but it seems to do nothing because the systick irq is not triggering. I made another build which does not use the bootloader and start at 0x08000000 and it works correctly. Off course the booloader version makes the call to NVIC_SetVectorTable just after SystemInit. Why does the systick irq is not working ??2011-05-17 04:23 AM
Don't you de-init some peripherals in the user appli in wrong order? Are you still in Handler mode? Does the bootloader set up the clocks?
You shall consider that the BL doesn't give you the MCU like just after reset! If you don't want to start with the template, do you write your own start-up code? ;)2011-05-17 04:23 AM
Hi edison,
Thanks for the reply and excuse me for not answering soon, but things evolved a little. I can now successfully launch my application, both from the AN2557 IAP and from my own bootloader. The problem was that I moved the application vectors with the NVIC_SetVectorTable call but the offset was not multiple of 0x80. Now I have another problem (sample application execution goes into HardFault_Handler) if the bootloader remain the same but the sample application is coded with the Keil RL-RTX operating system.... Anyway, this is another story, I'm still analyzing. Bye