AnsweredAssumed Answered

fsl_gpio_driver incorrectly outputs to GPIO pin prior to setting the default output logic.

Question asked by Luciano Moretti on Dec 10, 2015
Latest reply on Dec 13, 2015 by Alice_Yang

In the GPIO_DRV_OutputPinInit() function located in fsl_gpio_driver.c, the function calls the GPIO_HAL_SetPinDir() function that enables the pin prior to setting up the GPIO output features.

 

If an output is set to active low, it will be active as soon as the GPIO_HAL_SetPinDir() function is called, prior to the GPIO_HAL_WritePinOutput() call with the outputPin->config.outputLogic of 1.

 

Calling GPIO_HAL_WritePinOutput() prior to GPIO_HAL_SetPinDir() appears to correct the issue.

Outcomes