Hi, I am currently trying to run a program with the follow code but my watchdog always reset. I tried to turn off the COP by changing SOPT_COPE to 1 at main.cpp but I still don't get it to stop at the breakpoints I set. But anyway, can somone take a look at my code and tell me what's wrong, can? Thank you. I tried to isolate the problem and apparantly, it's got to do with the sin function I used. Thank you.
int iNsample,in;
float fsine,fsinCoM,fFreq,fdT,fsinCo;
iNsample = 32;
fFreq = 440.0;
////----Maths function----\\\\\
fdT = 1/(fFreq * iNsample);
fsinCo = 2.0 * _M_PI * fFreq * fdT;
for(in=0; in
{
fsinCoM = fsinCo * in;
fsine = (sin(fsinCoM) + 1) * 100;
sinearray[in] = (int) fsine;
};//end for