Page 1 of 1

Help to find some info in SDK

Posted: Tue Nov 03, 2015 1:15 am
by mbolivar0
Hello all,

I am currently studying the libraries and the code examples provided in the SDK and I have two questions regarding the monitoring of certain events.

1) In the example TD_RF_Module_SDK/examples/sensor/sensor_transmitter/src/sensor_transmitter.c, I understand that the function TD_SENSOR_MonitorTemperature appends a new task in scheduler, has a user callback function and so on, but I cannot find where it sets the pin from which the temperature is read. Is it the ADC0? If this is true, then from which pin does the function TD_SENSOR_MonitorBattery read the battery state? Where are defined these pins?

2) I have seen in several examples this code GPIO_PinOutClear(TIM2_PORT, TIM2_BIT);, but I cannot find the TIM2_PORT and TIM2_BIT definitions anywhere. Where are they? Where I can find the pinout definitions of the device?

3) In file TD_RF_Module_SDK/lib/libtdsensor/src/td_sensor.c line 243, it appears the function TD_MEASURE_TemperatureExtended. I cannot find the implementation of this function in TD_RF_Module_SDK/lib/libtdcore/src/td_measure.c. Where it is supposed to be?

Thanks in advanced,

Miguel

Re: Help to find some info in SDK

Posted: Mon Nov 09, 2015 9:41 am
by mstempin
Hi Miguel,
mbolivar0 wrote:1) In the example TD_RF_Module_SDK/examples/sensor/sensor_transmitter/src/sensor_transmitter.c, I understand that the function TD_SENSOR_MonitorTemperature appends a new task in scheduler, has a user callback function and so on, but I cannot find where it sets the pin from which the temperature is read. Is it the ADC0? If this is true, then from which pin does the function TD_SENSOR_MonitorBattery read the battery state? Where are defined these pins?

The temperature sensor is built into the EFM32 chip itself, and the voltage level is measured internally, both are inputs to the ADC0, please check EFM32G Reference Manual for details.
mbolivar0 wrote:2) I have seen in several examples this code GPIO_PinOutClear(TIM2_PORT, TIM2_BIT);, but I cannot find the TIM2_PORT and TIM2_BIT definitions anywhere. Where are they? Where I can find the pinout definitions of the device?

The module pinout is defined logically inside TD_RF_Module_SDK\lib\libtdcore\inc\td_module.h.
mbolivar0 wrote:3) In file TD_RF_Module_SDK/lib/libtdsensor/src/td_sensor.c line 243, it appears the function TD_MEASURE_TemperatureExtended. I cannot find the implementation of this function in TD_RF_Module_SDK/lib/libtdcore/src/td_measure.c. Where it is supposed to be?

As it is an inline function, it is defined inside TD_RF_Module_SDK\lib\libtdcore\inc\td_measure.h.

Re: Help to find some info in SDK

Posted: Wed Nov 11, 2015 12:07 pm
by mbolivar0
Thanks mstempin for your help!

Miguel.