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.

MSP430FR6989: MSP430FR6989

Part Number: MSP430FR6989

I have one more fundamental question. As I said earlier I am new to the MSP430 world. I am presently using the MSP430 Workbook and all is going very well. I was able to define all three of the internal clocks, MCLK, SMCLK and ACLK through "myClocks.c" file.

So I go back to my main.c, I do

#define one_second 1000000

Next I then setup my GPIOs, then

_delay_cycles (one_second);

Question, how did the compiler know which clock to use for the "_delay_cycles (one_second)" Does it, or did it default to the ACLK?

I never told the code which clock to use????

Thanks for the help.

  • The "cycles" refers to CPU cycles, so it (implicitly) uses MCLK.

  • Thanks for feedback, can I assume that there are additional default naming nomenclature for the other clocks. Say I wish to use the SMCLK or ACLK for the delay, can you point me to the literature or a quick answer on using other clocks for a delay.

    Thanks in Advance.

  • You can run a timer using SMCLK or ACLK and use the timer for a delay. That's not a one-line thing, though.

  • Thanks for this feedback. Yes, I was able to locate this "Intrinsic Compiler Function" in the MSP Design Workshop PDF on page 2-26 if anyone is interested in seeing the many other INTRINSIC functions.

    One question I still have in TIMING is the Watchdog Timer. There is no definition of the size of this timer. I looked in the MSP430FR6989 Datasheet and there is no mention of the size. I would think it is a 16 bit timer. Not sure if I can make it bigger like 32 bits. I would assume there wouldn't be much value with a larger timer register as the "ClockDivider" for this timer can be very large and a larger register would not have any value.

    Anyway I would still expect to see it's definition in the data sheet.

    Thx

  • Thomas Flack said:
    There is no definition of the size of this timer.

    Does the Watchdog Timer (WDT_A) chapter of the MSP430FR58xx, MSP430FR59xx, and MSP430FR6xx Family User's Guide answer your question?

    Details of the MSP430 peripherals are defined in the corresponding Family User's Guide rather than the device datasheet.

  • [Ref MSP430 CC User Guide (SLAU132S) Table 6-5]

    [Ref FR6 User Guide (SLAU367O) Sec 24.2.1]

**Attention** This is a public forum