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 user-level examples?

Other Parts Discussed in Thread: AM3715

Hi,

Are there any resources (documentation, examples) on how to use the McBSP features present on the AM3715 ARM processors? I've seen some drivers on the kernel tree:

~/ti-sdk-am37x-evm-05.05.01.00/board-support/linux-2.6.37-psp04.02.00.07.sdk$ find . -name "*mcbsp*"
./arch/arm/plat-omap/include/plat/mcbsp.h
./arch/arm/plat-omap/mcbsp.c
./arch/arm/mach-omap2/mcbsp.c
./arch/arm/mach-omap1/mcbsp.c
./sound/soc/omap/omap-mcbsp.h
./sound/soc/omap/omap-mcbsp.c

But no actual documentation on how to interface with such devices from userland. I am interested in documentation and examples regarding simple serial communication between two McBSP enabled devices (i.e.: two AM3715 CPUs).

Any help would be greatly appreciated.

  • Hello,

    Can you please reply to this post? Are there any resources (documentation, examples) on how to use the AM McBSP features present on the AM3715 ARM processors?

  • I don't know much the mcbsp Linux driver. I would guess that you would need to check if this driver can create a device (/dev/xxx).
    For example the SPI and I2C drivers are able to create devices (dev/spidev, dev/) so that it makes it possible to use if from the user's space.

    For SPI you can look at:
    http://brew-j2me.blogspot.co.uk/2010/05/linux-accessing-spi-bus-from-user-space_06.html
    http://www.armadeus.com/wiki/index.php?title=SPI

    For I2C:
    http://www.mjmwired.net/kernel/Documentation/i2c/dev-interface
    http://www.linuxjournal.com/article/7136

    But I would guess that the McBSP driver is to be used by other drivers like it is used in ALSA. You could look in the ALSA framework how it makes use of the McBSP driver to acquire audio data.
    Some info here as well:
    http://gumstix.8.n6.nabble.com/ADC-McBSP-advice-and-questions-about-writing-a-driver-td639140.html

    Also some docs about the OMAP35x McBSP linux driver:
    http://www.omappedia.org/wiki/Kernel_McBSP
    http://processors.wiki.ti.com/index.php/AM_McBSP

    Hope it helps.

    A.

  • Thanks for your answer AnBer,

    I don't know much about the McBSP Linux driver myself either, that's why I came to this forum for expert advice after we reached the same conclussions you offered us (that there seems to be no userspace driver in the kernel an therefore the interfaces are only available to other drivers).

    Is there any chance we can get a definitive answer on this matter?

  • I have never seen any McBSP drivers that makes the McBSP accessible from the User's space, but of course it is possible to make one. The McBSP drivers that is made available in the SDK was meant to be used in the context of the Audio driver (ie ALSA framework), not directly from the user's space.

    I have seen some customer trying to write a user's space driver for the McBSP. There are some entries in the forum:
    http://e2e.ti.com/support/embedded/linux/f/354/t/89978.aspx

    Also you could try first to have a none Linux plan C code working. There are some plain C McBSP/sDMA examples available from the E2E too:
    http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/94300.aspx#328119
    http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/p/84750/292588.aspx#292588
    Also there are some basic u-boot based examples as part of the ITBOK SW for AM37x/DM37x Mistral EVM:
    http://www.mistralsolutions.com/pes-products/development-platforms/amdm37x-evm.html
    See the documentation and sofware section.

    Hope it helps.

    A.


  • Hi AnBer,

    thanks again for your support and the information provided. We are currently considering the various bus choices for our system design and the software development overhead that they would carry (of course we favour userland accessible buses such as RS, I2C or SPI), so I guess we have all we need for now.

    Thanks for your help.