Page 1 of 1

LM3S9B95

Posted: Wed Apr 13, 2011 2:13 am
by Madis
Hello.

I have problem with LM3S9B95 controller and "Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)"

flash programming does not seem to work. I checked the debug output of the openocd, it seems to operate correctly. For mass erase it writes 0xA4420004 to address 0x400fd008 and starts polling it. But the thing is that the operation seems to never finish. This MERASE bit never returns to 0 again and openocd hangs... Does anybody have any comments, hints?

I attach my debug output file.

But in case I compile a short code sample I can load it to RAM, move pc to there and execute it. Eclipse and gdb are quite happy. So the controller itself seems to work somehow...

Thanks, Madis

Re: LM3S9B95

Posted: Wed Apr 13, 2011 2:50 am
by itikhonov
May be http://www.ti.com/litv/pdf/spmz537g
Mass erase must not be used if Flash protection bits are used

Description:

The mass erase function using the MERASE bit in the Flash Memory Control (FMC) register must
not be used in systems that clear any of the Flash Memory Protection Program Enable n (FMPPEn)
bits. For Rev C1 devices, this means that mass erase must not be used because bits in the FMPPE0
registers are cleared to protect the reset patch that is stored in the first block of Flash memory. For
Rev C3 and C5 devices, mass erase can be used as long as none of the FMPPEn bits are cleared.

Workaround:
Erase Flash memory with the page erase function using the ERASE bit in the FMC register instead
of the mass erase function.

Silicon Revision Affected:
C3, C5

Fixed:
Not yet fixed.

Re: LM3S9B95

Posted: Wed Apr 13, 2011 2:59 am
by Madis
Thanks,

I started to check the versions/revisions of my controller too. Device is C1 and errata seems to enlighten the issue...

I will start my code at 0x1000 and not use mass_erase then, will see what happens.

Madis

Re: LM3S9B95

Posted: Wed Apr 13, 2011 5:01 am
by Madis
Ok, 0x1000 if fine. In case not using mass_erase openocd works fine. I link my code to address 0x1000 and seems to work...

Thanks, Madis

Re: LM3S9B95

Posted: Wed Apr 13, 2011 5:35 am
by itikhonov
Yeah i thought software bugs are nightmare till i hit compiler bugs till i hit hardware bugs :)

Tempest C1

Posted: Thu Aug 04, 2011 9:59 pm
by drwho9437
Madis or anyone else can you tell me how to program the LM3S9xxx chip without using mass erase?

write_image seems to automatically call mass erase even without the "erase" command. I am using the most reason OpenOCD development release. Tired issuing sector erases but it seemed to just hang on those.