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.

MSPM0G3507: peripheral start-up time

Part Number: MSPM0G3507

Hello all,

in the sample code provided by TI I noticed a waiting time after the peripheral is reset and power was enabled:

Fullscreen
1
2
3
4
5
#define POWER_STARTUP_DELAY (16)
DL_TimerA_reset(TIMER_0_INST);
DL_TimerA_enablePower(TIMER_0_INST);
delay_cycles(POWER_STARTUP_DELAY);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If I do not include this waiting time in my code I observed that the initialization afterwards is sometimes not done correctly (in this case a timer peripheral), depending on the optimization level of the compiler.

So it seems the waiting time is crucial here. However neither did I see it in the suggestion for the initialization sequence in the reference manual (e.g. for UART), nor did I find a waiting time specified in the data sheet.

Could someone please point out where I can find what waiting time is required for which peripheral?

Thank you in advance!

Regards,

Holger

  • Hi Holger,

    This power start up delay is not set for a specific peripheral. It always called at the end of SYSCFG_DL_initPower. No matter what peripherals is enable power in that function. And the delay cycle is always the same which is 16 cycles. 

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    thank you for your response.

    but what is the reason for this 16 delay cycles?

    In my code each peripheral is initialized in a separate module which looks like this for example:

     

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    DL_Timer_reset(timer);
    DL_Timer_enablePower(timer);
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    __NOP();
    DL_Timer_ClockConfig gTIMER_0Clockconfig;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Now my problem is that without the NOPs the clock config of the timer module (in DL_Timer_setClockConfig) which is executed after reset and enablePower of the peripheral, is not done as desired. With the NOPs everthing works fine. So it seems to me that there is a start-up time of the peripheral which I need to wait first.

    Where is this start-up time specified?

    Is it depending on the cpu frequency used?

  • Hi,

    I do not know the backgrounds about why it is set to 16 delay cycles. I can check on it but no promises. 

    I am sure that it is not depending on the CPU frequency, with the MCLK set to 80MHz, the wait cycle is still 16. 

    Best regards,

    Cash Hao

  • Hello Cash Hao,

    any news on this? I would be interested about the background of this too?
    Is this necessary for all peripherals or only for some? Why 16 Cycles?

    Regards Marco

  • Hi,

    This delay cycle is required after enable power of any peripherals and before configuring peripheral registers. 

    All peripherals need this delay cycle. 16 cycle is a safety number for all the peripherals. 

    Best regards,

    Cash Hao

  • Hello Cash Hao,

    thx for this information. Can you say some details about why exactly this is required.

    I didn't find it in datasheet or reference manual .. is there documentation about this?

    Marco

  • Hi Marco,

    There is no document talks about this. And those information is all I known about this delay setting. I do not have more information to provide. Thanks for understanding. 

    Best regards,

    Cash Hao

  • Hello Cash Hao11,


    we got the needed information from direct contact to TI FAE.
    Actually the information can be found in the TRM section 2.2.7 Peripheral Power Enable Control.

    Best Regards

    Marco

  • Hi Marco,

    Great. I missed this part somehow. I am going to close this thread then. 

    Best regards,

    Cash Hao