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.

MSPM0 - Can not configure any timer register (ex. TIMG0)

Part Number: MSPM0

Hello,

I've a problem regarding setting TIMG0 registers in MSPM0 controller.

If I try to set any register to any value, nothing works. Is the TIMG0 register protected or something like that?

I figured out, that also other timer register such as TIMA0 or any other register with Peripheralregion can't be written to some value.
Only the SYSCTL, FLASHCTL, SysTick registers can be set to any value, which are not part of the Peripheralregion.

So I think the problem has to be with the Peripheralregion.

Can you help me to write to registers which are part of Peripheralregion?

Thank you!

Best regards

Felix

  • Hi Felix,

    Welcome to the E2E forums.

    Some peripheral registers on the MSPM0 such as the TIMG PWREN do require a key to allow write access, these are given in the Technical reference manual, many of the configuration registers do not though. 

    Can you give an example of one of the register writes you are trying that is failing? Are you using DriverLib, your own drivers, or coding at register level? 

    If you load one of the examples included in the SDK, are you seeing the registers update properly? 

    Best Regards,
    Brandon Fisher

  • Hi Brandon,

    thank you very much for your help!

    Oh okay. I didn't recognize, that a key is required.

    I want to enable the TimerG0 with writing 1 to TIMG0.CCLKCTL_CLKEN (Adress: 0x40085108) with the debugger directly. So I don't use any driver.

    I've found out, that I have to enable some clocks to make the peripheral registers working. All registers, which are not mapped to peripheral are working.

    Thank you.

    Best Regards

    Felix

  • Hi Felix,

    I would expect that write to be ignored if the PWREN bit was not already set, regardless of the clock settings. If you try to enable the PWREN first, and then write to CCLKCTL_CLKEN it should work. 

    You will have to write to the whole PWREN register to include the key, rather than just the enable field though. See the image below (Key | PWREN):

    Best Regards,
    Brandon Fisher

  • Hi Brandon,

    that was the solution!

    I've inserted the key into the register, and then I set the enable bit, nothing happened. But I have to do it simultaneously, that was the trick!

    Thank you!

    Best Regards,

    Felix

  • Hi Felix,

    Glad to hear that it's working as we expect now.

    Ill mark this thread as closed for now. Feel free to create another post if you encounter any other issues during development. 

    Best Regards,
    Brandon

**Attention** This is a public forum