This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to communicate between two 28335 via McBsp in SPI Mode?

My Code:

8836.main.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//###########################################################################
//
// FILE: Example_2833xMCBSP_SPIX.c
//
// TITLE: DSP28133x Device McBSP using SPI mode
//
// ASSUMPTIONS:
//
// This program requires the DSP2833x header files.
// As supplied, this project is configured for "boot to SARAM"
// operation. The 2833x Boot Mode table is shown below.
// For information on configuring the boot mode of an eZdsp,
// please refer to the documentation included with the eZdsp,
//
// $Boot_Table:
//
// GPIO87 GPIO86 GPIO85 GPIO84
// XA15 XA14 XA13 XA12
// PU PU PU PU
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I tried to use McBsp's interrupt in SPI Mode, then communicate between both.

But I can send a 32bits data out from Master, but I can not receive any data from Slave.

Who can help me to solve it? 

Thank you first.

  • Hi Chen,

    Can you please verify your connections? 

    Master Slave  
    CLKX CLKX
    DX DR
    DR DX
    FSX FSX

    I noticed in the code that you have also commented out where the Interrupt enables (line 228  & 229). You are transmitting inside of timer0_isr, but won't make it into  the receive ISR.

    Let me know if this helps.

    Mark

  • I have checked the connections. It's right.

    I have tried to enable line 228 & 229, but the waveform of communication still wrong.

    I don't know how to make it into receive ISR in right way. Could you tell me how to do that? thank .

    My Question:

    I expect that slave can receive the data when I send a data from master into slave, but I didn't

    see any data  in ddr1 & ddr2.

    And then waiting for receiving next data, then send 0x88888888 out at the same time.

    Why did i see a data without FSX when I transmit from slave into master?

    Could you help me solve it? Thank you.