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: Question regarding GPIO_write ()

Part Number: MSPM0G3507


When using GPIO_Write with index based parameters, it leads to a not wished behaviour. 

It calls at the end DL_GPIO_setPins which sets the complete 32 bit register with one wished bit, therefore 31 bits are lost.

From my viewpoint GPIO_write should call DL_GPIO_writePinsVal (x,y,z).

Working with mspm0_sdk_2_00_00_03. 

Am I wrong or how does TI think about this behaviour?

When working with MSPM0G3507 and writing a one to cs of SPI manually it leads to a breakdown of 3.3V power supply. 

By clearing all the other bits in corresponding register.

  • Similar effects are existing by calling 

    GPIO_setConfig 
  • Hi, 

    This shouldn't cause influence all 32bit.

    Do you test this on your own board? I recommend you try the GPIO control on LaunchPad.

    Maybe there are other 3.3V device cause this issue by set CS Pin to active.

    Also, for low level driver, DL, DL_GPIO_setPins works fine just write single bit of 32Bit register.

    /**
     *  @brief      Set a group of GPIO pins
     *
     *  @param[in]  gpio  Pointer to the register overlay for the peripheral
     *  @param[in]  pins  Pins to set high. Bitwise OR of @ref DL_GPIO_PIN.
     */
    __STATIC_INLINE void DL_GPIO_setPins(GPIO_Regs* gpio, uint32_t pins)
    {
        gpio->DOUTSET31_0 = pins;
    }

    This register's description is:

    9.3.39 DOUTSET31_0 (Offset = 1290h) [Reset = 00000000h]
    DOUTSET31_0 is shown in Figure 9-42 and described in Table 9-42.
    Return to the Summary Table.
    Writing 1 to a bit position in this register sets the corresponding bit in the DOUT31_0 register.

    For the detailed description, you can refer to TRM 9.2.2

    https://www.ti.com/lit/pdf/SLAU846

    Write 0 to this register makes no action.

    Can you show me the code that you set CS will cause other DOUTSET31_0 bit to set?

    Regards,

    Helic

  • Dear Helic,

    obviously my fault. It seems to be a side effect caused by a stack corruption.

    Problem is no more existing, perhaps wrong combination of ti_drivers_config and ti_msp_dl_config.

    Best regards 

    Siegfried