Questions and discussions about the software that runs on the TD RF module itself.
mbolivar0
 
Posts: 18
Joined: Tue Oct 20, 2015 11:58 pm

Help to find some info in SDK

by mbolivar0 Tue Nov 03, 2015 1:15 am

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
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: Help to find some info in SDK

by mstempin Mon Nov 09, 2015 9:41 am

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.
mbolivar0
 
Posts: 18
Joined: Tue Oct 20, 2015 11:58 pm

Re: Help to find some info in SDK

by mbolivar0 Wed Nov 11, 2015 12:07 pm

Thanks mstempin for your help!

Miguel.
Return to Firmware

Who is online

Users browsing this forum: No registered users and 26 guests