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.

MSP432P401R: What is the clock source for the DWT?

Part Number: MSP432P401R

Dear forum members,

This should be a simple question, but I have not found a diagram that answers it for me, so I'm posting to the experts!

The MSP432 contains a DWT as part of the Cortex-M4F core.  Since it is part of the ARM core itself, I believe that it will run off MCLK.  Is this correct?

I'm asking because there are other peripherals on the MSP432 that can be run from a variety of clock sources (e.g. HSMCLK, SMCLK, ACLK, BCLK...).

I'm driving the other peripherals off SMCLK, and there is a limitation that says that the SMCLK must be 1/2 of HSMCLK up to a maximum of 24 MHz.  Therefore, my SMCLK is being derived from DCO_CLK of 48 MHz, and divided by 2 to give me an SMCLK of 24 MHz.

I'm trying to determine what other peripheral configurations this might impact.  I do not believe the DWT is affected by this change, but that assumes that everything in the Cortex-M core runs off MCLK.  There are times when I use the cycle counter in the DWT for measuring some low-level elapsed time or creating a short delay.

Is this correct that the DWT always uses MCLK as its source, or am I missing something?  If you can point me to some documentation that shows the clock configuration for the Cortex-M itself, that would be extremely helpful.

Many thanks for your time and assistance!

Scott

  • Scott,
    The DWT is part of the debug subsystem. That portion of the Technical Reference Manual is taken from ARM, so the naming is a little different. The clock cycles (CYCCNT) are core clock cycles which is referring to MCLK. In the TRM description of the CYCCNT register you see an example of 50Mhz - the MSP432P401R would be 48Mhz maximum.

    Also if you look in section 6.1 (Clocks, SLAU356), the MCLK is the only one used by the CPU.

    Regards,
    Chris
  • Perfect, Chris,

    Thanks for the confirmation. There's SO much information around all the pins and registers on this amazing little part. Sometimes it's tough to find the one little tidbit you need.

    Best regards,

    Scott

**Attention** This is a public forum