This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Questions about DPlib 2p2z in F28M36 device

Other Parts Discussed in Thread: CONTROLSUITE

#include “DPLib.h”

extern volatile float *CNTL_2P2Z_Ref1;
extern volatile float *CNTL_2P2Z_Out1;
extern volatile float *CNTL_2P2Z_Fdbk1;
extern volatile float *CNTL_2P2Z_Coef1;

float Ref , Fdbk , Out;
#pragma DATA_SECTION(CNTL_2P2Z_CoefStruct1, "CNTL_2P2Z_Coef");
struct CNTL_2P2Z_CoefStruct CNTL_2P2Z_CoefStruct1;

DPL_Init();
CNTL_2P2Z_Fdbk1 = &Fdbk;
CNTL_2P2Z_Out1 = &Out;

CNTL_2P2Z_Ref1 = &Ref;
CNTL_2P2Z_Coef1 = &CNTL_2P2Z_CoefStruct1.b2;
CNTL_2P2Z_CoefStruct1.b2 = 0.05;
CNTL_2P2Z_CoefStruct1.b1 = -0.20;
CNTL_2P2Z_CoefStruct1.b0 = 0.20;
CNTL_2P2Z_CoefStruct1.a2 = 0.0;
CNTL_2P2Z_CoefStruct1.a1 = 1.0;
CNTL_2P2Z_CoefStruct1.max =0.7;
CNTL_2P2Z_CoefStruct1.i_min =-0.9;
CNTL_2P2Z_CoefStruct1.min =0.0;
Ref=0.0;
Fdbk=0.0;
Out=0.0;

.include "CNTL_2P2Z.asm"

CNTL_2P2Z_INIT 1 ; CNTL_2P2Z Initialization

CNTL_2P2Z 1 ; Run the CNTL_2P2Z Macro

---------------------------------------------------------------------

My question is the DPLib for F28M36 device is floating point 

1.  is the CNTL_2P2Z_Coef could be any number from - inf to inf ?

2.  is the Ref, Fdbk, Out should use the other device declaration like IQ24 format or

3.  could there parameter ( Ref, Fdbk, Out ) use float  format ? could this number varying from -inf to inf?

  • Tom, 

    The documentation of thew library is 

    at controlSUITE\libs\app_libs\digital_power\f28M35x_v1.1\Doc

    1. Yes you are correct the Coef can be any number , it is noted incorrectly in the library document. 

    2,3. Step 3 shows that the Ref, Fbk and Out need to be float

    Yes they can be any number but library was tested with only  0 to 1, this is not a problem typically as you have pu value due to ADC and PWM. 

    However you can use it for wide range of values.