Forum: µC & Digital Electronics Increasing the E-meter Data Refreshing Rate of ESP430

von Gerry J. (gerrykk)

Rate this post
0 useful
not useful

I am currently working with MSP430FE427 and mainly using the ESP430CE1 
module. The ESP430CE1 module calculates the Energy data for the CPU and 
raise an IFG to CPU whenever they are ready. I'm using LED to indicate 
whenever the Calculated Energy Results (ENRDYIFG) has come. So far, the 
calculation results are refreshing at a rate of 1 second, which is 1 Hz 
in Freq.
As far as I know, it is sourced as the following, according to TI's 
example "Implementing An Electronic Watt-Hour Meter With MSP430FE42x"

XT1 = 32768 Hz
f DCO = 64 * XT1 = 2.097 KHz
f system = 8192 KHz = 8 MHz
-->  MCLK = SMCLK = 8 MHz
      --> f(SD16) = f(M) = SMCLK/8 = 1MHz
(This is the Sigma-Delta Modulator clock frequency, this defines the 
ESP430 timebase unit)
           --> f(ADC) = f(M)/OSR = F(M)/256 = 4096 Hz
(This is the AD Conversion Data Rate after the Decimation, this defines 
how fast a sample could be produced)
                --> f(Calculation) = f(ADC)/4096 = 1Hz
(This is the Refreshing Rate of the Calculated Results from the 
ESP430CE1 module. This shows how fast an Energy Calculation can be 
executed. Each calculation requires 4096 samples)

Now the problem is : I want to increase the Refreshing Rate. 1 second is 
too slow for our project. I can change 4 ratios:
1. reduce the 4096 samples for calculation --> but it seems no where to 
modify this parameter. 4096 samples for 1 calculation seems fixed.

2. reduce the Over Sampling Rate(OSR) --> this is the last thing I wanna 
do, anyway, high OSR is a key point to Sigma-Delta ADC.

3. reduce the SMCLK divider for the SD16 Modulation -->I have tried 
this, but it seems to malfunction when the divider decreases. 
SMCLK/4 seems ok, the LED is toggled every 1/2 second.
SMCLK/2, the LED is toggled a bit longer than 1/4 second. 
SMCLK/1 is weird, the LED is toggle back to every 1/2 second(WHY is 
and I don't know if the measurement will be false if I just increase the 
Modulation Freq. as high as the MCLK

4. Increase the SMCLK and MCLK to 16MHz --> in this case, the LED 
doesn't toggle at all(weird too.....)

Does anyone know where I can change the 4096 samples?
Can anyone explain why the LED behaves like that in the 3rd and 4th 
Other suggestions how I can make the Refreshing faster?

Thank you!!


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.