I am developing on a 28069 Experimenters board with Sys/Bios 6.34.4.22, and I am initializing the device and peripherals per functions from the control suite device support files like so:
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F2806x_SysCtrl.c file.
InitSysCtrl();
InitCpuTimers();
// Step 2. Initalize GPIO:
// This example function is found in the F2806x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
InitGpio();
InitEPwmGpio();
InitI2CGpio();
InitSpiGpio();
InitSciGpio();
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2806x_PieCtrl.c file.
InitPieCtrl();
// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table, even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in F2806x_DefaultIsr.c.
// This function is found in F2806x_PieVect.c.
InitPieVectTable();
// Enable global Interrupts and higher priority real-time debug events:
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
After this, I launch Sys/Bios. I don't further set up any peripherals at this point. When I try to debug my project at this point, clocks and timers don't seem to work. If I call Task_Sleep(5), the task will never wake up. However if I don't call the above code, and jump right into launching Sys/Bios, the clocks and timers do work. I haven't been able to find any good examples for setting up peripherals with Sys/Bios being used, and it seems like the code I pulled from a non sys bios example using the control suite device support files isn't working. Can someone help me with what could be going wrong here?