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.

MCU-PLUS-SDK-AM243X: Poll junction temperature sensors

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: AM2432

Tool/software:

Hello,

I am trying to implement a minimal way to poll one or more of the junction temperature sensors in the Sitara AM2432 SoC without interrupts or the ESM. I adapted the following from the example project in the SDK (8.6.0.45) however I read a temperature of -41 degrees: the minimum. Is it possible to accomplish what I am trying with only the SDL_VTM interface?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SDL_VTM_configTs cfgTs;
SDL_VTM_intrCtrl ctrl;
SDL_VTM_configVd cfgVd;
SDL_VTM_Stat_read_ctrl readCtrl;
SDL_VTM_Stat_val statusVal;
int32_t tmp;
cfgTs.configTsCtrl = SDL_VTM_VD_CONFIG_CTRL_SET_CTL;
cfgTs.tsCtrl_cfg.valid_map = SDL_VTM_TS_CTRL_MODE_VALID;
cfgTs.tsCtrl_cfg.mode = SDL_VTM_TS_CTRL_CONTINUOUS_MODE;
SDL_VTM_initTs(SDL_VTM_INSTANCE_TS_0 , &cfgTs);
cfgVd.configVdCtrl = SDL_VTM_VD_CONFIG_CTRL_EVT_SEL;
cfgVd.vd_temp_evts = SDL_VTM_VD_EVT_SELECT_TEMP_SENSOR_0;
SDL_VTM_initVd(SDL_VTM_INSTANCE_VD_DOMAIN_0, &cfgVd);
readCtrl = SDL_VTM_TS_READ_DATA_OUT_VAL;
SDL_VTM_getSensorStatus(SDL_VTM_INSTANCE_TS_0, &readCtrl, &statusVal);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello Joshua,

    I am looking at your queries and you may expect reply in one or two days .

    Regards,

    Anil.

  • Hello Joshua,

    The above code seems works .

    Can you please share the temperature register value for the Temparture sensor 0 ?

    Here, the issues come in two ways. One with the conversion from adc to temperature API is giving wrong values. 

    And, the second one, we need to give a delay or poll the end of conversion bit status before reading data which ensures proper ADC data.

    Regards,

    Anil.

  • Hi there, sorry for the late response!

    The code is working now, I needed to initialize the SDL via the SDL_DPL_init() routine with the AddrTranslateP_getLocalAddr() function registered as the DPL interface's addrTranslate() callback.