Content originally posted in LPCWare by mubes on Mon May 12 00:52:18 MST 2014
Quote: george.thaliath
It could not possibly be power as the system is always turned On and the power on board was design for lot more modules to be attached. So we are looking at a buffer of about 300mA more avilable.
George,
How many times has a problem of mine turned out to be something it 'could not possibly be'? :bigsmile:
I would start off by disabling all interrupts for the duration of the flash write (__disable()) as, IIRC, that is a reccomendation, and certainly the flash writing process has time criticalities in it which you don't want to disturb.
I would then look at the power with a scope at the point at which the write is comitted (e.g. set a pin just before you enter the flashwrite routine and use that to trigger a scope to look at the power at that time) and look for droops or noise....are you doing anything that is corrolated with the flash which is power-affecting (e.g. turning on a LED, changing the state of a perhiperal etc.?). On the 812's you certainly _can_ run from flash while flashing a different area of the chip, but it is worth checking the manual carefully to ensure that this is acceptable on the chip you're using.
Good luck, and please post your findings so we can all learn.
DAVE