I am using LPC552x series.
I am planning to use GPIO as SPI and connect to Flash ROM.
I want to connect two devices to the Flash ROM. Therefore, I want to make the SPI of the LPC552x as high impedance when it is not communicating so that the IO signals do not collide on the board.
Is it possible to set the output signal IO to high impedance when SPI communication is not used?
已解决! 转到解答。
Hi @yuto
I think you can refer to the lpc55s28 gpio_led_output demo.
When you want to disable SPI temporarily.
Reconfigure SPI pins.
gpio_pin_config_t spi_config = {
kGPIO_DigitalInput,
0,
};
GPIO_PinInit(GPIO, APP_BOARD_TEST_LED_PORT, APP_BOARD_TEST_LED_PIN, &spi_config);
BR
Harry
Hi @yuto
Yes, it is possible to configure the LPC552x GPIO pins (used for SPI) as high impedance (Hi-Z) when not actively communicating.
When SPI communication is not active, reconfigure the SPI pins as GPIO inputs. GPIO inputs are naturally high impedance.
BR
Harry
Hi @yuto
I think you can refer to the lpc55s28 gpio_led_output demo.
When you want to disable SPI temporarily.
Reconfigure SPI pins.
gpio_pin_config_t spi_config = {
kGPIO_DigitalInput,
0,
};
GPIO_PinInit(GPIO, APP_BOARD_TEST_LED_PORT, APP_BOARD_TEST_LED_PIN, &spi_config);
BR
Harry