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.

AM335x ISDK pinmux and MMU

Other Parts Discussed in Thread: SYSBIOS, TMDSICE3359, AM3359

Hello there,

The main.c code of I2C Led example in C:\ti\am335x_sysbios_ind_sdk_01.01.01.01 is as follows.

/*

* main.c

*

* Copyright (c) 2012 Texas Instruments Incorporated ALL RIGHTS RESERVED

*

*/

#include <xdc/std.h>

#include <xdc/runtime/Error.h>

#include <xdc/runtime/System.h>

#include <ti/sysbios/BIOS.h>

#include <ti/sysbios/knl/Task.h>

#include <stdio.h>

 

#include "gpio.h"

#include "soc_AM335x.h"

#include "plat_utils.h"

#include "plat_mux.h"

#include "plat_led.h"

#include "osdrv_uart.h"

#include "osdrv_mmu.h"

#include "osdrv_version.h"

#include "plat_gpio.h"

#include "osdrv_oledlcd.h"

unsigned char uartInstance = 0;

unsigned char boardType = 0;

MUX_CONFIG icev2Mux[] = {

{ 0x0920 , 7 , AM335X_PIN_OUTPUT }, // mii1_txd2 -> LED_1

{ 0x091C , 7 , AM335X_PIN_OUTPUT }, // mii1_txd3 -> LED_2

{ 0x092C , 7 , AM335X_PIN_OUTPUT }, // MII1_TXCLK -> LED_3

{ 0x0880 , 7 , AM335X_PIN_OUTPUT }, // GPMC_CSN(1) -> LED_4

{ 0x09B0 , 7 , AM335X_PIN_OUTPUT }, // XDMA_EVENT_INTR(0) -> LED_5

{ 0x09B4 , 7 , AM335X_PIN_OUTPUT }, // XDMA_EVENT_INTR(1) -> LED_6

{ 0x0988 , 0 , AM335X_PIN_INPUT_PULLUP }, // I2C0_SCL

{ 0x098c , 0 , AM335X_PIN_INPUT_PULLUP }, // I2C0_SDA

{0xFFFFFFFF,0,0}

};

SYS_MMU_ENTRY applMmuEntries[] = {

{(void*)0x48300000,0}, //PWM - Non bufferable| Non Cacheable

{(void*)0x48200000,0}, //INTCPS,MPUSS - Non bufferable| Non Cacheable

{(void*)0x48100000,0}, //I2C2,McSPI1,UART3,UART4,UART5, GPIO2,GPIO3,MMC1 - Non bufferable| Non Cacheable

{(void*)0x48000000,0}, //UART1,UART2,I2C1,McSPI0,McASP0 CFG,McASP1 CFG,DMTIMER,GPIO1 -Non bufferable| Non Cacheable

{(void*)0x44E00000,0}, //Clock Module, PRM, GPIO0, UART0, I2C0, - Non bufferable| Non Cacheable

{(void*)0x4A300000,0}, //PRUSS1 - Non bufferable| Non Cacheable

{(void*)0x49000000,0}, //EDMA3 - Non bufferable| Non Cacheable

{(void*)0x4A100000,0}, //CPSW - Non bufferable| Non Cacheable

{(void*)0xFFFFFFFF,0xFFFFFFFF}

};

It seems to me that MUX_CONFIG icev2Mux is an arry of pin_mux type. Can anybody tell me what the elements in the array mean. How is this array created? Where is it being used? It seems that it is not directly created from the PINMUX tool. Is there any tutorial to create pinmux files and to bring those files into CCS? 

I have the same question regarding applMmuEntries.

Many thanks

  • I will notify the ISDK team to comment.
  • Because Pinmux generates the following.

    #ifdefined(BUILDCFG_MOD_GPIO)

    static pinmuxPerCfg_t gGpio0PinCfg[] =
    {
    {
    /* GPIO1 -> gpio0[16] -> J18 */
    PIN_GMII1_TXD3, 16, \
    ( \
    PIN_MODE(7) | \
    ((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
    ) \
    },
    {
    /* GPIO1 -> gpio0[17] -> K15 */
    PIN_GMII1_TXD2, 17, \
    ( \
    PIN_MODE(7) | \
    ((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
    ) \
    },
    {PINMUX_INVALID_PIN}
    };
  • Bailin,

    If you are looking for an example on how the Pinmux config is integrated a project, please take a look at this app note where it describes some of these steps using the cloud based pinmux tool. http://www.ti.com/lit/an/sprac32/sprac32.pdf 

    Hope this sheds some light on your question.

    Lali

  • Hi Lali,

    Thank you very much for your reply.

    On page 6 of the document sprac32.pdf, 2.4 Rebuild the Board Library gives a link to the wiki page. However, the wiki page refers back to this document as it says "Processor SDK RTOS Customization: Modifying Board library to change UART instance on AM335x

    Jump to: navigation, search

    Introduction

    Moved to: www.ti.com/.../sprac32.pdf ".

    It is actually a dead loop. Who can break this dead loop?

    Kind regards,

    Bailin
  • Hi Lali,

    I don't think that I can follow those three documents to build a library because they are too general. Simply, I just want to use the Pinmux tool to build my target application which is based on TMDSICE3359 and what document can I follow to do that?

    Kind regards,

    Bailin
  • ### EDITED WITH ADDITIONAL INFO###

    I would advise to use SDK 2.x unless you have good reason to stay on SDK 1.x.

    a) Below are some comments on how Pinmux and the Industrial SDK 2.x are linked together.

    - The low level code of the IND SDK is base on the Starterware lib.
    If you want to define a custom board you should do it in the Starterware code.

    The application (for example the ethercat example) will call the Starterware API to do the low level init.
    For example:
    {
     BOARDInit(NULL)
     ....
     Board_pinMuxConfig(iceV2Mux);
    }

    The iceV2Mux definition is in
        C:\ti\sysbios_ind_sdk_2.1.1.2\sdk\protocols\ethercat_slave\include\ecat_appl_cnfg.h
    and refers to the Starterware board specific definition:
    ${IA_SDK_HOME}\sdk\starterware\board\am335x
    The Pinmux setup is included in the board specific files.
    For example for the AM3359 ICEv2 the file is located in:
        C:\ti\sysbios_ind_sdk_2.1.1.2\sdk\starterware\board\am335x\am335x_icev2_pinmux_data.c
        C:\ti\sysbios_ind_sdk_2.1.1.2\sdk\starterware\board\am335x\am335x_icev2.c
    Some high level info are provided in sysbios_ind_sdk_2.1.1.2:
    ${IA_SDK_HOME}\sdk\starterware\docs\Board_and_ChipDB_Details.pdf


    - After the modif you can re-build the Starterware again.
    The starterware project creates the board library at different location when built using CCS or with gmake.

    For CCS build the linker path of ISDK projects points to the location "${IA_SDK_HOME}\sdk\starterware\binary\board\lib\am335x-evm\a8\release\gcc"
    When you build board using gcc, the library is created at "${IA_SDK_HOME}/sdk/starterware/binary/board/lib/amxxxx-xxx/ax/ccs/amxxxx_release" .

    You will need to copy the new Starterware lib in the according IND SDK folder (or change the linker path link) to build the Industrial example again.

    b) For SDK 1.x it seems that the Pinmux of i2c_led example is handle in the Industrial SDK layer directly:
    The PinMux fct is part of the platform definition:
    am335x_sysbios_ind_sdk_01.01.01.01\platform\am335x\src
    It does not call the Starterware layer.

    For SDK 1.x there are no  connection between the PINMUX tool (and the file gernerated from it) and the definition of the pin muxing in the IND SDK SW.

    c) Moving forward the Industrial protocols will be included as an "add-on" to the RTOS SDK. So there will be a transition from IND SDK 1.x and IND SDK 2.x to the RTOS SDK.
    AM335x, AM437x and AM57x are already supported by the RTOS SDK. For the AM335x the industrial protocols "add-on" would be included in the near future.
    I would advise to start looking already at the RTOS SDK to get familiar to the new SW structure and how the pin muxing is handled there.


    A.

  • Hi Bailin,

    I edited my first post with some more info.

    A.
  • Hi A.,

    Thank you very much for your reply.

    I managed to import and compile successfully C:\ti\sysbios_ind_sdk_2.1.1.2\sdk\examples\example_utils project. Hiwever, debugging it using "F8" (resume) doesn't print anything through the uart console. Stepping into taskFxn(), I found that CONSOLEUtilsInit() did return. The debugger stopped there. I have worked on this for a few days already.

    Regarding .lib, adding -L *.lib generated compile errors.

    Regards,

    Bailin