Generated LPC812 code doesn't enable IOCON clock

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generated LPC812 code doesn't enable IOCON clock

855 Views
emilj
Contributor II

Hi,

We're using a LPC812M101JTB16 on a custom board, and generate the initialization code using MCUXpresso Config Tools version 11.0 (on Linux).

However, the generaded file pin_mux.c doesn't seem to enable the IOCON clock before it's trying to read/write from the IOCON block. This leads to the settings regarding the pull-up/pull-down resistors not being applied. If I manually enable the IOCON clock in the beginning of BOARD_InitPins() it works as expected.

We have another board, with an LPC824, where the generated pin_mux.c actually enables the IOCON clock. Am I missing something in the LPC812 configuration or is this a bug? I tried to attach the MCUXpresso Config Tools project file, but it got rejected.

The attachment's lpc812_test.mex content type (application/octet-stream) does not match its file extension and has been removed.

 

void BOARD_InitPins(void)
{
    /* Enables the clock for the GPIO0 module */
    CLOCK_EnableClock(kCLOCK_Gpio0);

    gpio_pin_config_t TEST_config = {
        .pinDirection = kGPIO_DigitalInput,
        .outputLogic = 0U,
    };
    /* Initialize GPIO functionality on pin PIO0_8 (pin 11)  */
    GPIO_PinInit(BOARD_INITPINS_TEST_GPIO, BOARD_INITPINS_TEST_PORT, BOARD_INITPINS_TEST_PIN, &TEST_config);

    IOCON->PIO[14] = ((IOCON->PIO[14] &
                       /* Mask bits to zero which are setting */
                       (~(IOCON_PIO_MODE_MASK)))

                      /* Selects function mode (on-chip pull-up/pull-down resistor control).: Pull-down. Pull-down
                       * resistor enabled. */
                      | IOCON_PIO_MODE(PIO0_8_MODE_PULL_DOWN));
}

 

 

Tags (2)
1 Reply

844 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

This is a bug.