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.

TMS320F28379D: Missing function definitions from SysCtl Driverlib stopping code execution.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

// Define to pass to SysCtl_setClock(). Will configure the clock as follows:
// PLLSYSCLK = 10MHz (INT_OSC1) * 80 (IMULT) / (2 (REFDIV) * 2 (ODIV) * 1(SYSDIV))
#define DEVICE_SETCLOCK_INTOSC        (SYSCTL_OSCSRC_OSC1 | SYSCTL_IMULT(80) | \
                                       SYSCTL_REFDIV(2) | SYSCTL_ODIV(2) | \
                                       SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE)

Above is a code used within a SysCtl example for the F2838x device by TI. 
We are using the F2837xD series, but there does not seem to be an example for the SysCtl functions in this DSP. So I have attempted to use the above in my processor. 

Unfortunately, I get the following error: 

Description	Resource	Path	Location	Type
unresolved symbol SYSCTL_REFDIV, first referenced in ./main.obj	JMHolland_PTM6693		 	C/C++ Problem

Description	Resource	Path	Location	Type
unresolved symbol SYSCTL_ODIV, first referenced in ./main.obj	JMHolland_PTM6693		 	C/C++ Problem

Which stops me from executing the code. I have looked in my driverlib .h file in my directory, and as expected, these functions are not there. 

Can someone help with an explanation for why these functions aren't included in my driverlib folder, and possibly suggest an alternative way to implement on the F2837xD if possible. The example I am trying to port over to my device is the sysctl_ex1_missing_clock_detection example.

Best regards,

JMH

  • Hi,

    These definitions are present in the device.h file in the locaiton  - C2000Ware\device_support\f2837xd\common\include\device.h

    There is no REFDIV and ODIV in this device.

    Please have a look at the configuration in device.h to implement the example.

    Thanks

    Aswin

  • Hi, this has mostly solved my issue. 

    I am attempting to set the clock frequency to 200MHz but by switching to the internal oscillator. My code is here: 

    #define DEVICE_SETCLOCK_INTOSC        (SYSCTL_OSCSRC_OSC1 | SYSCTL_IMULT(40) | \
                                           SYSCTL_SYSDIV(2) | SYSCTL_PLL_ENABLE)

    This seems to work, but it switches over immediately. I am short circuiting the external crystal oscillator on the Launchpad, and PWM is still being output - so I assume it is working as intended. 

    I want to trip the PWM for X amount of time before switching to the internal oscillator and configuring it.

    As I understand it, in the example code, the clock source is changed to 10MHz, before it is multiplied upwards to 200MHz. 

    This might cause my PWM to (very) momentarily switch at a lower frequency - is this true? Is there a way to avoid this and to only allow the PWM to begin switching again once the clock has been configured to be 200MHz? 

    Is there a way to reset the PWM trip caused by the missing clock from a GPIO or some other external signal, or is this an automatic process?

    Best regards,

    JMH

  • Hi,

    Can you please close this thread and open a new one regarding the PWM one.

    Thanks

    Aswin