It is my first C2000 project.
I have Docking-Stn + F28069 card.
I load project Example_2806xGpioSetup. I add to the end of main
while( 1 ) {GpioDataRegs.GPATOGGLE.bit.GPIO6 = 1; GpioDataRegs.GPATOGGLE.bit.GPIO7 = 1; GpioDataRegs.GPATOGGLE.bit.GPIO8 = 1; GpioDataRegs.GPATOGGLE.bit.GPIO9 = 1; }
and obtained meander on GPIO6 that is good.
I change in function InitSysCtrl call from IntOsc1Sel to XtalOscSel and program work.
Parameters of PLL (InitPll(DSP28_PLLCR,DSP28_DIVSEL);) is 9 and 2 and xtall on board is 20 MHz. System clock 20 * 9 / 2 = 90 MHz.
On oscillocsope I see time between switches about 480 ns. In debugger I see that circle of my code is 6 asembler commands. Thus time of execution of one command is 80 ns. Is it correct or where I mistake?
Constantine,Good to hear that things are moving along.Your question here and more is answered in the C2000 wiki:http://processors.wiki.ti.com/index.php/General_Purpose_IO_%28GPIO%29_FAQ_for_C2000Basically each ".bit write" instruction will force a full pipeline clear. This adds cycles but gives convenience. There are other methods of toggling GPIOs which are faster.Thank you, Brett
Thank you, Brett!
One more question.
I create new project In CCS 5 for this microcontroller and get all source codes from demo project:
main.cF2806x_SysCtrl.c F2806x_usDelay.asm F2806x_SWPrioritizedDefaultIsr.c F2806x_PieVect.c F2806x_PieCtrl.c F2806x_Gpio.c F2806x_GlobalVariableDefs.c
and headers.
I check that build, compiler, linker and debug options are the same
All works except that GPIO not changes states. Commands executes but values of GPIO data registers do not changes and voltage on pins not changes.
What I did wrong?