This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

overconsumption when I initialize a float array

I used SDK14.1.0, softdevice s132_nrf52_5.0.0. and IDE Keil

when I run the code below, the microcontroller consumes 7.5 mA if I comment this part it consumes 200μA.

Apart from this overconsumption the system is working properly.

void initialize_offset_pulse(void)
{
extern float OffsefPositivePulse[102];

extern float Pente_100_to_25;
float OffsetPente_100_to_25 = 0;
extern float Pente_25_to_10;
float OffsetPente_25_to_10 = 0;
OffsefPositivePulse[10] = OffsefPositivePulse_10;
OffsefPositivePulse[25] = OffsefPositivePulse_25;
OffsefPositivePulse[55] = OffsefPositivePulse_55;

Pente_100_to_25 = ((OffsefPositivePulse[55]-OffsefPositivePulse[25])/30);
OffsetPente_100_to_25 = OffsefPositivePulse[55] - Pente_100_to_25 * 55 ;

Pente_25_to_10 = ((OffsefPositivePulse[25]-OffsefPositivePulse[10])/15);
OffsetPente_25_to_10 = OffsefPositivePulse[25] - Pente_25_to_10 * 25 ;

for(int i = 90 ; i >= 25 ; i--)
{
OffsefPositivePulse[i] = Pente_100_to_25 * i + OffsetPente_100_to_25;
}
for(int i = 24 ; i >= 0 ; i--)
{
OffsefPositivePulse[i] = Pente_25_to_10 * i + OffsetPente_25_to_10;
}

}

Can you help me please?

thank you

Parents Reply Children
No Data
Related