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: GPIO Operations on TI-MSPM0G3507: Need for Disabling Interrupts

Part Number: MSPM0G3507

Tool/software:

Hello everyone,

I am working on the TI-MSPM0G3507 and would like to perform GPIO SET, CLEAR, and TOGGLE operations on port pins using the DOUT31_0, DOUTSET31_0, DOUTCLR31_0, and DOUTTGL31_0 registers.

I have a couple of questions:

  1. Does TI support atomic operations for these GPIO registers?
  2. Do we need to disable interrupts when writing to these registers?

The datasheet mentions the following:

Any guidance on this would be greatly appreciated. Thank you!

  • Hi, Bhaskar

    Does TI support atomic operations for these GPIO registers?

    For DOUTSET31_0, DOUTCLR31_0 and DOUTTGL31_0, they are control and write only registers, only write 1 has effects.

    Do we need to disable interrupts when writing to these registers?

    Interrupt is a input GPIO and there registers are used to control the output, why do you want to disable it? any worry?

    Regards,

    Helic

  • SET/CLR registers provide the atomic operations on the DOUT register. As Helic described, write '1' to the bits you want to set/clr. avoid direct write to DOUT which require disable interrupts when you do read modify writes.