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