SBAA804 April 2026 ADC168M102R-SEP
The McBSP is programmed as a serial port with the internal sample rate generator (SRG) configured to generate the internal data clock (CLKG), which is used as internal transmit clock (CLKX). The transmitter and receiver are set as 16-bit operation with a one-bit delay after frame synchronization and before the transmission/reception of the first bit of the frame.
The transmit frame-synchronization pulse (FSX) is generated by the SRG, the width of the FSX should be set as one CLKX clock cycle. Depending on whether the polling or interrupt mechanism is used to process the transmission and reception data, the FSX needs to be set as: (1) generated when the transmit register is written or (2) periodically based on the setting of FPER bits in SRGR2 register. Table 4-1 lists the key register settings of McBSP interfacing with the ADC168M102R-SEP using polling or interrupt methodology.
| Register | Setting for Polling Operation | Setting for Interrupt Operation | Comments |
|---|---|---|---|
| SRGR2.bit.CLKSM | 1 | 1 | SRG use LSPCLK as input clock |
| PCR.bit.SCLKME | 0 | 0 | |
| SRGR1.bit.CLKGDV | 9 | 9 | Clock divider |
| PCR.bit.CLKXM | 1 | 1 | CLKX is driven by CLKG |
| RCR1.bit.RWDLEN1 | 2 | 2 | Set as 16-bit operation |
| XCR1.bit.XWDLEN1 | 2 | 2 | |
| RCR2.bit.RDATDLY | 1 | 1 | one-bit delay on data receive and transmit |
| XCR2.bit.XDATDLY | 1 | 1 | |
| PCR.bit.FSXM | 1 | 1 | FSX is driven by CLKG |
| SRGR1.bit.FWID | 0 | 0 | FSX is 1 CLKG cycle width |
| SRGR2.bit.FSGM | 0 | 0 | Different ways to generate FSX |
| SRGR2.bit.FPER | – | 21 | Period between two FSX signal |
| MFFINT.bit.XINT | – | 1 | Enable Tx/Rx interrupt. |
| MFFINT.bit.RINT | – | 1 |
In the sample code, the ADC168M102R-SEP is running with a serial clock of 20 MHz, which is achieved by divide ten from low-speed peripheral clock (LSPCLK). The fixed data rate continuous conversion of ADC168M102R-SEP is realized by using interrupt mechanism to process the data in McBSP, while the ADC168M102R-SEP is configured using polling mechanism to process the data in McBSP, shown as the following lines of code.
|