Revision 45d8240f host/lib/usrp/usrp1/mboard_impl.cpp
| b/host/lib/usrp/usrp1/mboard_impl.cpp | ||
|---|---|---|
| 168 | 168 |
boost::bind(&usrp1_impl::mboard_get, this, _1, _2), |
| 169 | 169 |
boost::bind(&usrp1_impl::mboard_set, this, _1, _2)); |
| 170 | 170 |
|
| 171 |
/* |
|
| 172 |
* Basic initialization |
|
| 173 |
*/ |
|
| 174 |
_iface->poke32( 13, 0x00000000); //FR_MODE |
|
| 175 |
_iface->poke32( 14, 0x00000000); //FR_DEBUG_EN |
|
| 176 |
_iface->poke32( 1, 0x00000001); //FR_RX_SAMPLE_RATE_DEV |
|
| 177 |
_iface->poke32( 0, 0x00000003); //FR_TX_SAMPLE_RATE_DEV |
|
| 178 |
_iface->poke32( 15, 0x0000000f); //FR_DC_OFFSET_CL_EN |
|
| 179 |
|
|
| 180 |
/* |
|
| 181 |
* Reset codecs |
|
| 182 |
*/ |
|
| 183 |
_iface->poke32( 16, 0x00000000); //FR_ADC_OFFSET_0 |
|
| 184 |
_iface->poke32( 17, 0x00000000); //FR_ADC_OFFSET_1 |
|
| 185 |
_iface->poke32( 18, 0x00000000); //FR_ADC_OFFSET_2 |
|
| 186 |
_iface->poke32( 19, 0x00000000); //FR_ADC_OFFSET_3 |
|
| 187 |
|
|
| 188 |
/* |
|
| 189 |
* Reset GPIO masks |
|
| 190 |
*/ |
|
| 191 |
_iface->poke32( 6, 0xffff0000); //FR_OE_1 |
|
| 192 |
_iface->poke32( 10, 0xffff0000); //FR_IO_1 |
|
| 193 |
_iface->poke32( 8, 0xffff0000); //FR_OE_3 |
|
| 194 |
_iface->poke32( 12, 0xffff0000); //FR_IO_3 |
|
| 195 |
|
|
| 196 |
/* |
|
| 197 |
* Disable ATR masks and reset state registers |
|
| 198 |
*/ |
|
| 199 |
_iface->poke32( 23, 0x00000000); //FR_ATR_MASK_1 |
|
| 200 |
_iface->poke32( 24, 0x00000000); //FR_ATR_TXVAL_1 |
|
| 201 |
_iface->poke32( 25, 0x00000000); //FR_ATR_RXVAL_1 |
|
| 202 |
_iface->poke32( 29, 0x00000000); //FR_ATR_MASK_3 |
|
| 203 |
_iface->poke32( 30, 0x00000000); //FR_ATR_TXVAL_3 |
|
| 204 |
_iface->poke32( 31, 0x00000000); //FR_ATR_RXVAL_3 |
|
| 205 |
|
|
| 206 |
/* |
|
| 207 |
* Set defaults for RX format, decimation, and mux |
|
| 208 |
*/ |
|
| 209 |
_iface->poke32( 49, 0x00000300); //FR_RX_FORMAT |
|
| 210 |
_iface->poke32( 38, 0x000e4e41); //FR_RX_MUX |
|
| 211 |
|
|
| 212 |
/* |
|
| 213 |
* Set defaults for TX format, interpolation, and mux |
|
| 214 |
*/ |
|
| 215 |
_iface->poke32( 48, 0x00000000); //FR_TX_FORMAT |
|
| 216 |
_iface->poke32( 39, 0x00000981); //FR_TX_MUX |
|
| 217 |
|
|
| 218 |
/* |
|
| 219 |
* Reset DDC registers |
|
| 220 |
*/ |
|
| 221 |
_iface->poke32( 34, 0x00000000); //FR_RX_FREQ_0 |
|
| 222 |
_iface->poke32( 44, 0x00000000); //FR_RX_PHASE_0 |
|
| 223 |
_iface->poke32( 35, 0x00000000); //FR_RX_FREQ_1 |
|
| 224 |
_iface->poke32( 45, 0x00000000); //FR_RX_PHASE_1 |
|
| 225 |
_iface->poke32( 36, 0x00000000); //FR_RX_FREQ_2 |
|
| 226 |
_iface->poke32( 46, 0x00000000); //FR_RX_PHASE_2 |
|
| 227 |
_iface->poke32( 37, 0x00000000); //FR_RX_FREQ_3 |
|
| 228 |
_iface->poke32( 47, 0x00000000); //FR_RX_PHASE_3 |
|
| 229 |
|
|
| 171 |
// Normal mode with no loopback or Rx counting |
|
| 172 |
_iface->poke32(FR_MODE, 0x00000000); |
|
| 173 |
_iface->poke32(FR_DEBUG_EN, 0x00000000); |
|
| 174 |
_iface->poke32(FR_RX_SAMPLE_RATE_DIV, 0x00000001); |
|
| 175 |
_iface->poke32(FR_TX_SAMPLE_RATE_DIV, 0x00000003); |
|
| 176 |
_iface->poke32(FR_DC_OFFSET_CL_EN, 0x0000000f); |
|
| 177 |
|
|
| 178 |
// Reset offset correction registers |
|
| 179 |
_iface->poke32(FR_ADC_OFFSET_0, 0x00000000); |
|
| 180 |
_iface->poke32(FR_ADC_OFFSET_1, 0x00000000); |
|
| 181 |
_iface->poke32(FR_ADC_OFFSET_2, 0x00000000); |
|
| 182 |
_iface->poke32(FR_ADC_OFFSET_3, 0x00000000); |
|
| 183 |
|
|
| 184 |
// Set default for RX format to 16-bit I&Q and no half-band filter bypass |
|
| 185 |
_iface->poke32(FR_RX_FORMAT, 0x00000300); |
|
| 186 |
|
|
| 187 |
// Set default for TX format to 16-bit I&Q |
|
| 188 |
_iface->poke32(FR_TX_FORMAT, 0x00000000); |
|
| 230 | 189 |
} |
| 231 | 190 |
|
| 232 | 191 |
void usrp1_impl::issue_stream_cmd(const stream_cmd_t &stream_cmd) |
Also available in: Unified diff