Hi,
I use Pin Configurator tool in my project with MCUXpresso v11.2.0_4120 IDE.
All was correct until I wanted to use a not using pin as output TEST port. So I configure that port (PIO0_16) as output and Logical 0 and generate code.
When I run code on my custom board, I can see that PIO0_16 port is input direction and not output as expected.
If I open the file generated by the tool pin_mux.c, we have next:
........
gpio_pin_config_t DISP_config = {
.pinDirection = kGPIO_DigitalOutput,
.outputLogic = 0U,
};
/* Initialize GPIO functionality on pin PIO0_11 (pin 9) */
GPIO_PinInit(BOARD_INITPINS_DISP_GPIO, BOARD_INITPINS_DISP_PORT, BOARD_INITPINS_DISP_PIN, &DISP_config);
gpio_pin_config_t X0_config = {
.pinDirection = kGPIO_DigitalInput,
.outputLogic = 0U,
};
/* Initialize GPIO functionality on pin PIO0_15 (pin 11) */
GPIO_PinInit(BOARD_INITPINS_X0_GPIO, BOARD_INITPINS_X0_PORT, BOARD_INITPINS_X0_PIN, &X0_config);
gpio_pin_config_t gpio0_pin0_16 = {
.pinDirection = kGPIO_DigitalOutput,
.outputLogic = 0U,
};
/* Initialize GPIO functionality on pin PIO0_16 (pin ) */
GPIO_PinInit(GPIO, 0U, 16U, &gpio0_pin0_16);
......
It seems ok but using of "0U" and "16U" numbers catches my attention. In other pin configuration code tags are using instead port pin direct numbers. So I was expecting next code:
gpio_pin_config_TEST_config = {
.pinDirection = kGPIO_DigitalOutput,
.outputLogic = 0U,
};
/* Initialize GPIO functionality on pin PIO0_16 (pin ) */
GPIO_PinInit(GPIO, BOARD_INITPINS_TEST_PORT, BOARD_INITPINS_TEST_PIN, &TEST_config);
I dont know if that bears relation with the trouble.
Any helping with that rare problem ?
thanks in advance,
Asier.