imx rt1064 pull down input on GPIO_SD_B0_00

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

imx rt1064 pull down input on GPIO_SD_B0_00

ソリューションへジャンプ
1,285件の閲覧回数
superspud9
Contributor II

Hi,

I have an unconnected pin, GPIO_SD_B0_00.  I am setting it up as an input with a 100k pull down, but when I read this pin (using GPIO_PinRead() or reading GPIO3->DR), the value is always high.  In this case, since a pulldown is applied, I would expect the pin to read low.

When configuring a pull up, it reads high.

I did the same test on another unconnected pin, GPIO_B0_00, and this pin worked as expected (ie. when using a pull down, the pin read low, and when using a pull up, the pin read high).

As far as I know, the only difference between these pins is that GPIO_SD_B0_00 runs at 1.8V, whereas the other runs at 3.3V.

In the code below, I am changing the pullup/pulldown.  I have also tried setting a pulldown in the initial config, but that did not work either on the GPIO_SD_B0_00 pin.  The sample code works as expected when using pin GPIO_B0_00.

Sample code:

 

uint8_t readVal = 0U;
	// enable 100k pullup on pin
	IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B0_00_GPIO3_IO12, 0xB0B0U);
	// wait for change to complete by checking the register written to by previous line
	while(*((volatile uint32_t *)0x401F83ACU) != 0xB0B0)
	{

	}
	if(GPIO_PinRead(GPIO3, 12))
	{
		readVal |= 1;
	}

	// enable 100k pulldown on pin
	IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B0_00_GPIO3_IO12, 0x30B0U);
	// wait for change to complete by checking the register written to by previous line
	while(*((volatile uint32_t *)0x401F83ACU) != 0x30B0U)
	{

	}
	if(GPIO_PinRead(GPIO3, 12))
	{
		readVal |= (1 << 1);
	}

 

 

ラベル(1)
0 件の賞賛
返信
1 解決策
1,280件の閲覧回数
superspud9
Contributor II

This is a non-issue.  Our 1.8v supply was not turned on when I was trying to make use of these pins, turning on the supply now lets the 1.8v pin behave as expected

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,281件の閲覧回数
superspud9
Contributor II

This is a non-issue.  Our 1.8v supply was not turned on when I was trying to make use of these pins, turning on the supply now lets the 1.8v pin behave as expected

0 件の賞賛
返信