Sign in

username:

password:



Not a member?

Search c28x



Search tips

Subscribe to c28x





Discussion Groups

Discussion Groups | TMS320C28x | Re: calculation errors ?

Technical discussions about the TI C28x DSPs (including the C2810, C2811, C2812, F2801, F2806, F2808, F2810,, F2811, F2812, R2811 and R2812).

  

Post a new Thread

Re: calculation errors ? - citron - Feb 7 11:03:00 2006



Hello Christian,

I experience same strange calculation errors :

For exemple this 32 bit integer division fails, 0x1DDDC/0xE000 give me
0xE instead of 0x02

asm
{
move.l 	0x1DDDC,B
move.w 	0xE000,X0 
ASL 	B          ; Shift of dividend required for integer division
BFCLR 	#$0001,SR  ; Clear carry bit: required for 1st DIV instruction
REP 	16			
DIV 	X0,B       ; Form positive quotient in B0
MOVE.W 	B0,Y1      ; Save quotient in Y1	
}
 
I am working with the latest version of CodeWarrior for DSP56800 and
my hardware is a 56F8355.

Maybe my code is wrong anyone can explain me where is the problem ?

thanks

Alexandre
	--- In motoroladsp@moto..., Christian <christian.epp@...> wrote:
>
> Hello everyone
> 
> I am working with CodeWarrior 5.0.5 for DSP56800 and I experience
strange 
> calculation errors : 
> 
> 1. I can\'t use the float library. Most of the time it works 
> perfectly, but once in a while I get strange calculation errors.
> 2. I tried to use integers only, but I get a very similar behaviour. 
> Works most of the time, but once in a while, an 32 bit integer
division fails 
> and returns a too big value.
> 
> Hardware is a 56F807.
> 
> Has anyone experienced something similar ?
> 
> Christian
>
	


(You need to be a member of c28x -- send a blank email to c28x-subscribe@yahoogroups.com )