MM9Z1J638

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MM9Z1J638

685 Views
bjs
Contributor III

I'm working with MM9Z1J638 MCU.

In the demo there is a structure defined for calibration data as below.

 

// --------------------------------------------------------------------
/*! \brief Sets up the next channel for conversion
 
- loads device calibration values (from IFR -> B_COMP_xxx registers)
- loads incremental system calibration values (gainsteps and offsetsteps) 
 
@Param SensorChannelchannel
 */
void CsenseSetupChannel(TYPE_CSENSE_CHANNEL Channel)  {
 
B_COMP_IG4   = IFR_COMP_IG4  + CalibValues.isense.gainsteps;
B_COMP_IG16  = IFR_COMP_IG16 + CalibValues.isense.gainsteps;
B_COMP_IG64  = IFR_COMP_IG64 + CalibValues.isense.gainsteps;
//B_COMP_IG256 = IFR_COMP_IG256+ CalibValues.isense.gainsteps;
B_COMP_TIG4  = IFR_COMP_TIG4;
B_COMP_TIG16 = IFR_COMP_TIG16;
B_COMP_TIG64 = IFR_COMP_TIG64;
B_COMP_TIG256= IFR_COMP_TIG256;
 
// select "window (page)" then write value
B_ACQ_GAIN = GAIN256; 
//B_COMP_IO = CalibValues.isense.offsetsteps;
B_ACQ_GAIN = GAIN64;
B_COMP_IO = CalibValues.isense.offsetsteps / 4;// offset for gain 64 = offset for gain 256 / 4
B_ACQ_GAIN = GAIN16;
//B_COMP_IO = CalibValues.isense.offsetsteps / 16;// offset for gain 16 = offset for gain 256 / 16
B_ACQ_GAIN = GAIN4;
//B_COMP_IO = CalibValues.isense.offsetsteps / 64;// offset for gain 4 = offset for gain 256 / 64
}

 

I can't locate the definition of this structure from the demo code. Where can I get this information? 

bjs_0-1768928933307.png

Regards,

Bruce

 

 

0 Kudos
Reply
1 Reply

543 Views
RafaR
NXP Employee
NXP Employee

Hello bjs

Could you share the name of the demo you're using?

I will be waiting for your response

Have a great day and best of luck.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2296795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMM9Z1J638%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20working%20with%20MM9Z1J638%20MCU.%3C%2FP%3E%3CP%3EIn%20the%20demo%20there%20is%20a%20structure%20defined%20for%20calibration%20data%20as%20below.%3C%2FP%3E%3CBR%20%2F%3E%3CDIV%3E%2F%2F%20--------------------------------------------------------------------%3C%2FDIV%3E%3CDIV%3E%2F*!%20%5Cbrief%20Sets%20up%20the%20next%20channel%20for%20conversion%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E-%20loads%20device%20calibration%20values%20(from%20IFR%20-%26gt%3B%20B_COMP_xxx%20registers)%3C%2FDIV%3E%3CDIV%3E-%20loads%20incremental%20system%20calibration%20values%20(gainsteps%20and%20offsetsteps)%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F197964%22%20target%3D%22_blank%22%3E%40Param%3C%2FA%3E%20SensorChannelchannel%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B*%2F%3C%2FDIV%3E%3CDIV%3Evoid%20CsenseSetupChannel(TYPE_CSENSE_CHANNEL%20Channel)%26nbsp%3B%20%7B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_IG4%26nbsp%3B%20%26nbsp%3B%3D%20IFR_COMP_IG4%26nbsp%3B%20%2B%20CalibValues.isense.gainsteps%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_IG16%26nbsp%3B%20%3D%20IFR_COMP_IG16%20%2B%20CalibValues.isense.gainsteps%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_IG64%26nbsp%3B%20%3D%20IFR_COMP_IG64%20%2B%20CalibValues.isense.gainsteps%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2FB_COMP_IG256%20%3D%20IFR_COMP_IG256%2B%20CalibValues.isense.gainsteps%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_TIG4%26nbsp%3B%20%3D%20IFR_COMP_TIG4%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_TIG16%20%3D%20IFR_COMP_TIG16%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_TIG64%20%3D%20IFR_COMP_TIG64%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_TIG256%3D%20IFR_COMP_TIG256%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2F%20select%20%22window%20(page)%22%20then%20write%20value%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_ACQ_GAIN%20%3D%20GAIN256%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2FB_COMP_IO%20%3D%20CalibValues.isense.offsetsteps%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_ACQ_GAIN%20%3D%20GAIN64%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_COMP_IO%20%3D%20CalibValues.isense.offsetsteps%20%2F%204%3B%2F%2F%20offset%20for%20gain%2064%20%3D%20offset%20for%20gain%20256%20%2F%204%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_ACQ_GAIN%20%3D%20GAIN16%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2FB_COMP_IO%20%3D%20CalibValues.isense.offsetsteps%20%2F%2016%3B%2F%2F%20offset%20for%20gain%2016%20%3D%20offset%20for%20gain%20256%20%2F%2016%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EB_ACQ_GAIN%20%3D%20GAIN4%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%2F%2FB_COMP_IO%20%3D%20CalibValues.isense.offsetsteps%20%2F%2064%3B%2F%2F%20offset%20for%20gain%204%20%3D%20offset%20for%20gain%20256%20%2F%2064%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3EI%20can't%20locate%20the%20definition%20of%20this%20structure%20from%20the%20demo%20code.%20Where%20can%20I%20get%20this%20information%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bjs_0-1768928933307.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22bjs_0-1768928933307.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22bjs_0-1768928933307.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373537iA7398B9E066D0245%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bjs_0-1768928933307.png%22%20alt%3D%22bjs_0-1768928933307.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EBruce%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2300586%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MM9Z1J638%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300586%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20bjs%3C%2FP%3E%0A%3CP%3ECould%20you%20share%20the%20name%20of%20the%20demo%20you're%20using%3F%3C%2FP%3E%0A%3CP%3EI%20will%20be%20waiting%20for%20your%20response%3C%2FP%3E%0A%3CP%3EHave%20a%20great%20day%20and%20best%20of%20luck.%3C%2FP%3E%3C%2FLINGO-BODY%3E