Reply by ccampbell_daed May 7, 20102010-05-07
Thanks Mark

I have lots of gnd: three planes all connected to the thermal pad/gnd on the bottom of the part with about 10 vias, and there's 10's of uF X5R ceramics quite close by, as well as 1uF on each of the power pins within a few 100 mils. I'm not sure I can do any more than this.
The noise is not outside of the part, and it's not small, like 300mV on a 1.2V conversion w/ 1.5V ref. The odd thing is that the noise seems to be proportional to the signal offset from center, but this is too wierd to be real, I must be imagining it.
I am hoping that there's some clever timing trick that folks know that can be used as a guideline to tweek the sample/hold period relative to the FLASH write that will make this go away. Otherwise, I guess I'm stuck with interpolating the sample after the write.

Craig
>
> My guess: Flash writing requires high current. These current spikes
> are raising the ground level during flash writing.
>
> Suggestions:
> 1. Make sure your power supply is low-impedance. Try a big ol'
> tantalum cap on the power supply.
> 2. Watch the supply on the scope. Look at your ground traces closely.
> 3. Think about ground. Can you tie Vss and AVss together at the
> micro, then run a trace from Vss to be the ground reference for your
> input?
> 4. Scaling. Make sure your signal is using the full range of the ADC.
> This should make the noise proportionally smaller.
>
> Or maybe the flash writing charge pump is just making huge amounts of
> noise internal to the chip and there's nothing you can do to fix it.
> Then your options are to use an external ADC or just drop the sample
> and interpolate over it.
>
> Regards,
> Mark
> markrages@gmail
> --
> Mark Rages, Engineer
> Midwest Telecine LLC
> markrages@...
>

Beginning Microcontrollers with the MSP430

Reply by Mark Rages May 7, 20102010-05-07
On Fri, May 7, 2010 at 9:56 AM, ccampbell_daed wrote:
> Hi Everyone
>
> I'm having a problem with an MSP430F5528:
> I use the ADC12 to sample an input at 8KHz, do a little processing of it, and write it to FLASH, one 32 bit word for every 8 samples (simple ADPCM audio).
> The problem is that the ADC sample after the FLASH write shows a big noise spike. This spike is not present on the external analog signal, Vcc/AVcc, nor on the external buffered Vref output. I'm using the internal 1.5V reference, but the problem is the same if I use Vcc/AVcc for the reference.
> If I do a word write on every sample (no compression), the noise does not show up in the data, probably because it's consistent for every sample.
> I've tried different sample and hold timing, different references, and various buffering schemes, but nothing has helped. I can't find anything that talks about ADC noise from FLASH writing in the datasheet, app notes or errata, but maybe I'm not searching for the right thing. The FLASH word write time is not too far off of the sample period in this case, but there's not much I can do about that.
> A second issue is that with compression and the 8KHz sample rate, I end up at exactly twice the cummulative programming time limit for a FLASH block. I can't figure out from the datasheet how to work around this, given that buffering doesn't work due to the noise issue and the desire to not miss any samples.
>
> Does anyone have experience or suggestions?
>

My guess: Flash writing requires high current. These current spikes
are raising the ground level during flash writing.

Suggestions:
1. Make sure your power supply is low-impedance. Try a big ol'
tantalum cap on the power supply.
2. Watch the supply on the scope. Look at your ground traces closely.
3. Think about ground. Can you tie Vss and AVss together at the
micro, then run a trace from Vss to be the ground reference for your
input?
4. Scaling. Make sure your signal is using the full range of the ADC.
This should make the noise proportionally smaller.

Or maybe the flash writing charge pump is just making huge amounts of
noise internal to the chip and there's nothing you can do to fix it.
Then your options are to use an external ADC or just drop the sample
and interpolate over it.

Regards,
Mark
markrages@gmail
--
Mark Rages, Engineer
Midwest Telecine LLC
m...@midwesttelecine.com
Reply by ccampbell_daed May 7, 20102010-05-07
Hi Everyone

I'm having a problem with an MSP430F5528:
I use the ADC12 to sample an input at 8KHz, do a little processing of it, and write it to FLASH, one 32 bit word for every 8 samples (simple ADPCM audio).
The problem is that the ADC sample after the FLASH write shows a big noise spike. This spike is not present on the external analog signal, Vcc/AVcc, nor on the external buffered Vref output. I'm using the internal 1.5V reference, but the problem is the same if I use Vcc/AVcc for the reference.
If I do a word write on every sample (no compression), the noise does not show up in the data, probably because it's consistent for every sample.
I've tried different sample and hold timing, different references, and various buffering schemes, but nothing has helped. I can't find anything that talks about ADC noise from FLASH writing in the datasheet, app notes or errata, but maybe I'm not searching for the right thing. The FLASH word write time is not too far off of the sample period in this case, but there's not much I can do about that.
A second issue is that with compression and the 8KHz sample rate, I end up at exactly twice the cummulative programming time limit for a FLASH block. I can't figure out from the datasheet how to work around this, given that buffering doesn't work due to the noise issue and the desire to not miss any samples.

Does anyone have experience or suggestions?

Best Regards,
Craig