Configuring DSPI with MPC5643xL toolbox

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

Configuring DSPI with MPC5643xL toolbox

Jump to solution
1,311 Views
yuchenchen
Contributor II

I'm configuring the DSPI port to read the data from a hall sensor through SPI. For the sensor itself, I need to send out a write command through MOSI and then read the data back through MISO. Attached is my model. 

I have talked to the halls sensor supplier technical support and confirm that 0xFFFF is the right signal I should send out as a read command, but I'm still not reading the proper data back. The read message is always a constant however I turn the shaft whose angle I'm trying to measure. Can anyone please help me take a look at the model? Is it doing the correct thing I'm expecting it to do?

Thank you so much!

Original Attachment has been moved to: dspi_2015a.slx.zip

1 Solution
1,093 Views
yuchenchen
Contributor II

I figured the out earlier. It turned out to be a shorted chip select pin. 

I reconfigured another chip select pin from a resolver module on the board and it worked, I was able to read success transmission from my SPI monitor.

The sensor didn't send the data back though. Then I found the duration of each message read by the SPI monitor is 1.74 micro seconds. I changed the scalars and prescalars to slow it down and fixed the issue. The sensor is not capable of read data of so high speed I'm guessing. 

Thank you!

View solution in original post

3 Replies
1,093 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Yuchen CHEN

Conceptual - your model is correct, it contains all the blocks you need and all the settings.

First, i would try to double check if the DSPI transmit works as expected and the mesage is received corectly by hall sensors. Perhasp you own an oscilloscope to verify this.

If transmit does not work, then you might need to tweek the DSPI config block: try different settings for Transfer Mode especially for delays.

If the trasmit is ok, then you would need to focus on receive path. The first thing i would do it to increment a variable in the Function-Call Subsystem that is supposed to be triggered when a msg is received.

Hope this helps!

Daniel

0 Kudos
1,094 Views
yuchenchen
Contributor II

I figured the out earlier. It turned out to be a shorted chip select pin. 

I reconfigured another chip select pin from a resolver module on the board and it worked, I was able to read success transmission from my SPI monitor.

The sensor didn't send the data back though. Then I found the duration of each message read by the SPI monitor is 1.74 micro seconds. I changed the scalars and prescalars to slow it down and fixed the issue. The sensor is not capable of read data of so high speed I'm guessing. 

Thank you!

1,093 Views
dumitru-daniel_
NXP Employee
NXP Employee

Well done Yuchen CHEN !

Thank you for sharing your findings with us.

Please consider posting your latest model + resolver module type here if you have the posibility and clearance.

In case others will need a similar solution they can use your trademark design as a reference.