Hello,
I reviewed the sample and verified that the formula I implemented is working correctly.
TSENS_CODE(T)B can be reduced to VTSENS(T)VBG_CODE(TLOW)/VBG_CODE(T) thereby eliminating the need to sample for VREF.
The problem is the TSENSE low constant stored at FFFEC000. I get a value which appears incorrect. The high constant and bandgap values appear correct.
My values:
FFFEC000(TSENS_TCCR0) -> $DD615627 which corresponds to: 150C with TSENS_CODE(THIGH) of $1D61 and -40C with TSENS_CODE(TLOW) of $1627.
FFFEC004(TSENS_TCCR1) -> $0F7FXXXX which is $F7F for VBG_CODE(TLOW)
Your values:
FFFEC000(TSENS_TCCR0) -> $9C891541 which corresponds to: 145C with TSENS_CODE(THIGH) of $1C89 and 25C with TSENS_CODE(TLOW) of $1541.
FFFEC004(TSENS_TCCR1) -> $0FAAXXXX which is $FAA for VBG_CODE(TLOW)
The value you read for TLOW is $1541 for 25C. I read $1627 for -40C. This is impossible! The lower the temperature, the lower the voltage not higher. I believe the value you are reading is correct. The value I am reading is clearly wrong. Where there chips with incorrect TLOW temperature constant manufactured for STM?
I am using a discovery board made by STMicro called SPC564A-DISC containing an SPC564A70L7 chip. The specs on the chip are 150Mhz, 150C to -40C, 1.5MB Flash and 128KB SRAM. Otherwise it is the same as a MPC5644A. Freescale’s and STM’s reference manuals are equivalent for the eQADC and temperature sensor sections.
We are in the process of producing the first 5 vehicle controllers using an SPC5644AMLU1 chip. I hope that chip contains correct TSENSE constants. I will adjust my code to handle the faulty SPC564A70L7 chip.
For now, my query has been answered
Thanks,
William A Troy Jr
DHTE