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: Peripheral Initialization Dependencies

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi,

I cannot find any information from the reference manual regarding the peripheral initialization dependencies for F2837xD.

For example. Can I initialize ePWM module before system clock initialization?  

Is there any place where I can find the information?

Thanks!

  • Hi Kaiyu,

    The expert is currently out of office but will get back to you as soon as she can after her return.

    Best Regards,

    Aishwarya

  • Hello Aishwarya,

    Thank you! Is your expert back to the office?

  • Hi Kaiyu,

    I apologize for the delay. I believe you are correct; it doesn't look like we have this explicitly documented in the TRM. However, you generally want to follow the initialization order used in the examples in the C2000ware SDK. I would suggest taking a look at one of the ePWM examples and following the order in the main code there. These examples are located in the path [C2000ware install]/driverlib/f2837xd/examples/cpu1/epwm/.

    Let me know if this answers your question. If there are any specific sequences you are unsure of, I can also take a look and let you know if I see any issues with the order.

    Best Regards,

    Delaney

  • Thank you, Delaney! Following is our high level initialization order for 28379D core 1. Did you see any issue? 

  • Hi Kaiyu,

    One thing to make sure of is that interrupts are only enabled globally (the EINT; line of code) after all initializations are done (make sure this is not being done in the interrupt initialization step). If you are using the C2000ware driverlib functions, for example Interrupt_initModule() and Interrupt_initVectorTable(), you don't have to worry about this because they do not enable interrupt globally. 

    Also, are you using interrupts for the ADC or CPU timer modules? Because if you configure interrupts for these before the interrupt initialization functions are called, they will be overwritten by those functions. So, I would recommend moving the interrupt initializations above any peripheral initializations to avoid this issue (move up to the 5th step between GPIO configurations and CPU timer init).

    Otherwise, this order looks good.

    Best Regards,

    Delaney

  • Thank you, Delaney!