During run time the receiver operates
in the following way:
- The system will begins to
continuously receive incoming data by starting the EPwms and CPU timer to
trigger interrupts.
- Example Program Function:
Start_Receiving();
- The ISRs will run until the full
packet of data is received or the specified timeout is reached.
- The rxMessage[]
buffer will be filled with the received bits while the ISRs are
running
- Once the packet of data is received
or the specified timeout is reached, the system will stop receiving data to
reduce CPU utilization during quiet periods.
- Example Program Function:
Stop_Receiving();
- The function stops the
EPwms and stops and resets the CPU timer
- The received data is then
packetized into the desired format.
- Example Program Function:
Packetize(int message[], int packet[]);
- The function takes the
rxMessage[] buffer containing 33 received bits and fills the
packet[] buffer with three, 11 bit, words by summing up the
received bits for each word. The rxMessage[] buffer contents are
then set to zero.
- +1 equates to a W1
following the specs in Table 4-1
- -1 equates to a W0
following the specs in Table 4-1
- The function sums up the
values of the packet[] and saves the sum to the packet_sum
variable
- +3 equates to a
packet_1 following the specs in Table 4-1
- -3 equates to a
packet_0 following the specs in Table 4-1
- The
packetized data is used before the receive process restarts.
- Example Program Function:
Visual_Indication();
- The function causes the
LEDs on the BOOSTXL-AFE031 to blink accordingly
- Blue LED blinks if
a packet_1 was received
- Red LED blinks if a
packet_0 was received
- Red and Blue LEDs
blink if neither a packet_1 or packet_0 were received, or if a
timeout occurs