Other Parts Discussed in Thread: TMS320F2809, TMS320F2806
Hello:
My system: TMS320F2809 + an external oscillator of 20MHz / 3.3V
1) The output of external oscillator is tied to XCLKIN, and X1 is tied to GND.
2) The program has already been donwload to FLASH.
3) Mostly the program runs correctly after powered-up, sometimes It seems that the program does NOT start. Then I tested the following signals:
- XCLKIN : 20MHz
- XCLKOUT: No output on this pin.
I suspect that, maybe, the DSC detected a "Main Oscillator Fail Detection". Then I did the following test in my initializing codes:
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 0)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.all = 0x00000000; // All GPIO
GpioCtrlRegs.GPAMUX2.all = 0x00000000; // All GPIO
GpioCtrlRegs.GPAMUX1.all = 0x00000000; // All GPIO
GpioCtrlRegs.GPADIR.all = 0xFFFFFFFF; // All outputs
GpioCtrlRegs.GPBDIR.all = 0x0000000F; // All outputs
EDIS;
GpioDataRegs.GPADAT.all = 0x5A5A; /* The relative IO pin is tied to a LED */
GpioDataRegs.GPBDAT.all = 0x005A; /* The relative IO pin is tied to a LED */
while(1) ;
SysCtrlRegs.PLLSTS.bit.MCLKCLR = 1;
asm(" RESET"); // for debug only???????
//asm(" TRAP #0");
//while(1);
}
But the relatie LEDs are not the desired status.
I'm appreciated if any one would help me to solve this problem. Thank you in Advace.
Larry.