SDI on LPSPI6 always pulled HIGH

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDI on LPSPI6 always pulled HIGH

366 Views
Waleed
NXP Employee
NXP Employee

Hello,

I want to use the LPSPI6 peripheral of the i.MX RT1170 EVK to read out an SPI sensor. The program has been written and tested on LPSPI1 and is working. After switching to LPSPI6, the same code stopped working. The Pins have been configured using the MCUXpresso ConfigTools for Pins and Clocks, copying the configuration from LPSPI1 example and Jumpers J63,J64,J65,J66 have been closed. The SPI communication is working, except the MISO/SDI Pin on the MCU side, LPSPI6 (GPIO_LPSR_12) always has a HIGH signal, therefore is not receiving the response. I tested the program on an i.MXRT 1160 EVK too, and the problem persists. But for LPSPI1 it works.

In conclusion: SDO, SCK and PCS0 work properly but SDI is always pulled High on the Master side. Am I missing something (ex. step in the Initialization) ?

IOMUXC_SetPinMux(
IOMUXC_GPIO_LPSR_12_LPSPI6_SIN, /* GPIO_LPSR_12 is configured as LPSPI6_SIN */
0U);

IOMUXC_SetPinConfig(
IOMUXC_GPIO_LPSR_12_LPSPI6_SIN, /* GPIO_LPSR_12 PAD functional properties : */
0x06U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: high driver
Pull / Keep Select Field: Pull Enable
Pull Up / Down Config. Field: Weak pull down
Open Drain LPSR Field: Disabled
Domain write protection: Both cores are allowed
Domain write protection lock: Neither of DWP bits is locked */
}

 

Attached: 

D0: PCS0

D1: SDI

D2: SCK

D3: SDO

C1: SDI, normal probe

 

 

0 Kudos
4 Replies

354 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi, @Waleed ,

Since RT1170 is master and this is MISO pin, are you sure the sensor is really send out data? If the sensor really send the data, that means the pin is strongly pulled high. Please check if it is hold by other signal source because this pin is shared by many functions.

 

Regards,

Jing

0 Kudos

329 Views
Waleed
NXP Employee
NXP Employee

Hi, 

As I first read the output pin of the sensor and the input pin of MCU separately into the oscilloscope and it was returning the desired value, I am sure that the sensor was working.

I now tried to use the same pin as GPIO12. For that I overwrote the pinmux.c file in the end with 

IOMUXC_SetPinMux(IOMUXC_GPIO_LPSR_12_GPIO12_IO12,0U);

and initialized it as usual. For GPIO12 set as an input, it had a voltage of 3.3V on it. As an output, with level HIGH it has 3.28V and with LOW it has 0.74V on the pin.

Then I tested the same for GPIO12 on pin IOMUXC_GPIO_LPSR_05_GPIO12_IO05 and as an output it had 2.8V (HIGH) and (0.16V) LOW. As an input, the voltage on the pin was 2.84V again.

This behavior is new for me. Do I have to set the pin LOW explicitly in some way before using it? 

0 Kudos

307 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Waleed ,

I tested on my EVKB. It works fine. I didn't see any problem when I use logic analyzer.

jingpan_0-1700206995534.png

Do you mean you want to use this pin both on LPSPI and ENET_RST? I think you can use other gpio pin to replace GPIO_LPSR_12. In fact our demo doesn't use this pin to reset phy. But if you disconnect pullup resistor, the phy may instable.

 

regards,

Jing

 

 

 

 

Regards,

Jing

312 Views
Waleed
NXP Employee
NXP Employee

@EdwinHz 

Thank you for your guidance on the Pin assignment issue. It looks like I was using the schematics for the EVKB instead of the EVK and didn't see the the connection between ENET_RST and GPIO_LPSR_12. Even after disconnecting J8 to remove JST_TDI from the node the Pin is at a higher voltage, which is probably because of the PULLUP of ENET_RST. Now I wanted to know, will I be able to use the Ethernet port for communication, even after I disconnect the ENET_RST pullup from through R78? If yes, is there another possibility to have two SPI peripherals with header pin access and the Ethernet running at the same time?

Thanks!

0 Kudos