Hi NXP Community,
I am working with MC33772 ADC2 current. Debug situation is injecting 390A current under room temperature and ADC_CFG is initialized by 0x093F. I found that MC33772 gain became 256 occasionally when using GPIO5-6 as inputs to the current sensor PGA with entering into diagonostic mode although gain is set fix 16. As below is procedures of entering into diagnostic mode. Is it correct? what is root cause why MC33772 gain became 256? Looking forward to your reply.
Hi Sylvia,
please refer to the section 9.6, page 37. in the MC33772C datasheet. The PGA gain can set to fixed gain in the ADC_CFG register, address 0x06, bits [10:8] PGA_GAIN.
With Best Regards,
Jozef
Hi @JozefKozon ,
Really appreciate for your reply. Issue is that Gain has been out of control and became 256 although gain is set to fixed value 16 during initialization. I don't understand why fixed gain became 256 (ADC_CFG bits [10:8]=011) ?
Hi Sylvia,
please confirm, that the MC33772C is not in sleep mode. In Sleep mode, the PGA gain is constantly equal to 256. This could be a reason why the fixed gain became 256.
With Best Regards,
Jozef
Hi @JozefKozon
Thanks for your reply. I am sure that MC33772 is not in sleep mode. I never SPI to SYS_CFG_GLOBAL to go to sleep mode. I found that fixed gain becoming 256 ocurred only when enable isense adc in diag mode. As below is procedures of entering into diag mode. Looking forward to your reply.
Hi Sylvia,
please refer to the section 10.1 in the MC33772C datasheet. According to the datasheet, each message must consists of 48 bits. Do you have a logic analyzer or an oscilloscope? I have tested my FRDM33772CSPIEVB+S32K144 EVB. Each message consists of 48bit. Could you please check it and please share the scope?
With Best Regards,
Jozef
Hi @JozefKozon
Really appreciate for your promt reply. It is MC33772B which spi command I used is correct. I have already fetch correct isense adc successfully. Fix gain 16 becoming 256 always occurrs in diag mode. Please help to make sure that procedures of adc by gpio56 in diag mode is corrrect. Looking forward to your reply.
Best Regards
Sylvia
Hi Sylvia,
I have checked the piece of code you have shared and it is correct. I see you have set I_MEAS_EN bit to 1, in SYS_CFG1 register $03, which is needed to be able to read the PGA_GAIN_S value.
Could you please share the code line, how you set the PGA_GAIN to fixed value? And also the code line how you recognize the PGA_GAIN value? I presume you set the PGA_GAIN in the ADC_CFG register $06 and you also check the PGA_GAIN in the same ADC_CFG register $06? Please share the reading value of the ADC_CFG register $06.
With Best Regards,
Jozef