21.4.1.7.1 Short PWM Code (SPC) Support
Short PWM Code can be implemented with user software using Synchronous mode. SPC allows bidirectional communication, such as allowing the receiver to request a message frame from the transmitter, change modes or to calibrate a sensor.
The SPC pulse is an active-low pulse initiated by the receiver. Since the module does not provide hardware functionality for the detection of SPC pulses, the application will need to detect the SPC pulses on the SENT data pin.
- Poll the data pin using the PORTx register associated with the pin
- Enable an input capture peripheral that is multiplexed on the SENT data pin
- Enable a Change Notification (CN) input or a comparator that is multiplexed on the SENT data pin
After an SPC pulse is found, the application disables any peripherals associated with SPC pulse detection, then initiates a SENT transmission by setting the SYNCTXEN bit.