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.

RTOS/TM4C129ENCPDT: TI RTOS crashes on dynamic initialization of I2C and UART peripherals

Part Number: TM4C129ENCPDT

Tool/software: TI-RTOS

Hi, 

I am working on Multi threaded RTOS Enviroment, I am creating static thread for  UART module which worked fine , But when I create dynamic thread for the same module I get a error saying 

Error:E_noIsr.

Same thing happened when I tried with I2C module, It works in POC which is a individual task, But when I integrate it with our Multi threaded  Environment it crashes, 

I believe ISR table is getting corrupted or its not initialized properly, What can we do to make sure ISR is set properly? 

  • Hi Sourabh,

    Are you using the UART module in ti/drivers? The E_noIsr is raised when an interrupt runs but there is no function plugged in. Are you manually setting up the vector table or are you letting TI-RTOS do it? Can you attach your project that has the problem?

    Can you also check you task and system stacks to see if overflowing is occurring. You can look at Tools->ROV->Tasks->Detailed and ROV->Hwi->Module. You'll see the size and peak values. A short-cut is to do ROV->BIOS->Scann for errors. This will tell you if the stacks are blown or if any other state errors are seen. Note: you need to have JTAG connected and the target halted ato have ROV read the target.

    Todd
  • Hi Todd,

    Thanks for the reply
    I am letting TI RTOS to set up the vector table. In our project we use CAN, UART and 12C, Since TI RTOS has library for UART and I2C i am using those lib function to set up the vector table, But for CAN we are manually setting the vector table since there are no lib available.
    So what I observed was if we initialize these UART and I2C before CAN then it works fine, But if we initialize CAN first, then system crashes with E_noIsr error for both. So I assume our CAN initialization is corrupting the Vector table or manipulating the address of vector table

    Thanks
    Sourabh Bunnan
  • Hi Sourabh,

    How are setting up the CAN interrupt? You should use Hwi (not the TivaWare Driverlib interrupt API). You can look at the tirtos_tivac_2_16_01_14\products\tidrivers_tivac_2_16_01_13\packages\ti\drivers\i2c\I2CTiva.c file for an example.

    Todd
  • HI Todd, 

    Thanks again

    I am using this API 

    CANIntRegister(CAN0_BASE, CAN0_HS_IntHandler); 	// use dynamic vector table allocation

    I will try with Hwi as well , But can you tell me why cant i use the API, what is the reason for the ISR table corruption ? 

  • For one thing, the call to CANIntRegister calls IntRegister which, when called the first time, copies the vector table from flash and places it into RAM. It wipes out anything the TI-RTOS kernel has setup. Basically there can only be one manager of the vector table.
  • Hi Todd,

    Thanks for the help