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.

Where to find the detailed pinmux for peripherals in IDK AM437X?

Other Parts Discussed in Thread: SYSBIOS

Hi,

I would like to perform some basic instructions on GPIO ports (Leds, user switch etc.). I downloaded Sys/bios sdk for IDK AM437X and used some TI's instructions as Board_setTriColorLED,  Board_pinMuxConfig etc. I dived into these functions and their components and can't figure out two things:

1. What are the Module ID's listed in appropriate  chipdb_defs.h file?  I suppose they are not physical addresses, so are they connected to some ID's of peripherals in SYS/BIOS? 

2. In which file I can find physical addresses of GPIO ports required by the functions from gpio.c and named as baseAddr? I supposed these should be provided as a defined value such as GPIOA_BASEADDR, but nothing like this is defined in any of included headers. I am sure these information must be provided for my kit somewhere in the sdk/board but I can't find it.

Regards,

Jacek

  • Hi,

    I will ask the ISDK team to help.
  • Hi,


    1. chipdb_defs.h and device.h contain device and board component identification numbers.

    For example the SYSBIOS Board initGPIO Driver uses CHIPDB_MOD_ID_GPIO to obtain the GPIO Instance and Pin number

    by calling Board_initPlatform

    in {Installation_directory}\sysbios_ind_sdk_2.1.1.2\sdk\board\source\drivers\board_platform.c

    which calls the Starterware APIs

    BOARDGetDeviceCtrlModId – returns the device ID (for example CHIPDB_MOD_ID_GPIO)

    BOARDGetDeviceCtrlModInstNum – returns the instance type

    BOARDGetDeviceCtrlInfo – returns the pin number in the case of GPIO

    2. It may be easier to follow by stepping through a starterware example since, in this case,

    the same APIs are used by both.

    Using

    {installation_directory}\sysbios_ind_sdk_2.1.1.2\sdk\starterware\examples\gpio\led_blink\led_blink_app_main.c

    Backing up a step to tie this together

    The previous step is now is

    led_blink_app_main calls GpioAppBoardInfoGet which calls the Starterware APIs

    BOARDGetDeviceCtrlModId – returns the device ID (for example CHIPDB_MOD_ID_GPIO)

    BOARDGetDeviceCtrlModInstNum – returns the instance type

    BOARDGetDeviceCtrlInfo – returns the pin number in the case of GPIO

    In the global object - gGpioAppCfg


    Then GpioAppSocInfoGet calls CHIPDBBaseAddress which returns the base address

    In the global object – gGpioAppCfg


    A little later GpioAppLedBlink calls the gpio.c API  GPIOPinWrite and provides the

    Stored values for

    uint32_t baseAddr,

    uint32_t pinNumber,

    uint32_t pinValue)

     

    David


  • Thank you. That's exactly what I needed.
    Regards,
    Jacek