Measuring a pulse duration in a pulse train was my last week headache with the TD1208 and the not so well documented EFM32. Basically, my objective was to activate a timer on a pulse train to measure the duration of the pulse. This duration was measured about 100uS and occurred at 1 Hz.
My choice was to rise an interrupt on each signal front (raising and falling) and measure the duration between the two first interrupt call. Some reset function ensure we are measuring the low state duration (100uS) not the high state duration (1s). This part will not be described here. The purpose of this post is to describe the main hole I fallen in.
For flashing a TD1204 / TD1208 over J-link you need to use the following commands:
JLinkExe -device EFM32G210F128 -if swd -speed 1000
J-Link> loadbin xxxxx.bin,0
J-Link> r # reset
J-Link> g # go
Total programming time is about 5 seconds. The circuit between the segger connector and the TD is the following one. (do not forget to connect VDD circuit to Segger VTref.
td1204 / j-link cable
TD1204 / Sigfox & GPS
The TD1204 modem firmware is a easy to use solution for sending message to Sigfox network. It starts to be complex when you want to create your own message including the GPS position. The standard firmware returns the satellite NMEA frames in text mode and you have to process it.
To make it simple I built a modification of the standard modem firmware to add an extra command to enrich a message with a GPS coordinate automatically.
When you start developing a GPS solution, you have to deal with energy and for this you have to create a strategy based on what you expect and the size of your battery.
Basically, a GPS is consuming about 25mA when running. An active antenna will consume about 10mA more. The first time you start it, it have to sync with the satellites, get the ephemeris then you can position in 2D then in 3D.
Read more for more information
Telecom Design TD1204 have really limited number of GPIOs available even if it have many pins 🙁 … So you quickly have to use the DB2-DB3 pin that are usually used by SWD port.
If you try to reconfigure directly the Pin, this will not work until you inactivate SWD. For this, you must call first the following functions :
A good way to expand Telecom Design system is to use I2C to connect external devices. As an example I had to add an extra Analog to Digital converter. I’m using a MCP3021Ax device. This I2C chip just return a 10bits value each time you send a READ at the expected address. This post contains the TD1204 code to configure I2C and get the data back
TD1204 / Sigfox & GPS
Telecom Design provides 4 different chips to support SigFox communications. This post details the differences of each of them in term of functionnalities
All are modules are based on a EFM32 / Cortex M3 micro-controler with 128KB flash, 16KB RAM, ultra low power including a Silicon Labs transceiver. The chip is a EFM32G210F128
Read more for details
Sigfox on Raspberry Pi
Based on my sigfox multi-board shield, it is possible to hack sigfox with a raspberry pi. The standard telecom Design firmware allow to use it as a modem. The raspberry Pi just have to send the expected AT commands