2009-10-20 02:53 AM
Boot mode Flash Program won't run
2011-05-17 04:23 AM
Well it doesn't even debug in Flash mode. I can set a breakpoint,
select debug start, it downloads the code, but it doesn't start with a breakpoint on the main entry like it does in RAM mode,the breakpoint I set never comes... If I select Debug Stop, it doesn't show where in the code it is. The disassembly view is suspiciously empty apart from 6 lines. The debug connector I copied from the Keil board MCBSTM32, but that compiler expired even before I opened the box (thanks Farnell). So I have one Jtag Line used as IO: GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE); Maybe that can stop me from being able to debug in Flash, but I don't see why it would stop code from running.2011-05-17 04:23 AM
I don't understand why i have to change back to another target board,
nor why I have to debug code that runs perfectly on my target board in Ram mode? All I change is Pogram mode from RAM to FlASH, no more no less in the Project options. And I set the jumpers on my target board from RAM to FLASH. Because that didn't work I tried some specific linker scripts. Thanks for your help Clive, but I m really considering a hardware layout change to an Atmel or a Texas. I been writing in IAR for both platforms for many years, but I never seen anything like this,on both platforms if I compile in debug I can debug, if I compile release I can download it to the flash, and if strange things happen its the stack/heap size in Iar. I don't get this boot mode stuff. All I know is I ended up with a working device until I change the battery.2011-05-17 04:23 AM
>>I don't understand why i have to change back to another target board
A process of elimination, if it works on the eval board, and not yours, guess where the problem is. >>All I change is Pogram mode from RAM to FlASH The RAM is single cycle, it can run 0-72 MHz, the FLASH is significantly slower and requires buffers/sequencers for it work, and wait states to limit bandwidth to 24 MBps. If the flash controller isn't programmed correctly, or the input clocks are not what they should be there will be problems. I would measure the HSE clock with a scope to confirm it is at the frequency expected. The part should start with the ~8MHz HSI clock, and the part can run from FLASH with the default settings (ie no need to select a clock, or use PLL, etc.) The STM32 can run from FLASH, most people using it do so. It's working for me, an I'm doing a lot of floating point math, and have square root code. I would take a hard look at the schematic, documentation, and scope/probe the board until I understood what the real problem was. I have no particular allegiance to ST, but frankly the STM32 isn't any harder to use, or layout, than the ATMEL AT91 or TI/LM parts. -Clive