Mainline:Broadcom Kona/BCM590xx/ADC: Difference between revisions

No edit summary
 
Line 53: Line 53:
* In <code>ADCCTRL1</code>: (these can all be performed in one write)
* In <code>ADCCTRL1</code>: (these can all be performed in one write)
** Set the the <code>RTM_CONVERSION</code> bit to enable RTM mode
** Set the the <code>RTM_CONVERSION</code> bit to enable RTM mode
** Write the channel number to read to the <code>RTM_CHAN</code> offset
** Write the channel number to read to the <code>RTM_CHANN</code> offset
** Write the <code>RTM_START</code> bit to start the RTM read
** Write the <code>RTM_START</code> bit to start the RTM read
* Wait for the <code>ADC_RTM_DATA_READY</code> interrupt.
* Wait for the <code>ADC_RTM_DATA_READY</code> interrupt.
* Perform a standard data read from the RTM ADC channel registers (see [[#Reading the data]]).
* Perform a standard data read from the RTM ADC channel registers (see [[#Reading the ADC data]]).
* Clear the <code>RTM_CONVERSION</code> bit to disable RTM mode.
* Clear the <code>RTM_CONVERSION</code> bit to disable RTM mode.