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.

Am3352 bootup

Other Parts Discussed in Thread: AM3352

Hi,

I am in the process of writing bootup for am3352. 

Generally i know, for booting up, i should write the codes for ClockInititalization(), PortInitialization() and PortConfiguration(). But i don't know how to step up further? Can anyone please suggest some ideas regarding how to write the code? Is there any coding part available in starterware?

Regards,

Sudha J

  • Moving to StarterWare forum.

    Best regards,
    Miroslav

  • Hi pals,

    Please suggest me with some ideas. Waiting for your reply.

    Regards,

    J Sudha

  • Hi sudha,

                    Starter ware supports different boot modes like NAND, MMCSD and SPI etc. U can refer to the section Boot loader (Contains Source code ) in Starter ware installation Folder.U will get a good idea for initialization .

    Cheers

    Rama Krishna 

  • Hi,

    Thank You. 

    Here is my question in elaborate. I am having schematic for my board. Here i need to initialize the ports i have used. How to do this? Is that like a PinMuxSetUp()  ?

    For eg., In lcd.c file, i have lcdpinmuxsetup() function. In that 

    unsigned int LCDPinMuxSetup(void)
    {
    unsigned int profile = 0;

    profile = EVMProfileGet();

    if(profile == 0 ||
    profile == 1 ||
    profile == 2 ||
    profile == 7)

    {

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(0)) =
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_MMODE_SHIFT) |
    (1 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_PUDEN_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_PUTYPESEL_SHIFT)|
    (1 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_RXACTIVE_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_SLEWCTRL_SHIFT);

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(1)) =
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_MMODE_SHIFT) |
    (1 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_PUDEN_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_PUTYPESEL_SHIFT)|
    (1 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_RXACTIVE_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_SLEWCTRL_SHIFT);

    etc..... (all the LCD pins used)

    }

    Do i need to use the above code setup for all other ports?

    EVMProfileGet() indicates what?

    Thanks & Regards, 

    J Sudha

  • Hi Sudha,

                    In the GP EVM we have two boards named base board and daughter board.The daughter board has profile Switch( 4 Switches but [2:0] used so 8 modes ) which are connected to CPLD and the CPLD is connected to the processor via I2C bus.The Pin Muxing is done in starterware based on the profile Selection .If ur custom board uses the same logic and u will go for the same,If not u can change the EVMProfileGet( ) function in cpld.c(comment the two functions will always returns zero).

                    Add your Changes according to pin muxing of custom board in the Pinmuxsetup( ) function calls. U can download the pinuse of AM335x EVM from TI Website.

    Cheers

    Rama Krishna   

  • Hi Rama Krishna,

    Regarding EVMProfilegetup() my doubt is cleared. Thank You.

    But to initialize the the ports, what i should do?

    For example, if i need to initialize the lcd ports, do i need to follow the below coding procedure?

    {

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(0)) =
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_MMODE_SHIFT) |
    (1 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_PUDEN_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_PUTYPESEL_SHIFT)|
    (1 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_RXACTIVE_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_SLEWCTRL_SHIFT);

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(1)) =
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_MMODE_SHIFT) |
    (1 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_PUDEN_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_PUTYPESEL_SHIFT)|
    (1 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_RXACTIVE_SHIFT) |
    (0 << CONTROL_CONF_LCD_DATA1_CONF_LCD_DATA1_SLEWCTRL_SHIFT);

    etc..... (all the LCD pins used)

    }

    How to use particular line as a output / input?

    Regards, 

    J Sudha

  • Hi Sudha,

                     In the Above piece of Code u see the

    1 << CONTROL_CONF_LCD_DATA0_CONF_LCD_DATA0_RXACTIVE_SHIFT ),Which means that Receive enabled so u can use the pin as input .By default Rxer is disabled and transmitter is enabled.

    Please refer to the Control module Section of TRM of Am335x and data sheet of Am335x for particular pin,your all doubts will clear.

    Cheers

    Rama Krishna