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.

TMS320F28069F: Incorrect flash toggle test frequency

Part Number: TMS320F28069F
Other Parts Discussed in Thread: CONTROLSUITE

When running the flash toggle test on my hardware, I am not getting the correct frequency on the GPIO output. I am confident that my CPU_RATE is correct, but I changed it just to see how it would affect the frequency and there was actually no change to the GPIO output frequency. It remains at a period of 25 usec. What must I do to get the proper output frequency for this test?

  • Hi Phillip,

    You won't be able to toggle at the CPU frequency, check this wiki article:
    processors.wiki.ti.com/.../General_Purpose_IO_(GPIO)_FAQ_for_C2000

    Regards,
    Gautam
  • Hi Gautam,

    Thanks for your reply. I must not have clearly stated my problem. I am trying to run the flash API algorithm Flash_ToggleTest to make sure I have everything set up properly to use the flash API. I can run the example program and everything works as expected (100 usec period measured on gpio pin) on my hardware. But when I try to include the flash API in my application code to be able to re-flash in application code, I can not get the required 100 usec period on the gpio pin. The period is 25 usec and, unlike the example program, changing CPU_RATE has no influence on the period! The only way I can get the 100 usec period is to change the system clock frequency from 80 MHz to 20 MHz, which will not work in my application!

    Regards,

    Phil
  • Phil,

    Are you seeing this problem when you use on-chip flash programmer? (or) are you using software flash api library?

    Regards,
    Manoj
  • I am using the on-chip flash programmer.

    Phil
  • Philip,

    Sorry, this one missed through the cracks.

    CPU_RATE is a #define definition found in Flash2806x_API_Config.h. Unless you are using Flash API software library. Changing this doesn't impact flash toggle test frequency of on chip flash programmer.


    Regards,

    Manoj

  • Philip,

    Toggle test function is supposed to toggle GPIO pin at 10 KHz. If you get some other frequency, it indicates that your frequency configurations of flash API isn't correct.

    Regards,
    Manoj
  • Manoj,

    I am using the same definitions, libraries and variables in my application as are used in the flash example program. I am able to adjust the toggle frequency to 10kHz in the example project by changing CPU_RATE. I am not able to do this in my application project.

    How do I change the frequency configuration of the flash API in my project other than changing CPU_RATE?

    Thanks,

    Phil
  • Phil,

    Based on your messages, you are working with Flash API software library and not on-chip flash programmer.

    1) What is CPU_RATE definition?
    2) Is your SYSCLK match with the configuration found in CPU_RATE?

    Regards,
    Manoj
  • Hi Manoj,

    Here are the libraries and include files I am using in my project and in the example project: Flash2806x_API_Config.h, Flash2806x_API_Library.h, and 2806x_BootROM_API_TABLE_Symbols.lib The algorithms are stored in boot rom on the 28069.

    Our application is running at 80 Mhz, so my CPU_RATE is 12.500L. With the example program, I can use either the internal oscillator (10 MHz) or our external crystal (16 MHz) and, by adjusting the CPU_RATE, I can get the desired 10 kHz toggle frequency for both cases.

    Regards, Phil
  • Hi Manoj,

    I changed my application software to only initialize the clock and PLL (no peripherals) and was finally able to get the 10kHz signal on the gpio pin when running the Flash_ToggleTest() routine. Unfortunately the only way to get this frequency was to change the clock frequency to 90 MHz. Changing CPU_RATE still has no influence on the toggle frequency, but I set the CPU_RATE to 11.111L anyway.

    I proceeded by replacing the toggle test with the Flash_Erase() routine, only to find that it never returns from the routine, but that the processor halts at address 0x3ff4fa. Do you have any suggestions for me?

    Thanks, Phil
  • Phil,

    Your PC might possibly be in wait boot mode which indicate that there might be source of reset. Please try loading the bootrom symbols to confirm it.

    Did you already try running the controlSuite example (<controlSUITE>\libs\utilities\flash_api\2806x\v100a)? This example does exactly that.

    Regards,
    Manoj
  • Hi Manoj,

    I can run the example program and it works just fine on my hardware. I can either use the internal 10 MHz oscillator or my external crystal. When I change the CPU_RATE in the example program, I can adjust the frequency to get the 10 kHz toggle on the gpio.

    I tried to set up my program exactly like the example program. I thought I had everything the same, but now see that the example program has a call to InitSysCtrl() that I did not include. I will add the same initialization to my program as is done in InitSysCtrl().

    Thanks, Phil
  • Hi Manoj,

    I have the bootrom symbols library included in the project. CCS does not display any source code for this "wait boot mode" but if I open a disassembly window the program has stopped at an "estop0" command.

    I want to take a step back and describe to you what I am trying to accomplish. I am using "proj_lab04" as the base project for my application. This is the motor control lab using torque commands to run the motor. I have added other functionality, including a CAN interface. I want to be able to re-flash the application by receiving data from the CAN interface and calling the flash API to erase and program. To do this, I have added the flash libraries, initialization, and commands to the project. But this is where I have problems: the flash algorithms do not work properly.

    Is it possible to add the flash algorithms to the motor control project and successfully re-flash the processor?

    Thanks, Phil

  • Phil,

    Yes, you can include flash api algorithm into any application code.

    Are you making sure you are calling all flash api functions from RAM and not flash? Please pay close attention to functions assigned to code section ramfuncs in example code and make sure you are following the same in your application code.

    Regards,
    Manoj
  • Hi Manoj,

    Yes, I am putting the routine that calls the flash api functions in ramfuncs. I originally had a null pointer assigned to the callback function, but also have tried the callback function (located in RAM) just like the example program. By the way, the example program I use is from device_support/F2806x/flash_programming.

    Is it necessary to include the following:

    #pragma DATA_SECTION(Flash_CPUScaleFactor, "FlashScalingVar");
    Uint32 Flash_CPUScaleFactor;
    #pragma DATA_SECTION(Flash_CallbackPtr, "FlashCallbackVar");
    void (*Flash_CallbackPtr) (void);

    I have seen this is some examples, but not all of them.

    Thanks, Phil

  • Phil,

    You don't need them for this device.

    Reason:- In this device, BOOTROM includes Flash API. Both these variables are defined in BOOT ROM.

    Regards,
    Manoj