This is an old revision of the document!
Table of Contents
Exercise: Making the system robust against disturbances
In the next step, the receiver need to be more robust against errors. An error will occur, if an RSSI is detected, but no packet was transmitted. Another reason for an error could be, if not out transmitter hat transmitted the packet. In these two cases, the receiver will not recognize the sync word an out program will be blocked.
But this is not the only error that could happen: The receiver will wait for the number of bytes, that is written in the length field of the packet. But if, the length field is corrupted, the number of bytes can be larger, than the packet. If this happened the receiver will wait for ever.
Both kind of error can be avoided by timers. In the first case, if no sync work will be received, there will be no date in the FIFO. An also, if the length field is too large, the FIFO becomes empty and will remain empty. Therefore a solution of the problem could be, that after some time, there must be some data in the FIFO. If not, the frame reception can be aborted.
In this lesson, you should control data reception be timers. It is up to you, how timers will be implemented. Timers could be simple implemented by software loops incrementing a variable, by delay functions or be interrupt service routines.
Requirements
This task requires
- a ready BeagleBone Black equipped with the CC1200 operating at a symbol rate of 1.2 kBaude.
- one TI Development Kit for the CC1200.
- Smart RF Studio sending packets with a symbol rate of 1.4 kBaude and a preamble count of 6 Bytes.
Tasks
- the programming is done by extending the source files from the previous lesson Exercise: Scanning the channel and packet reception.
- Extend your program to control packet reception by timers.
- For testing, start your program and use the same test scenarios of Exercise: Scanning the channel and packet reception.
- If an error occurs, your program should continue receiving packets. May be some data will be lost, but receiving continues.
Hints
- Pay attention on the timer values: The time waiting for data within a packet is normally shorter than waiting for the first payload byte. The time waiting for the first payload byte of the packet includes some preamble bits (but maybe not all) and the sync word bits. Whereas the time between two bytes within the packet is exactly 8bit plus some overhead.