SPRAC94D September 2018 – March 2022 AFE030 , AFE031 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S
ISRs running at these predetermined frequencies carry out the main functions of the receiver solution. The example program makes use of the C2000's EPwms and CPU timer to trigger necessary interrupts.
An ADC sampling ISR, configured using EPwm1, is set to trigger at the 300 kHz input signal sampling frequency. The ISR function samples the ADC, scales the sampled value, and passes the scaled value to a library function for signal processing.
A bit-decision ISR, configured using EPwm2, is set to trigger at 585.92 Hz. This frequency is as close to the desired 585.9375 Hz the EPwm module could achieve. The ISR function takes the signal processing work of the previous ADC sampling ISR and checks if a mark or space bit has been detected. If a mark or space bit is detected then the detected bit is placed into a received message buffer. Once the message buffer is full, a flag will be set to signify a full packet has been received.
A message timeout ISR, configured using CPU timer 2, is set to trigger if the user specified time limit is reached while receiving. By default this time limit is set to 3 seconds by the RX_MESSAGE_TIMEOUT #define. The timer begins right before the system starts receiving and will reset if a packet is received. If a packet is not received within the specified time limit, the ISR triggers and causes the system to stop receiving.