Content originally posted in LPCWare by acno on Tue Aug 02 01:32:38 MST 2011
Quote: Rob65
This really looks like a power problem.
...... Rob
Thanks for your advice, but I have a long experience in this area, with several hundreds of microcontroller boards developed. I'm confident that the boards are correctly routed and the supply is correctly decoupled. Sure, there is always a better way to do things, but if you read the sequence of events on my original post, you can see that it is not possible that it is [B]"only"[/B] a supply problem.
On the board 2, powered at 3V from 2 batteries, if I use the front panel USB port (wich is routed from the mainboard to the panel with a very low quality cable), to reflash the board I must do 2 pass, systematically. I have several constraints on this board and I can tolerate this problems, but why the second try goes ok ?
Instead, if I use the rear USB port (which is directly soldered on the main board),
the error is very very rare.
The board 3, where until now I never had this problems, is the most complex. It uses the same layout and decoupling scheme (for the LPC1756 area) of the other boards with a fast I2C, ADC, DAC, PWM and an smps voltage booster to +100V/-100V. The only difference from board 2 is that when I debug it the LPC1756 is about 15cm far from the smps instead of 5cm of the other board.
The board 1 uses a fast I2C and 2 SPI and is powered by a remote board.
One of the SPI is connected to a daughter board with a MIFARE transceiver chip.
I rarely have flash programming errors on this board, but always when the daughter board (which generate a low power 13.56MHz field) is operating.
I'm sure that there is something critical in the communication path and it is influenced from EMI radiated noise. For me is not a big problem, the LPCXpresso board is very cheap and do its job completely, in the future, probably I will go with an upgrade, for examples with a RedProbe. I'm reporting this only because I think that there is room for improvements on the software management of this kind of errors, for example an automatic reset and retry would be nice instead of locking, leaving with only to unplug the USB and repeat all the debug entry steps.
Andrea