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.

BeagleBone BSP and UARTS

I've managed to get a BeagleBone BSP from Adeneo built. I've selected all the UARTs in the BSP but I can't seem to access any of them in the image when it runs on the Bone.

Is there a pin mux change that has to be made in the BSP as well to get the UARTs working?

Or do I have to access the UARTS through a DLL driver instead of accessing them as COMx?

Thanks

Phil

  • The driver willl do a lookup for the deviceId i the PAD config, and if it is not defined, the driver will not load, so that's probably what you are seeing.
    I dont think it's possible to enable all UARTS concurrently, since many of the pins are muxed. The Pin mux tools is pretty neat utility to check what combinations you can enable.

    http://www.ti.com/tool/pinmuxtool

    We created a custom daughterboard for the Beaglebone, where we used UART2 through the "expansion pins". I had to add it to the padconfig table and then check UART3 (COM3:) in the BSP to get things working. I'll try to provide some code on monday. Once this is done you can use CreateFile with COM3.


    Hope this helps!
    BR
    /Magnus

  • Thanks Magnus! Any code would be awesome - I really appreciate the pointer.

  • Hi, here are the changes I made to the PAD config in order to get UART2 working.

    *******************************************************
    In BB\SRC\INC\bsp_padcfg.h
    *******************************************************

    // Configure pins SPI0_SCLK and SPI0_D0 as UART2

    #define UART2_PADS   \
    PAD_ENTRY(SPI0_SCLK,        (MODE(1) | PULLUDEN | RXACTIVE))    /* A17: UART2_RXD */  \
    PAD_ENTRY(SPI0_D0,          (MODE(1) | PULLUDEN ))              /* B17: UART2_TXD */  \

    *******************************************************
    In BB\SRC\BSP_COMMON\BSP_PADCFG\bsp_padcfg.c
    *******************************************************

    // Create a PAD_INFO entry
    const PAD_INFO UART2Pads[]  =   {UART2_PADS END_OF_PAD_ARRAY};

    // Add the entry to the lookup table
    const EVM_PIN_MUX BB_BOARD_PIN_MUX[] = {
    .
    .

        { UART2Pads, AM_DEVICE_UART2, PROFILE_ALL, DEV_ON_BASEBOARD},  // UART2 (COM3:)
    .
    .
    .

    To enable it you need to set this env. variable: BSP_AM33X_UART3 (COM3:) which will
    add the registry stuff in (BB\SRC\DRIVERS\UART\uart.reg) to your image.

    This you can do by checking the corresponding Catalog Item.

    Cheers
    /Magnus
     

  • Thanks, Magnus! That was *exactly* the information I needed! If I can get a few more ports going I'll post the final outcome as a response to this message,

    Nice example of how to modify the bsp_padcfg.h file, too.

    You should get into the paid-for-support game! :)

    Phil

  • Great, well since I encountered this problem quite recently, it was an easy thing to share!

    Good luck!
    /Magnus 

     

  • Hi everyone, thanks for sharing this info, that was exactly what I was looking for, so, thank you Magnus.

    however now I need to enable another com port (I need two) and I'm having some issue, I've tried to replicate your code for uart3-4-5 but it didn't work.

    do you know hoe to enable a second com port like com4/5?

    thank you.

  • You need to be careful which ones you are trying to expose. You can't do them all - at least one has only one pin brought out to the expansion headers (Uart 3 only has Tx I think - something like that, anyway). Also, you have to choose the pin muxing carefully - for example, if you use Uart4 I think that eats the pins for the SD Card.

    I am away on a business trip at the moment but as soon as I can get to my source I'll post the code for at least one of the other uarts for you to use as an example.

    To understand the pin MUX get hold of the pinmux utility from TI and study that a little.

    I was only doing the 'bone while waiting for the BB Black BSP to be released - I will be enabling as many ports on that as I can (I need 4 for my app). I only had the evaluation BSP source which has now expired so I can't test enabling any more of the ports for you, sorry! I will buy the BB Black BSP source when it's released.

    Anyway, give me a couple of days and I'll post my source based on Magnus' very helpful information.

    Phil

  • Hi, now I'm studing the pinmux utility, i know that i cannot enable it all, i'm searching for the right pin muxing....

    I'm in your same situation, i need 2+ serial port on the black but until agoust no bsp will be released, so now we're making some work on the white board with the bsp under nda.

    Now i'm testing uart2 + uart1..... I will keep this thread up to date.

    thank you.