Questions and discussions about the SDK tools used to program the TD RF modules.
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Remote serial console

by lcheminade Fri Jun 12, 2015 7:58 am

It is possible to use the LAN feature of a TD12xx to obtain a remote serial console. This can be useful to debug a product with no serial access or when the serial port is already being used for an other application. Please note that this will not work if you already use the LAN feature for your application.

You will need a TD12xx EVB to work as a receiver. Use EnergyAware Commander to load the appropriate rf_debug_receiver binary file in your EVB, plug your ftdi cable then open your serial terminal at 115200.

Then add the rf_debug.c and rf_debug.h files into your project. You just need to init the feature in UserSetup by calling:

RF_Debug_Init(869000000, 14);

Then any call to the rf_printf function will generate an output on the remote serial. For example:

rf_printf("This is great %d!\r\n",42); //not to be called in interrupt context


Each call to rf_printf will require 27ms if the length of the string is less than 17 bytes. For longer string it will require 27ms per 17 bytes packets (ie for a 25 bytes string you will need 3*27ms). Please keep this in mind to optimize latency.


Receiver source code is rf_debug_receiver.c for those willing to customize it.

Enjoy!
Attachments
rf_debug.h
(1.94 KiB) Downloaded 672 times
rf_debug.c
(2.89 KiB) Downloaded 691 times
TD1204_rf_debug_receiver.bin
(33.68 KiB) Downloaded 664 times
rf_debug_receiver.c
(4.77 KiB) Downloaded 726 times
TD1208_rf_debug_receiver.bin
(33.69 KiB) Downloaded 687 times
Return to Tools

Who is online

Users browsing this forum: No registered users and 17 guests