Commit 372d6ea0 authored by Alessio Igor Bogani's avatar Alessio Igor Bogani
Browse files

Switch to double for coefficients

parent d47b19f2
......@@ -43,34 +43,34 @@ FILENAME : ReadADC.c DESIGN REF: MC18
#define benchmark1
#pragma LOCATION(ScaleA0,0x0000)
#pragma LOCATION(ScaleA1,0x0004)
#pragma LOCATION(ScaleA2,0x0008)
#pragma LOCATION(ScaleA3,0x000c)
#pragma LOCATION(ScaleA4,0x0010)
#pragma LOCATION(ScaleA5,0x0014)
#pragma LOCATION(ADC0,0x0018)
#pragma LOCATION(ADC1,0x001c)
#pragma LOCATION(ADC2,0x0020)
#pragma LOCATION(ADC3,0x0024)
#pragma LOCATION(ADC4,0x0028)
#pragma LOCATION(ADC5,0x002c)
#pragma LOCATION(ADC6,0x0030)
#pragma LOCATION(PRU1FirmRev,0x0034)
#pragma LOCATION(Debug0,0x0038)
#pragma LOCATION(Debug1,0x003c)
#pragma LOCATION(Debug2,0x0040)
#pragma LOCATION(Debug3,0x0044)
#pragma LOCATION(ScaleA1,0x0008)
#pragma LOCATION(ScaleA2,0x0010)
#pragma LOCATION(ScaleA3,0x0018)
#pragma LOCATION(ScaleA4,0x0020)
#pragma LOCATION(ScaleA5,0x0028)
#pragma LOCATION(ADC0,0x002c)
#pragma LOCATION(ADC1,0x0030)
#pragma LOCATION(ADC2,0x0034)
#pragma LOCATION(ADC3,0x0038)
#pragma LOCATION(ADC4,0x003c)
#pragma LOCATION(ADC5,0x0040)
#pragma LOCATION(ADC6,0x0044)
#pragma LOCATION(PRU1FirmRev,0x0048)
#pragma LOCATION(Debug0,0x004c)
#pragma LOCATION(Debug1,0x0050)
#pragma LOCATION(Debug2,0x0054)
#pragma LOCATION(Debug3,0x0058)
//#pragma LOCATION(ff,0x2040)
volatile float ScaleA0;
volatile float ScaleA1;
volatile float ScaleA2;
volatile float ScaleA3;
volatile float ScaleA4;
volatile double ScaleA0;
volatile double ScaleA1;
volatile double ScaleA2;
volatile double ScaleA3;
volatile double ScaleA4;
volatile float ScaleA5; // if needed cubic calibration: OutputCurrent = A0 + A1*avg + A2*avg^2 + A3*avg^3
volatile unsigned int ADC0, ADC1, ADC2, ADC3, ADC4, ADC5, ADC6;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment