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.

TMS320F280025C: Sysconfig peripheral init function overrides

Part Number: TMS320F280025C
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I'm trying to use sysconfig to set up some EPWM and ADC channels, and in the generated board.c, Sysconfig generates some function stubs which would allow you to incorporate your initialization as part of the board_init() function. But these functions can't be modified since on build they get re-generated.

For example EPWM_init(). It looks like you should be able to put your PWM setup here, but if you make any changes they get overriden on the next build.

void EPWM_init(){
	//MOT_PWM_A initialization
	    
	//MOT_PWM_B initialization
	    
	//MOT_PWM_C initialization
	    
}

Sysconfig either needs to add the capability to generate this initialization code, or insert a user defined init function which lives outside of the generated code, or make the EPWM_init() function a virtual function or otherwise able to be overridden so that it can be defined elsewhere.

I noticed this was the case for AIO_init() as well.

Are there any recommendations for now beyond doing the pwm initialization elsewhere?

Munan

  • Munan,

    We are currently developing the SysConfig support for EPWM and ADC.

    What you see there is empty in this last release because the support was not ready yet. 

    For ADC and EPWM you have to write them yourself for now. 

    The only recommendation is to use the #define rename in the board.h file as the base address to your EPWM driverlib function calls as you develop your code.

    IF you are interested, we can send you the internal BETA version of the EPWM sysconfig support we have put together.

    It is an HUGE peripheral due to its incredible customization capabilities.

    Please shoot me an email if you would like to test and use the BETA tool.

    Nima