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.

CCS/TMS320F28069M: PIE Illegal ISR when trying to run SYSBIOS on motorware project

Part Number: TMS320F28069M
Other Parts Discussed in Thread: SYSBIOS, MOTORWARE

Tool/software: Code Composer Studio

Hi,

I am trying to add SYSBIOS to an existing project lab that is part of motorware. The lab I am working with is Lab13f.

I have added an RTSC file, added one main task that is doing what the main loop would do in lab13a and added one HWI

with SciA peripheral to be able to have data reception in ISR.

The code compiles but when I ran the code it reaches the following TRAP inside this function:

interrupt void PIE_illegalIsr(void)

I noticed that when I comment out the the foolowing lines :

// pie->ADCINT1 = &motor1_ISR;

// pie->ADCINT2 = &motor2_ISR;

// pie->SCIRXINTA = &sciaRxFifoIsr;

(These lines initialize the interrupt vector table with the 3 interrupts that I am using in the code: 2 ADCs and 1 SCIA interrupt functions)

then the PIE Illegal ISR is eliminated.


The first thing I would like to know is if someone ever tried to do that? I mean use moroware lab with SYSBIOS? Should it work?

My guess is that I will have to change something in the Interrupts to have them work as part of SYSBIOS or do the opposite by

unpluging the ISRs from being handles by SYSBIOS.

 

Can someone please help in trying to figure out how to proceed? I'm clueless.

Are there any code examples of motorware with SYSBIOS?

 

Thanks,

Raphael

  • SYS/BIOS fills the PIE vector table with its Hwi dispatcher, so you need to take care not to overwrite that. You should instead set up Hwis for those interrupts and specify the ISR as the Hwi function. If you don't want the ISRs to be handled by the RTOS (for example, if you were worried about latency added by the dispatcher), you can consider using what SYS/BIOS calls "zero-latency" interrupts. You can look into them in the SYS/BIOS documentation (look for zeroLatencyIERMask in the Hwi module and the Hwi_plug() function).

    We don't provide any examples of MotorWare with SYS/BIOS, but I know of people who have used them together. You may want to try searching E2E and browsing some of the discussions on the subject.

    Whitney

  • Thanks a lot for making it clear now Whitney,

    I will try doing the HWI first (after commenting out the PIE direct accesses) and then

    if it does not work as expected I will look into the zeroLatencyIERMask option in the SYSBIOS documentaion.

    Take Care,

    Raphael

  • Hi again Whitney,

    The problem was indeed overwriting the PIE registers. After removing the direct writes to these registers and making HWI specific for C28XXX devices

    the problem was solved and the interrupts are working as expected even without using the zero latency IER mask.

    Thanks,

    Raphael