About SPI for LPC552x

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

About SPI for LPC552x

ソリューションへジャンプ
700件の閲覧回数
yuto
Contributor I

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?

0 件の賞賛
返信
1 解決策
670件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @yuto 

I think you can refer to the lpc55s28 gpio_led_output demo.

Harry_Zhang_0-1745480331037.png

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

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
684件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

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

0 件の賞賛
返信
678件の閲覧回数
yuto
Contributor I
Hi, Harry

Thank you for your response.
Glad to hear that it can be GPIO when SPI is not active.
Can you give me a specific example (program code) to dynamically change the SPI and GPIO settings in a program?
0 件の賞賛
返信
671件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @yuto 

I think you can refer to the lpc55s28 gpio_led_output demo.

Harry_Zhang_0-1745480331037.png

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

0 件の賞賛
返信
653件の閲覧回数
yuto
Contributor I
Hi, Harry

Thank you for your response.
I will check the sample as well.
0 件の賞賛
返信