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.

MSPM0L1306: 如何保持GPIO口输出高电平,从app跳转到bootloader,直到bootloader中的初始化完成

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

Hi sir,

    我自己新建了两个项目,一个作为bootloader一个作为app,其他外设给mcu升级时,需要MSPM0L1306从app跳转到bootloader,同时要保持外设的使能gpio口从app跳转到bootloader的初始化完成一直保持高电平,目前我测试到的都会产生一个大约500微秒的低电平,无法达到要求,

请问该如何配置,才能做到一直保持高电平不变

这是bootloader相关的GPIO初始化代码

SYSCONFIG_WEAK void SYSCFG_DL_init(void)
{
    SYSCFG_DL_initPower();
    SYSCFG_DL_GPIO_init();
    /* Module-Specific Initializations*/
    SYSCFG_DL_SYSCTL_init();
    SYSCFG_DL_I2C_0_init();
    SYSCFG_DL_UART_0_init();
    SYSCFG_DL_ADC12_0_init();
    SYSCFG_DL_SYSTICK_init();
}

SYSCONFIG_WEAK void SYSCFG_DL_initPower(void)
{
    DL_GPIO_reset(GPIOA);
    DL_I2C_reset(I2C_0_INST);
    DL_UART_Main_reset(UART_0_INST);
    DL_ADC12_reset(ADC12_0_INST);


    DL_GPIO_enablePower(GPIOA);
    DL_I2C_enablePower(I2C_0_INST);
    DL_UART_Main_enablePower(UART_0_INST);
    DL_ADC12_enablePower(ADC12_0_INST);

    delay_cycles(POWER_STARTUP_DELAY);
}

SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void)
{

    DL_GPIO_initPeripheralInputFunctionFeatures(GPIO_I2C_0_IOMUX_SDA,
        GPIO_I2C_0_IOMUX_SDA_FUNC, DL_GPIO_INVERSION_DISABLE,
        DL_GPIO_RESISTOR_NONE, DL_GPIO_HYSTERESIS_DISABLE,
        DL_GPIO_WAKEUP_DISABLE);
    DL_GPIO_initPeripheralInputFunctionFeatures(GPIO_I2C_0_IOMUX_SCL,
        GPIO_I2C_0_IOMUX_SCL_FUNC, DL_GPIO_INVERSION_DISABLE,
        DL_GPIO_RESISTOR_NONE, DL_GPIO_HYSTERESIS_DISABLE,
        DL_GPIO_WAKEUP_DISABLE);
    DL_GPIO_enableHiZ(GPIO_I2C_0_IOMUX_SDA);
    DL_GPIO_enableHiZ(GPIO_I2C_0_IOMUX_SCL);

    DL_GPIO_initPeripheralOutputFunction(
        GPIO_UART_0_IOMUX_TX, GPIO_UART_0_IOMUX_TX_FUNC);
    DL_GPIO_initPeripheralInputFunction(
        GPIO_UART_0_IOMUX_RX, GPIO_UART_0_IOMUX_RX_FUNC);

    DL_GPIO_initDigitalInputFeatures(GPIO_GRP_0_PIN_0_IOMUX,
         DL_GPIO_INVERSION_DISABLE, DL_GPIO_RESISTOR_NONE,
         DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);

    DL_GPIO_initDigitalOutput(GPIO_GRP_0_PIN_1_IOMUX);

    DL_GPIO_initDigitalOutput(GPIO_GRP_0_PIN_2_IOMUX);

    DL_GPIO_initDigitalInputFeatures(GPIO_GRP_0_PIN_3_IOMUX,
         DL_GPIO_INVERSION_DISABLE, DL_GPIO_RESISTOR_NONE,
         DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);

    DL_GPIO_initDigitalOutput(GPIO_GRP_0_PIN_4_IOMUX);

    DL_GPIO_clearPins(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_1_PIN |
        GPIO_GRP_0_PIN_2_PIN);
    DL_GPIO_setPins(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_4_PIN);
    DL_GPIO_enableOutput(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_1_PIN |
        GPIO_GRP_0_PIN_2_PIN |
        GPIO_GRP_0_PIN_4_PIN);
    DL_GPIO_enableFastWakePins(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_0_PIN);
    DL_GPIO_setLowerPinsPolarity(GPIO_GRP_0_PORT, DL_GPIO_PIN_2_EDGE_RISE |
        DL_GPIO_PIN_13_EDGE_RISE_FALL);
    DL_GPIO_clearInterruptStatus(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_0_PIN |
        GPIO_GRP_0_PIN_3_PIN);
    DL_GPIO_enableInterrupt(GPIO_GRP_0_PORT, GPIO_GRP_0_PIN_0_PIN |
        GPIO_GRP_0_PIN_3_PIN);