Questions and discussions about the software that runs on the TD RF module itself.
GuiGeek
 
Posts: 1
Joined: Wed May 24, 2017 12:58 pm

No information about Hall-effect sensor

by GuiGeek Wed May 24, 2017 1:09 pm

Hi,

I want to use Hall Effect sensor on my 1205P, but there is not enough information on doc and firmware sources.

I need especially the input and output bit / port to use the init function located in file "td_halleffect.c".

Thanks
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: No information about Hall-effect sensor

by mstempin Fri Jun 02, 2017 7:41 am

Please find attached 3 source files detailing how to use the Hall sensor in "low power" polling mode. They declare 3 functions:
  • TD_HALLEFFECT_Init: must be called in TD_SUER_Setup() with the 2 GPIOs used for the sensor
  • [*TD_HALLEFFECT_PollingEnable: enables/disable the polling]
  • TD_HALLEFFECT_Process: must be called from TD_User_Loop(). Fetch events and detection duration in order to perform differrent actions based on the duration the magnet is detected

The example td12xx_modem.c file is such an implementation in the standard modem firmware main file. The Hall sensor GPIOs are defined there as:
Code: Select all
#define HALL_COMMAND_PORT gpioPortC
#define HALL_COMMAND_BIT 13
#define HALL_OUT_PORT gpioPortC
#define HALL_OUT_BIT 12
Attachments
td12xx_modem.c
(7.1 KiB) Downloaded 779 times
td_halleffect.c
(8.96 KiB) Downloaded 801 times
td_halleffect.h
(3.77 KiB) Downloaded 800 times
Return to Firmware

Who is online

Users browsing this forum: No registered users and 1 guest