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.

unable to get interrupt in TM4C1237H6PZ

Other Parts Discussed in Thread: TM4C1237H6PZ

hi all,

i am using PART_TM4C1237H6PZ controller, i build code on ccs it is working fine,but when i tried the same code on keil it is not working. I am getting interrupt on USB. my USB configuration is as bellow.

  USBStackModeSet(0, eUSBModeForceHost, 0);

  SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0);

    //
    // Configure the required pins for USB operation.
    //
    GPIOPinConfigure(GPIO_PF4_USB0EPEN);    //
    GPIOPinConfigure(GPIO_PF5_USB0PFLT);    //
    GPIOPinTypeUSBAnalog(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);    //id vbs
    GPIOPinTypeUSBDigital(GPIO_PORTF_BASE, GPIO_PIN_4 | GPIO_PIN_5);    //-
    GPIOPinTypeUSBAnalog(GPIO_PORTJ_BASE, GPIO_PIN_0 | GPIO_PIN_1);    //dp dm

    //
    // Configure SysTick for a 100Hz interrupt.
    //
    SysTickPeriodSet(SysCtlClockGet() / TICKS_PER_SECOND);
    SysTickEnable();
    SysTickIntEnable();

    //
    // Enable Interrupts
    //
    IntMasterEnable();
    //
    // Initialize the USB stack mode and pass in a mode callback.
    //
    USBStackModeSet(0, eUSBModeHost, ModeCallback);

    //
    // Register the host keyboard drivers.
    //
    USBHCDRegisterDrivers(0, g_ppHostClassDrivers, g_ui32NumHostClassDrivers);
    USBHCDInit(0, g_pui8HCDPool, HCD_MEMORY_SIZE);
    USBHCDPowerConfigInit(0, USBHCD_VBUS_AUTO_HIGH );

    //
    // Open an instance of the keyboard driver.  The keyboard does not need
    // to be present at this time, this just save a place for it and allows
    // the applications to be notified when a keyboard is present.
    //
    g_psKeyboardInstance = USBHKeyboardOpen(KeyboardCallback, g_pui8Buffer,  KEYBOARD_MEMORY_SIZE);

Regards,

Dhanush

  • Hi,

    Your description is confusing: in title you said you don't get interrupts, while in text you claim getting unexpected ones, from USB.

    Question is: if transitioning from CCS to Keil did you changed the startup file to startup_rmvdk.S? and modified that? (or the originally created)

    Petrei

  • Hi,

    Petrei said:
    Your description is confusing: in title you said you don't get interrupts, while in text you claim getting unexpected ones, from USB.

    Petrei sorry there is mistake in typing. I am not getting interrupt in keil (USB interrupt). But it is working in CCS.

    I am using startup file from TM4c123G (from tiva example). I am getting interrupt of systick but i am not getting interrupt of USB.

    Why same code is working on CCS but not in Keil.

    Regards,

    Dhanush

  • Hi, 

    Then analyze your Keil files - from .map file find out the address of USB interrupt function and in .bin file check out the vector table to have the USB interrupt vector filled up with the address from the .map file + 1. The .bin file can be inspected with some tools - "dump" if you use Linux/Unix or hex viewers in Win (or best of all Total Commander).

    Petrei