AnsweredAssumed Answered

bare metal usb host msd integration

Question asked by vikash kuamr on Apr 19, 2017
Latest reply on Aug 31, 2017 by Neil Porven

Hello All,


I am working on bare metal usb host(msd) integration in TWR-K21F210MA board. On tower is working fine,but when i am integrating the same code with my original work space,i am getting an error in vector interrupt setting. 

void * INT_SYS_InstallHandler(IRQn_Type irqNumber, void (*handler)(void))
#if (defined(__CC_ARM))
    extern uint32_t Image$$VECTOR_RAM$$Base[];
    #define __VECTOR_RAM Image$$VECTOR_RAM$$Base
    extern uint32_t __VECTOR_RAM[];


    /* Check IRQ number */
    assert(FSL_FEATURE_INTERRUPT_IRQ_MIN <= irqNumber);
    assert(irqNumber <= FSL_FEATURE_INTERRUPT_IRQ_MAX);


    /* Check whether there is vector table in RAM */
    assert(__VECTOR_RAM != 0U);
    /* Save the former handler pointer */
    void * retVal = (void *)__VECTOR_RAM[irqNumber + 16];


    /* Set handler into vector table */
    __VECTOR_RAM[irqNumber + 16] = (uint32_t)handler;    // here i am getting hard fault error.


    return retVal;


I am looking for solution.

Thank you