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.

am3357 starterware usb exception

Hi

I have been trying unsuccessfully to use any of the usb starterware example from the AM335x sdk. Anytime I try to access the usb registers, the processor goes in exception state. The usb phy inits correctly in the bootloader stage, but after that any access to registers fails. Is there anything that needs to be done to access those registers ? 
Best Regards. 
Adrien SILVESTRE
  • Moving this to the Starterware forum.

  • Adrien,
    Can you please provide more details on your issue? Which EVM? Addresses of the register locations? Are you trying trying to access these registers through CCS?
    Thanks.

    Lali
  • Hi Lalindra

    I'm using the most simple example code that I grabbed from the usb_dev_bulk example and the bulk device info on the wiki. 

    Int main()
    {
    Task_Handle task;
    Error_Block eb;

    System_printf("enter main()\n");


    MMUInit(applMmuEntries);

    USB0ModuleClkConfig();
    USBInterruptEnable();

    //
    //Delay timer setup
    //
    DelayTimerSetup();

    //
    // Initialize the transmit and receive buffers.
    //
    USBBufferInit((tUSBBuffer *)&g_sTxBuffer);
    USBBufferInit((tUSBBuffer *)&g_sRxBuffer);

    //
    // Pass our device information to the USB library and place the device
    // on the bus.
    //
    USBDBulkInit(0, (tUSBDBulkDevice *)&g_sBulkDevice);

    Error_init(&eb);
    task = Task_create(taskFxn, NULL, &eb);
    if (task == NULL) {
    System_printf("Task_create() failed!\n");
    BIOS_exit(0);
    }

    BIOS_start(); 
    return(0);
    }

    All of the USB structures are absolutely identical to the usb_dev_bulk starterware example. But my program crashes when I reach the "USBDBulkInit" breakpointing into it, The program stops whenever it tries to change the usb processor registers, any of them. I've tried not using usblib but to no avail. 

    Any suggestions would be appreciated. 

    My program crashes when I 

  • Hi Adrien,

    I tried the default Starterware example and it seems to work. The location of the project tried is: AM335X_StarterWare_02_00_01_01\build\armv7a\cgt_ccs\am335x\evmAM335x\usb_dev_bulk

    I'm currently not able to connect the EVM to the PC and exercise the full example, but when I run the example in CCS, it certainly goes past the "USBDBulkInit" on line ~855 to waits at line ~877 in the main while loop. Did you try the default example first?

    Lali