kl82 | SPI polling demo not working (dspi_polling_b2b_transfer example code)

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

kl82 | SPI polling demo not working (dspi_polling_b2b_transfer example code)

937 Views
shai_b
Senior Contributor II

Dear team

 

my customer is trying to run The dspi_polling_b2b_transfer example (master and slave) with two boards and the code seems to be broken.

the master unit is not getting data from the slave and the slave unit getting only "zero" as data

could you please advise what could cause this issue above?

Secondly, how the customer can check which REV EVK he got (see his kit below)?

IMG-20220427-WA0007.jpg

Thanks in advance

KR,

Shai

Labels (1)
0 Kudos
6 Replies

920 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @shai_b 

 

Thank you so much for using our community. It is my pleasure to help you and thank you so much your patience.

 

Regarding what you have asked for, may you tell me what do you mean with "the code seems to be broken"? Because examples from our SDK are well developed to work properly. Did you try running frdmkl82z_dspi_polling_b2b_transfer_master with another SPI device (as slave)? instead of using other evk board as slave.

 

Lastly, your question about REV EVK, you can see in the top right corner the SCH number and Rev. for that, so you can check the schematic from that board right here: https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/kinetis/33535/1/SPF-28889_B.pdf

 

I will stay tuned to your reply, so please let me know if you have more questions.

 

Best Regards.
Pablo Avalos.

0 Kudos

899 Views
shai_b
Senior Contributor II

Any feedback?

 

KR 

Shai

0 Kudos

915 Views
shai_b
Senior Contributor II

Hello @PabloAvalos,

Thanks a lot for your feedback, I've used frdmkl82z_dspi_polling_b2b_transfer_master demo code on one EVK, and on the second EVK I use frdmkl82z_dspi_polling_b2b_transfer_slave demo code.

but it appears to be not working as expected.

I did not try to use the EVK with a slave SPI sensor/device yet, but before reading the sensor I would like to run the SPI API via the example code can you please assist?

Kind regards,

Shai

0 Kudos

897 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @shai_b 

 

Thank you so much for your patience and for your reply.

 

After double-checking the SDK examples that we talked about with a frdm-kl82z and one frdm-k64z (that actually has a similar EVK pinout), the examples run successfully and work very well, so I would like to suggest you to check connection between the two EVKs, please.

Here are my results and connections done:

PabloAvalos_0-1651612275912.jpegPabloAvalos_1-1651612283587.jpeg

PabloAvalos_2-1651612294052.png

 

Please let me know if you have more questions.

 

Thank you.
Best Regards.
Pablo Avalos.

0 Kudos

871 Views
shai_b
Senior Contributor II

@PabloAvalos ,

Thanks a lot for your input, it seems to be that you use different PINs for the SPI demo by looking at your attached picture.

according to the readme.txt (under the 'doc' folder) the dspi_polling_b2b_transfer_master. demo example code uses J12 and you use a different port (I think you use J4).

can you please share your code and the PINS that you use for the demo?

it could help the customer to understand why it is not working on his side.

Thanks in adveace 

KR,

Shai

0 Kudos

857 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @shai_b 

 

Thank you so much for your reply.

 

Regarding the PINs for the SPI demo, they are the pins available (arduino compatible) that are mapped to the SPI0, and as demo example use SPI0, they are the PINs that you need to connect to run succesfully the Demo.

 

The code that I used for slave was dspi_polling_b2b_transfer_slave.c SDK example 2.5.0 version that you can download from here, selecting frmd-kl82z: https://mcuxpresso.nxp.com/en/select 
The code that I used for master was dspi_polling_b2b_transfer_master.c SDK example 2.11.1 version, for frdm-k64f, but at the end, both boards manage the same pinout for SPI0 and examples from SDK are pretty similar and working succesfully. 

 

Please let me know if you have more question, I will be happy to assist you.

 

Best Regards.
Pablo Avalos.

0 Kudos