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.

TMS320F28374s: Cause of FPU overflow/underflow Interrupt and how to located the which instruction caused the interrupt

Part Number: TMS320F28374S

Hi Team,

  My customer used TMS320F28374s as main controller, during their usage, the INT12.y reported FPU_OVERFLOW or FPU_UNDERFLOW interrupt.

  Could you kindly show the what caused the interrupt? and also could you kindly show the way to located which instruction caused the interrupt? 

  Customer have tried to using assemble code to get into the ISR and restored the XARn registers, but still cannot located the instruction(PC pointer).

  Expect for your reply, thanks.

  • Hi Benjamin,

    One way to get this is to take it from the stack. If you set a break-point at the top of the ISR and look at the SP register, you should be able to go down the stack a few addresses and find the return program address which was pushed when the interrupt was taken. It should be 14 words (i.e. 7 x 32-bit words) down from SP, but depending on your code and compiler settings your ISR may have pushed other data onto the stack before you hit the break-point, so it might be 16 or more words down.

    Open a memory browser to view the stack memory and count back from SP. You should see a feasible address there, then locate the code line in the disassembly window.

    Regards,

    Richard
  • Hi Richard,

      Update the customer's feedback, could you kindly help to point out which value should be the right value to located the cause of FPU interrupt?

    Thanks a lot.

    Best Regards

    BenjaminFPU SP Stack _From Customer.docx

  • Benjamin,

    I don't see the interrupt break-point.  Did he write a separate ISR and just place a BP inside?  If not, the compiler may push other stuff on the stack so the return address is going to be further down, as I said.  

    Open a dis-assembly window to see what's being pushed in the ISR.  The return address should be 7 32-bit words down, plus that number of pushes.  Based on your screen-shot I'd say the likely return address is either 0xC010 or 0x9 87C2.  

    BTW, it's a lot easier to see the addresses if you set the memory browser window to display the stack as 32-bit hex values.

    Regards,

    Richard

  • Richard,
    Very appreciated for your kindly support.
    Seems the customer used the solution you provided which help to find the right PC pointer.

    Best Regards
    Benjamin
  • Benjamin,

    Glad the post was helpful. Thank you for letting me know.

    Regards,

    Richard