Setting ADC to Temperature Sensor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Setting ADC to Temperature Sensor

4,061件の閲覧回数
gearhead1107
Contributor IV

I'm trying to set my ADC component to use the S32's internal temperature sensor, however when setting the Input Channel, there's only options for channel AD0 - AD31, however the reference manual (ch38, Chip-specific ADC information) mentions that Vref and temp sensor should also be available. I assume I need to just manually set the ADC to the corresponding value, but is there a way to do it in Processor Expert?

0 件の賞賛
返信
2 返答(返信)

3,508件の閲覧回数
ovidiualexandru
NXP TechSupport
NXP TechSupport

Hi gearhead1107‌,

The temperature sensor of the K144 is not well documented. On newer chip revisions (maskset 0N57U) it's possible that it's not even included on-chip.

In the Reference Manual, on page 1921, "A.39.2 ADC module changes" there is a mention that the Temperature Sensor bullet was removed.

Unfortunately I cannot find any more information about this feature, as it seems it was a preliminary feature on early hardware revisions.

Best regards,

Ovidiu

0 件の賞賛
返信

3,508件の閲覧回数
gearhead1107
Contributor IV

Making progress on this - figured out that you just need to set ADC0 to channel AD26 for temp input. The other options can be found in S32K144_features.h

#define ADC_INPUTCHAN_TEMP ADC_INPUTCHAN_AD26
#define ADC_INPUTCHAN_BANDGAP ADC_INPUTCHAN_AD27
#define ADC_INPUTCHAN_VREFSH ADC_INPUTCHAN_AD29
#define ADC_INPUTCHAN_VREFSL ADC_INPUTCHAN_AD30
#define ADC_INPUTCHAN_DISABLED ADC_INPUTCHAN_AD31

I'm still not 100% sure how to scale the ADC reading to temperature - so if someone could help there it would be great!