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.

OMAPL138: mcBSP loopback

Guru 20755 points

Hello,

 

I have a strange behaviour concerning mcBSP loopback in OMAP L138 EVM,

I have configured mcBSP 0 port the same as mcBSP port 1, but the behaviour of them is different when using digital loopback: while mcBSP 0 acts without any problem, mcBSP 1 data recieved is different then data sent: I use 32 bits word and the problem apears in the LSB word only as seen in the following log:

U-Boot >
 CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.3    | VT102 |      Offline                                                                               
tx_data=0x12345678 rx_data=0x123456d0
tx_data=0x12345679 rx_data=0x123456d1
tx_data=0x1234567a rx_data=0x123456d2
tx_data=0x1234567b rx_data=0x123456d3
tx_data=0x1234567c rx_data=0x123456d4
tx_data=0x1234567d rx_data=0x123456d5
tx_data=0x1234567e rx_data=0x123456d6
tx_data=0x1234567f rx_data=0x123456d7
tx_data=0x12345680 rx_data=0x12345680
tx_data=0x12345681 rx_data=0x12345681
tx_data=0x12345682 rx_data=0x12345682
tx_data=0x12345683 rx_data=0x12345683
tx_data=0x12345684 rx_data=0x12345684
tx_data=0x12345685 rx_data=0x12345685
tx_data=0x12345686 rx_data=0x12345686
tx_data=0x12345687 rx_data=0x12345687
tx_data=0x12345688 rx_data=0x12345680
tx_data=0x12345689 rx_data=0x12345681
tx_data=0x1234568a rx_data=0x12345682
tx_data=0x1234568b rx_data=0x12345683
tx_data=0x1234568c rx_data=0x12345686
tx_data=0x1234568d rx_data=0x12345687
tx_data=0x1234568e rx_data=0x12345686
tx_data=0x1234568f rx_data=0x12345687
tx_data=0x12345690 rx_data=0x12345690
tx_data=0x12345691 rx_data=0x12345691
tx_data=0x12345692 rx_data=0x12345692
tx_data=0x12345693 rx_data=0x12345693
tx_data=0x12345694 rx_data=0x12345694
tx_data=0x12345695 rx_data=0x12345695
tx_data=0x12345696 rx_data=0x12345696
tx_data=0x12345697 rx_data=0x12345697
tx_data=0x12345698 rx_data=0x12345690
tx_data=0x12345699 rx_data=0x12345691
tx_data=0x1234569a rx_data=0x12345692
tx_data=0x1234569b rx_data=0x12345693
tx_data=0x1234569c rx_data=0x12345694
tx_data=0x1234569d rx_data=0x12345697
tx_data=0x1234569e rx_data=0x12345696
tx_data=0x1234569f rx_data=0x12345697
tx_data=0x123456a0 rx_data=0x12345680
tx_data=0x123456a1 rx_data=0x12345681
tx_data=0x123456a2 rx_data=0x12345682
tx_data=0x123456a3 rx_data=0x12345683
tx_data=0x123456a4 rx_data=0x12345684
tx_data=0x123456a5 rx_data=0x12345685
tx_data=0x123456a6 rx_data=0x12345686
tx_data=0x123456a7 rx_data=0x12345687
tx_data=0x123456a8 rx_data=0x12345680
tx_data=0x123456a9 rx_data=0x12345681
tx_data=0x123456aa rx_data=0x12345682
tx_data=0x123456ab rx_data=0x12345683
tx_data=0x123456ac rx_data=0x12345684
tx_data=0x123456ad rx_data=0x12345687
tx_data=0x123456ae rx_data=0x12345686
tx_data=0x123456af rx_data=0x12345687
tx_data=0x123456b0 rx_data=0x12345690
tx_data=0x123456b1 rx_data=0x12345691
tx_data=0x123456b2 rx_data=0x12345692
tx_data=0x123456b3 rx_data=0x12345693
tx_data=0x123456b4 rx_data=0x12345694
tx_data=0x123456b5 rx_data=0x12345695
tx_data=0x123456b6 rx_data=0x12345696
tx_data=0x123456b7 rx_data=0x12345697
tx_data=0x123456b8 rx_data=0x12345690
tx_data=0x123456b9 rx_data=0x12345691
tx_data=0x123456ba rx_data=0x12345692
tx_data=0x123456bb rx_data=0x12345693
tx_data=0x123456bc rx_data=0x12345696
tx_data=0x123456bd rx_data=0x12345697
tx_data=0x123456be rx_data=0x12345696
tx_data=0x123456bf rx_data=0x12345697
tx_data=0x123456c0 rx_data=0x123456c0
tx_data=0x123456c1 rx_data=0x123456c1
tx_data=0x123456c2 rx_data=0x123456c2
tx_data=0x123456c3 rx_data=0x123456c3
tx_data=0x123456c4 rx_data=0x123456c4
tx_data=0x123456c5 rx_data=0x123456c5
tx_data=0x123456c6 rx_data=0x123456c6
tx_data=0x123456c7 rx_data=0x123456c7
tx_data=0x123456c8 rx_data=0x123456c0
tx_data=0x123456c9 rx_data=0x123456c1
tx_data=0x123456ca rx_data=0x123456c2
tx_data=0x123456cb rx_data=0x123456c3
tx_data=0x123456cc rx_data=0x123456c4
tx_data=0x123456cd rx_data=0x123456c5
tx_data=0x123456ce rx_data=0x123456c6
tx_data=0x123456cf rx_data=0x123456c7
tx_data=0x123456d0 rx_data=0x123456d0
tx_data=0x123456d1 rx_data=0x123456d1
tx_data=0x123456d2 rx_data=0x123456d2
tx_data=0x123456d3 rx_data=0x123456d3
tx_data=0x123456d4 rx_data=0x123456d4
tx_data=0x123456d5 rx_data=0x123456d5
tx_data=0x123456d6 rx_data=0x123456d6
tx_data=0x123456d7 rx_data=0x123456d7
tx_data=0x123456d8 rx_data=0x123456d0
tx_data=0x123456d9 rx_data=0x123456d1
tx_data=0x123456da rx_data=0x123456d2
tx_data=0x123456db rx_data=0x123456d3

the mcBSP is configured the same in both ports:

U-Boot > md 0x1d10000 40
01d10000: 00000000 00000000 00c38001 01a100a0    ................
01d10010: 01a100a0 201f0000 00000000 00000000    ....... ........
01d10020: 00000000 00000a00 00000000 00000000    ................
01d10030: 00000000 00000000 00000000 00000000    ................
01d10040: 00000000 00000000 00000000 00000000    ................
01d10050: 00000000 00000000 44120905 00000090    ...........D....
01d10060: 00000000 00000000 00000000 00000000    ................
01d10070: 00000000 00000000 00000000 00000000    ................
01d10080: 00000000 00000000 00000000 00000000    ................
01d10090: 00000000 00000000 00000000 00000000    ................
01d100a0: 00000000 00000000 00000000 00000000    ................
01d100b0: 00000000 00000000 00000000 00000000    ................
01d100c0: 00000000 00000000 00000000 00000000    ................
01d100d0: 00000000 00000000 00000000 00000000    ................
01d100e0: 00000000 00000000 00000000 00000000    ................
01d100f0: 00000000 00000000 00000000 00000000    ................

U-Boot > md 0x1d11000 40
01d11000: 00000000 00000000 00c38001 01a100a0    ................
01d11010: 01a100a0 201f0000 00000000 00000000    ....... ........
01d11020: 00000000 00000a00 00000000 00000000    ................
01d11030: 00000000 00000000 00000000 00000000    ................
01d11040: 00000000 00000000 00000000 00000000    ................
01d11050: 00000000 00000000 44120905 00000090    ...........D....
01d11060: 00000000 00000000 00000000 00000000    ................
01d11070: 00000000 00000000 00000000 00000000    ................
01d11080: 00000000 00000000 00000000 00000000    ................
01d11090: 00000000 00000000 00000000 00000000    ................
01d110a0: 00000000 00000000 00000000 00000000    ................
01d110b0: 00000000 00000000 00000000 00000000    ................
01d110c0: 00000000 00000000 00000000 00000000    ................
01d110d0: 00000000 00000000 00000000 00000000    ................
01d110e0: 00000000 00000000 00000000 00000000    ................
01d110f0: 00000000 00000000 00000000 00000000    ................

U-Boot > md 0x1d10800
01d10800: 44311100 00000000 00000000 00000000 ................
01d10810: 00010001 00000000 00010001 00000000    ....... ........

U-Boot > md 0x1d11800
01d11800: 44311100 00000000 00000000 00000000 ................
01d11810: 00010001 00000000 00010001 00000000    ....... ........

Any help is most appreciated,

Ran

  • Ran,

     I tested and found the same issue. Decreasing the bit clock of McBSP1 resolved the issue . But, I am still trying to figure out the reason for the difference in behavior between two modules.

    As per your settings, bit clock frequency is equal to the McBSP clock.

                              Clock Frequency = McBSP Internal Clock / (CLKGDV + 1)         //CLKGDV  = 0 as per the settings

     

    SRGR register 0x01d11014 - 201f0000  // 00 - CLKGDV.

    Try increasing the CLKGDV value. Even, CLKGDV value of 1 should work fine.

    Regards,

    N.sugumar

  • Hi Natarajan,

    You were right about the value of CLKGDV . I have fixed that.

    Best Regards,

    Ran

  • Hi Natarajan,

    On Changing CLKGDV, it solved only partly the problem of the difference in bahviour between mcBsp1 and mcBsp2:
    The data itself is correct now, but I still see difference in behaviour in regards to BFIFO: after intialization the number of messeges waiting in BFIFO, is sometimes (50% of tries) 1 and sometimes 0 (50% of tries). I have recheked the intialization procedure again and again, but has no idea where is the problem, and why the 2 mcBsp's unit behaves different (the register values is the same).  I can ofcourse "by-pass" this problem by reading the BFIFO after initialization, so that it is cleared after the reading, for reference, the implementation of the intialization can be seen in the previous messeges in this forum.

    Good Week,

    Ran

  • Hi Natarajn,

    After analyzing and checking the code again, I noticed that setting the loopback mode was done, after intialization process. When doing it inside the initilization process the overrun problem is solved (though I did not find in the datasheet that it is said to set the digital loopback mode inside the initilization process). I had similiar problem concerning UART's and it was solved in the same way.

    Thanks for the help,

    Ran