This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Frequency scaling issue with MSP430F1610

Other Parts Discussed in Thread: MSP430F1610

Hi,

I am trying to do frequency scaling on MSP430F1610 for a simple multiply instruction. I want to check at what maximum frequency the code fails. The output of the multiply instruction can be viewed on the P1 pins. As I increase the frequency, the corresponding LEDs connected to P1 pins still continue to be ON. It seems increasing the frequency doesnot matter. How do I check at which frequency my code actually fails ?

Below is my code fragment:

#include <stdio.h>
#include "msp430.h"
int do_mult(int a, int b){return a*b;}
void main(void) {
WDTCTL = WDTPW + WDTHOLD;
P1DIR = 0xff;
// Code that takes input from the XT1 clock . Not provided here
volatile int i;
do {
IFG1 &= ~OFIFG;
for (i = 0xff; i>0; i--);
} while((IFG1&OFIFG) == OFIFG);
for (;;){
P1OUT = P1OUT ^ do_mult(1,5);
for(i = 0; i<32000; i++){}; 
}
}

**Attention** This is a public forum