Re: Floating point calculations on 16 uC
- From: "Richard" <nospam@xxxxxxxxxx>
- Date: Sun, 28 Aug 2005 12:34:24 GMT
"db" <dbahlmann@xxxxxxxxx> wrote in message
news:1125220291.973553.315000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I'm doing floating point calculations on a Fujitsu MB90F474 16bit uC.
> All float calculations are done in the main loop context. Sometimes the
> result returns a garbage value. This seems to happen only when
> interrupts are enabled. Note that there are no globals or shared data
> involved.
>
> If anyone has had similar problems please let me know. Any advice when
> using floating point calculations would be appreciated.
>
> Regards
> Dieter
>
Either:
1: The interrupt routine is corrupting data, which happens to be where the
floating point math routines store values.
2: Your stack is too small. Including floating point values in your main
loop will increase stack usage somewhat.
3: Your floating point library is not re-entrant and you are using float
variables within the ISR.
Most likely it's number 2. Should not be number 3 as it's not a good idea
to use float values in an ISR anyway.
Regards,
Richard.
http://www.FreeRTOS.org
.
- Follow-Ups:
- References:
- Floating point calculations on 16 uC
- From: db
- Floating point calculations on 16 uC
- Prev by Date: Re: Normal 4-pin USB to USB-OTG?
- Next by Date: Re: Slow data rate FT245BM to PC
- Previous by thread: Re: Floating point calculations on 16 uC
- Next by thread: Re: Floating point calculations on 16 uC
- Index(es):
Relevant Pages
|