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.

LAUNCHXL-F28379D: F28379D

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hi team,

Can you help me to find the problem with the following example?:

It compiles without problem, when debugging turning LEDs on and off, changing the delay time and still cannot make it works.

Thank you!

  • Hi,

    Dimitar Demirev said:
    It compiles without problem, when debugging turning LEDs on and off, changing the delay time and still cannot make it works.

    You mean the delay does not work?

    Regards,

    Gautam

  • Hi Guatam,

    When debugging I can see that the delay function counting up. I can see when the delay function reaches its limit it's toggling the LEDs but in debugging mode only. If I run the program at full speed as it is designed there is no visible blinking of the LEDs. I changed the delay time and there is no visible blinking of the LEDs. This is only with this particular example code.

    I will highly appreciate any advice that will give me chance to go ahead.

    Dimitar

  • Hi Dimitar

    The example that you are running is made for F2837xD control card. I would fir like to make sure that you have properly configured your pins since you are using a launchpad. There is a subtle difference in the configuration that you need to take care of. 

    Please check the following thread and look for my answer on how to configure the Launchpad. e2e.ti.com/.../693580

    -Ritvik

  • Hi Ritvik,

    Thank you for your reply.

    I've enabled the Predefined Symbol _LAUNCHXL_F28379D and I saw how the highlighted part of the code in device.h for this symbol disappeared. I compiled the code and run it. The problem still persist.
    Without changing the code the frequency of blinking is around 8.3kHz. I changed the variable short i to unsigned short i In the delay_loop() function but the lowest frequency that i can get is around 95Hz and blinking still is not visible.
    How I can define safely lower clock speed?

    Regards,

    Dimitar
  • Hi Dimitar,

    If you have added the predefined symbol for Launchpad, then it will take care of the clocks, you won't have to worry about that.
    Regarding the pins. I actually checked the schematics in <install dir>\C2000Ware_1_00_xx_00\boards\LaunchPads\LAUNCHXL_F28379D\R2.0\launchxl-f28379d_r2.0_sch.pdf
    You have to configure pins as GPIO31 and GPIO34 only as opposed to 12 and 13 in my previous answer(as it was for single core launchpad).

    Can you check and tell if your LED pins are configured as 31 and 34 only?
    -Ritvik
  • Hi Ritvik,

    The pins are configured as GPIO31 and GPIO34.
    The gpio_toggle_cpu01 example code toggles all the GPIO pins of LAUNCHXL-F28379D.
    This is visible with oscilloscope. I can see the rectangular pulses on GPIO31 and GPIO34 and other GPIO pins. The measured frequency (~8kHz) is too high to be able to see blinking.

    Regards,

    Dimitar
  • Hi Dimitar,
    Just to ensure that the device is functioning properly, can you try running a different example for me?
    \C2000Ware_1_00_04_00\driverlib\f2837xd\examples\cpu1\led
    It's basically the same example but using driverlib. I would need to investigate bit-field example that you are running to see if it has any issues. I will give you an update later on it.
    Meanwhile you can try above. Make sure you add the launchpad to the predefined symbols, like you did before.

    -Ritvik
  • Hi Ritvik,

    The led (driverlib) example works fine.

    I found the problem with gpio_toggle (bit-field).

    I changed 

    void delay_loop()
    {
    short i;
    for (i = 0; i < 1000; i++) {}
    }

    to

    void delay_loop()
    {
    unsigned long i;
    for (i = 0; i < 10000000; i++) {}
    }

    and gpio_toggle works fine now as well.

    How can I change the cpu01 clock frequency?

    I tried to change it in device.h

    from

    #define DEVICE_SYSCLK_FREQ          ((DEVICE_OSCSRC_FREQ * 40 * 1) / 2)

    to

    #define DEVICE_SYSCLK_FREQ          ((DEVICE_OSCSRC_FREQ * 2 * 1) / 2)

    but could not see any difference.

    This change has to be from 200MHz to 10MHz. 

    Regards,

    Dimitar

  • Hi Dimitar,
    Good to know that your example works now!!
    Regarding the clock frequecy. I would recommend raising a new E2E query so that it get's assigned to the person with more knowledge on it. I would be of less help here.
    Please mark the resolution so that I can proceed towards closing this thread.

    Best Regards,
    Ritvik
  • Hi,

    Instead of using for loop (or while loops)  for the delay use DELAY_US()  function provided in C2000Ware (F2837xD_usDelay.asm file). For loops may compile differently with different compiler switch.

    Regards,

    Vivek Singh

  • Hi Vivek,

    Good idea.

    Thank you very much!