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.

McBSP enable XFRLEN1

Hi,

I am using c6474. I try to communicate by McBSP1 and I have troubles with its configuration.

I do something like that:

1. I set XRST, RRST, GRST, FRST to 0.

2. I set value XFRLEN1 to e.g.3

3. I set value XWDLEN1 to 32 bits

5.FREE=1, SOFT=0, FSXM=1, CLKXM=1, CLKSTP = '11', CLKSM=1, FSGM=1

4. I set XRST, RRST, GRST, FRST to 1.

When I start sending packets from DSP I see with oscilloscope that:

words has 32 bits

FSX come after each 32 word.

When I change XWDLEN1 to other values it works.

Why  XFRLEN1 does not work? How to enable it?

Similar problem I have with FWID (always it has 1 bit), XPHASE (always one phase).

I have checked registers values in memory browser and their are correct.

Regards,

Gregory

  • Hi Gregory,

    Thanks for your post.

    Usually, frame length specifies the maximum number of serial elements or logical time slots or channels that are available for transfer per frame and you can program the the frame length fields with (w minus 1), where w represents the number of elements per frame. You can refer Table 8 in Section 4.5.2 for receive/transmit frame length configuration from c6474 mcbsp userguide as below:

    http://www.ti.com/lit/ug/sprug17a/sprug17a.pdf

    XFRLEN1 can be configured through transmit control register (XCR) which refers the transmit frame length as number of words in phase 1. Please refer section 11.5, Table 21 for XCR field descriptions from the above mcbsp user guide.

    Kindly ensure your XFRLEN1 configuration and enable accordingly.

    Thanks & regards,

    Sivaraj K

    ----------------------------------------------------------------------------------------------------------------

    Please click the "Verify Answer" button on this post if it answers your question.

    ----------------------------------------------------------------------------------------------------------------

  • Thank you for your reply.

    I have read this userguide and I think I have done everything correctly. (Value in XFRLEN1==2, FPER==31) and FSX come with every 32 bit but CLK is only for 8 bits, so I suppose I am sending only one byte in frame instead 3 bytes. Maybe sending procedure is incorrect? I have tried two solutions:

    MCBSP1->DXR = 0xFFFFFF;

    or

    MCBSP1->DXR = 0xFF;
    MCBSP1->DXR = 0xFF;
    MCBSP1->DXR = 0xFF;

  • I have solved my problem. CLKSTP should be set to '00'.

    Thank you.

  • Hi Grzegorz Brzuchalski,
    Thank you for the update.