2007-12-12 07:07 AM
How to make reset button correct-working by using IAP driver?
2011-05-17 12:48 AM
Hallo. I have a problem and need your help.
I use mcbstr9 and Keil 310. I remade ST IAP driver for KEIL. There is a bootloader ( bootloader is in flash bank1 and the main programm in flash bank0. When a definite event doesn't occur ( Z/B an interrupt by pressing a button on the board) the main pogram runs, else you see a menu in hyperterminal and you can download new main Program). But it is a problem with this driver. When I press reset button controller buzzs. I think it is so, because when reset occurs not all registers are set to their reset value, videlicet FMI and some SCU registers. That's mean that controller loads from small flash (bank1), but doesn't find a 0x0000 addr here! Did anybody solve this problem? /* I need a reset button in my Program. I would thank you very much, if somebody could help me.2011-05-17 12:48 AM
I just discovered this bug too. See Errata 2.14 for a description. The work around is to remap your main application to high memory and don't swap banks, which means a headache for your vector table at 0x00000000
2011-05-17 12:48 AM
Hello,
Yes, you are right. In this case, the software remapping of both banks should not be done and interrupts are to be redirected to bank0. Regards, Najoua.2011-05-17 12:48 AM
see
2011-05-17 12:48 AM
Thank you all.
I found a strange solution, but it works. Before the jump to main application, I change (like in IAP, but I don't change BBADR): FMI->BBSR = 0x0; FMI->NBBSR = 0x6; //FMI->BBADR = 0x80000 >> 2; I don't make it FMI->NBBADR = 0x0 ; So I have two banks with 0x00 addr. Then I disable the little flash bank: FMI->CR = 0x010; Then I jump to main application. And it works! If I press reset button, I see bootloader again. But if I change FMI registers in my main Program, jump occurs, but main application works up to this change. I had this Problem in first bootloader (with classical remap too). What is wrong? And why this strage program works?