SPI Not Working

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,252件の閲覧回数
dennis_jelcic
Contributor I

Hello,

We have designed a modified version of the i.MX6G2 processor board.  We are using the SPI interface to communicate with an MRAM chip (Everspin MR25H40VDF(R)).  We have successfully communicated with this MRAM chip in the past using a TI MSP430, so we know our interface code works.

We are trying to use the SPI Polling example code in the SDK to talk to the MRAM, but we are not having success.  We are pointing to the proper instance of SPI (ECSPI2).  The IOMUX settings appear to be correct for ECSPI2 for the five signals (SCLK, MOSI, MISO, CS1, and CS2).  We have probed the various SPI signals.  CS# gets pulled low properly.  Data gets sent-out MOSI.

However, there is no clock signal sent out of the MCU.  We have checked our schematic, and the clock appears to be connected properly.  We are using the original version of the BOARD_BootClockRUN() function from the SPI Polling example.

Is there something about the stock code for the SPI Polling example in the SDK that needs to be modified?

Here are the versions of the hardware and software that we are using:

Hardware
    Processor Kit:   MCIMX6UL-EVKB
    Base Board:      MCIMX6UL-BB
    Processor Board: MCIMX6UL-CM
    Processor:       MCIMX6G2CVM05AA

Software
    IDE: IAR Embedded Workbench Arm 8.32.4
    Debug Probe: IAR I-jet
    MCUXpresso Software Development Kit (SDK) Release Version: 2.2.0

Thank you for any help you can provide.

Dennis Jelcic

ラベル(1)
0 件の賞賛
返信
1 解決策
2,154件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Dennis

one can check if ecspi2 clocks are enabled in CCM_CCGR1 register.

Also recheck pin muxing for pads CSI_DATA00, UART4_TX_DATA, which

could provide ecspi2 clock. Reconfigure them as gpio and try to toggle, check

if ecspi2 traces and not shorted with other signals.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,154件の閲覧回数
dennis_jelcic
Contributor I

Hi Igor,

We did figure-out the problem.  Your suggestion to check the pin muxing was a good one.  We were not providing enough drive strength on the pins.  Once we adjusted this, the clock signal appeared and behaved as expected.

Thanks you very much for your help.

Dennis

0 件の賞賛
返信
2,155件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Dennis

one can check if ecspi2 clocks are enabled in CCM_CCGR1 register.

Also recheck pin muxing for pads CSI_DATA00, UART4_TX_DATA, which

could provide ecspi2 clock. Reconfigure them as gpio and try to toggle, check

if ecspi2 traces and not shorted with other signals.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信