SPI interface issue with MPC5748G Devkit Revision D

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI interface issue with MPC5748G Devkit Revision D

2,165 次查看
sanjib_das
Contributor I

I have interfaced peripheral over SPI using J3 connector of MPC5748 DEVKIT. I am trying to read signature register from that peripheral. I observed erratic behavior with Revision D board where I am able to read signature for first read operation after power up. It is failing for successive reads. If I power up the DEVKIT it works for first read operation.


I tried the same code with Revision B DEVKIT and it works fine for successive reads without needing multiple power up.


What could be the issue with Revision D DEVKIT? Are there any additional components required for SPI connection?

标签 (1)
标记 (1)
0 项奖励
回复
11 回复数

1,960 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which pins do you use? Did you try to compare schematics for those 2 revisions?

What does "failing for successive reads" means? You see no frame on SPI line, or just input data are wrong? What device is connected? Did you measure SPI bus using scope/analyzer? 

BR, Petr

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hi Petr,

I am using pins of J3 port and the pins are,

2 - PA12 - Interrupt

5 - PF3 - Chip Select

7 - PF0 - MOSI

9 - PF1 - MISO

11 - PF2 - Clock Out

13 - GND - GND

When compared the schematics for both revisions, there are no differences for the SPI connections i.e. for J3 connections. Only differences are for usage of latest MCU silicon, additional features of SD card etc for revision D board.

I am trying to read device ID/signature of a flash memory connected over SPI interface. I have implemented a loop of 5 for reading this value. With rev B board, it works fine for all the 5 times but with rev D board, it works for the first time after power up.

0 项奖励
回复

1,960 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

on those pins nothing is connected on both boards so no issue is expected. You can try to send SPI frames without memory connected.

The difference between MCU revisions are mentioned in errata documents

https://www.nxp.com/docs/en/errata/MPC5748G_1N81M.pdf 

https://www.nxp.com/docs/en/errata/MPC5748G_0N78S.pdf 

BR, Petr

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hello,

I  tried loopback mode for SPI on both boards and it is working. But when external peripheral (memory) is connected, rev D board is not working correctly and Rev B is working. Observations are same as mentioned in earlier thread. With Rev D, I am really facing challenges for the stable operations over SPI. Look forward to your earliest help in this regards.

Thanks

0 项奖励
回复

1,960 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if SPI is working normally without memory connected, then this should not be issue of the MCU. 

What about a power supply? How is the power line of the memory connected? Are you able to power memory separately?

BR, Petr

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hi,

Memory has a separate power supply and I tried switching the same as well but observations remain same. It works with Rev B but fails with Rev D board.

As you mentioned, it may not be a problem with MCU-SPI engine but some thing with Rev D board.

Can you please help on priority as Rev B boards are not available and I am facing field failures with my proto design which uses Rev D board.

Thanks in advance for all your help.

BR,Sanjib

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hi,

Waiting for your early reply.

BR,Sanjib

0 项奖励
回复

1,960 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

lets come full circle...

What exactly happen in the MCU after you successfully read first device ID/signature of a flash memory?

Is the MCU hung somewhere in the code? Is the MCU reseted? If yes what is the reset source read from RGM module?

Is the MCU running SPI read functions, but no frame is visible on SPI bus, or you receive data but it is wrong?

BR, Petr

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hi,

MCU does not reset. 

Yes the MCU runs SPI read function, but data read is incorrect. This observation occurs with Rev D board only

but the same code works fine with Rev B board.

BR, Sanjib

0 项奖励
回复

1,960 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so external loopback is functional. With memory connected you can see all frames on the SPI bus, but the received data on MCU side is wrong, only fist word is correct.

This could lead to wrong timing or similar? Are you able to share some scope/analyzer screens where SPI frames are visible. Are they same between board revisions?

BR, Petr 

0 项奖励
回复

1,960 次查看
sanjib_das
Contributor I

Hi Petr,

Your earliest reply is highly appreciated.

Thanks 

0 项奖励
回复