AnsweredAssumed Answered

ADSP-21262, div by zero corrupts ISR?

Question asked by jyrkipes on Feb 5, 2013
Latest reply on Mar 19, 2013 by jyrkipes

(Not sure, maybe this should be on VisualDSP++ side)

 

Have my custom board with 21262 that I'm debugging via HPUSB-ICE.

 

For unknown reason code goes crazy and when I HALT (Shift-F5) disassembly -windows shows the ISR -area (80000-800FF) being filled with garbage.

 

I assume this initiates due to div by zero as I fixed one function that I knew could have such behaviour.

Fixing this made the crashing significantly less typical.

Being fairly newbie with enviroment, not sure how to dive in and where/how to look for bug.

I don't want to if(arg==0) for all of the unknown divisions as it will take many weeks, there's quite a lot codebase on this project and most of it fairly time critical.

 

How to detect if it was zero div or some other?

 

Typically right after Shift-F5 the program seems to be inside an interrupt that is not used (RTI statement)

I've added breakpoints to IICDI, SOVF, BKP and also all of the interrupts that I'm not using.

Reason being, trying to see when program goes into such area (also via hardware breakpoints).

 

My experience on embedded/dsp comes from "few moons ago" and admit I'm not expert on VDSP++, but kinda tried to look for some trace -feature to see whereabout the program actually was before it fails. No luck.

 

Also, shouldn't emulator jump to IICDI or SOVF if div by zero occurs?

 

Was using original version (5.0.0) of VDSP++, so I created a clone and upgraded that with 10.1 package, but no change.

Reason for upgrade was these anomalies I though might have something to do with my issues:

06000028Incorrect Popping of stacks possible when exiting IRQx/Timer Interrupts with (DB) modifiers.
06000020Indirect jumps or calls followed by Long Word accesses using PM bus ...

 

Anyway, all hints are appreciated

Outcomes