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.

PIE mapping failure

The intterupt generated by the SCI module fails to vector correctly--the control thread vectors to ILLEGAL_ISR(void). On earlier projects this interrupt worked correctly, but I'm at a loss to expalin the failure this time out.

The assembler window shows what I believe is a correct PIE table, errant code has not scribbled across the table. I see in the table the address of the ISR in RAM. The PIE registers PIEIER9 look correct when viewed in CCS6. I can see the PIEACK flag rasied and clears on the one pass through the ILLEGAL_ISR(void).

Any idea what would cause misdirection of an interrupt vector?

DE

  • For the next poor dumb sap who encounters this error . . .

    The problem was caused by the line:

    #pragma CODE_SECTION(sciaRxFifoIsr, "ramfuncs");

    instructing the compiler/linker to move ISR routine(s) into RAM. Apparently the newer versions of the tools--I'm using CCSv6--makes these commands unnecessary and their inclusion WILL SILENTLY AND OBSCURELY BREAK your program's interrupt behavior.

    Four days wasted on a bug that should not occur. The pragma command might be redundant, but should not break the code.

    DE

  • Oops, the pragma statements are necessary, but not sufficient to copy flash sections into RAM. The command:

     MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

    is also needed. Without this line, "dummy code" to unused ISR traps are placed at the RAM locations and interrupts are "serviced" by halting the machine.

    By removing the pragma for the SCI routine, I was without realizing it, running the SCI's ISR from flash. Apparently, at 9600 baud, the flash, even with wait states can manage.

    DE