Changeset 9111
- Timestamp:
- 07/31/08 22:18:10
- Files:
-
- usrp2/branches/features/host-ng/firmware/apps/app_common_v2.c (modified) (2 diffs)
- usrp2/branches/features/host-ng/firmware/apps/txrx.c (modified) (2 diffs)
- usrp2/branches/features/host-ng/firmware/lib/dbsm.c (modified) (1 diff)
- usrp2/branches/features/host-ng/firmware/lib/hal_io.c (modified) (1 diff)
- usrp2/branches/features/host-ng/firmware/lib/memory_map.h (modified) (1 diff)
- usrp2/branches/features/host-ng/firmware/lib/u2_init.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
usrp2/branches/features/host-ng/firmware/apps/app_common_v2.c
r9004 r9111 406 406 size_t byte_len = (buffer_pool_status->last_line[bufno] - 3) * 4; 407 407 408 hal_toggle_leds(0x1); 408 //static size_t last_len = 0; 409 410 // hal_toggle_leds(0x1); 409 411 410 412 // inspect rcvd frame and figure out what do do. … … 424 426 default: 425 427 #if 0 428 if (last_len != 0){ 429 if (byte_len != last_len){ 430 printf("Len: %d last: %d\n", byte_len, last_len); 431 } 432 } 433 last_len = byte_len; 434 426 435 if((pkt->thdr.seqno) == exp_seqno){ 427 436 exp_seqno++; usrp2/branches/features/host-ng/firmware/apps/txrx.c
r8656 r9111 261 261 ethernet_init(); 262 262 263 264 #if 0 265 // make bit 15 of Tx gpio's be a s/w output 266 hal_gpio_set_sel(GPIO_TX_BANK, 15, 's'); 267 hal_gpio_set_ddr(GPIO_TX_BANK, 0x8000, 0x8000); 268 #endif 269 270 output_regs->debug_mux_ctrl = 1; 271 #if 0 272 hal_gpio_set_sels(GPIO_TX_BANK, "1111111111111111"); 273 hal_gpio_set_sels(GPIO_RX_BANK, "1111111111111111"); 274 hal_gpio_set_ddr(GPIO_TX_BANK, 0xffff, 0xffff); 275 hal_gpio_set_ddr(GPIO_RX_BANK, 0xffff, 0xffff); 276 #endif 277 278 263 279 // initialize double buffering state machine for ethernet -> DSP Tx 264 280 … … 291 307 dbsm_start(&dsp_tx_sm); 292 308 309 int which = 0; 310 293 311 while(1){ 312 // hal_gpio_write(GPIO_TX_BANK, which, 0x8000); 313 // which ^= 0x8000; 314 294 315 buffer_irq_handler(0); 295 316 usrp2/branches/features/host-ng/firmware/lib/dbsm.c
r8490 r9111 247 247 dsp_tx_regs->clear_state = 1; 248 248 249 // If there's a buffer that's empyting (unlikely), clear it & restartxfer249 // If there's a buffer that's empyting, clear it & flush xfer 250 250 251 251 if (buffer_state[sm->buf0] == BS_EMPTYING){ 252 252 bp_clear_buf(sm->buf0); 253 dbsm_send_from_buf(sm, sm->buf0); 254 } 255 256 if (buffer_state[sm->buf0 ^ 1] == BS_EMPTYING){ 253 dsp_tx_regs->clear_state = 1; // flush partial packet 254 // drop frame in progress on ground. Pretend it finished 255 dbsm_process_helper(sm, sm->buf0); 256 } 257 else if (buffer_state[sm->buf0 ^ 1] == BS_EMPTYING){ 257 258 bp_clear_buf(sm->buf0 ^ 1); 258 dbsm_send_from_buf(sm, sm->buf0 ^ 1); 259 dsp_tx_regs->clear_state = 1; // flush partial packet 260 // drop frame in progress on ground. Pretend it finished 261 dbsm_process_helper(sm, sm->buf0 ^ 1); 259 262 } 260 263 } usrp2/branches/features/host-ng/firmware/lib/hal_io.c
r9004 r9111 133 133 } 134 134 135 int ei = hal_disable_ints();135 //int ei = hal_disable_ints(); 136 136 _gpio_io_shadow = (_gpio_io_shadow & ~mask) | (value & mask); 137 137 gpio_base->io = _gpio_io_shadow; 138 hal_restore_ints(ei);138 //hal_restore_ints(ei); 139 139 } 140 140 usrp2/branches/features/host-ng/firmware/lib/memory_map.h
r9004 r9111 353 353 volatile uint32_t leds; 354 354 volatile uint32_t phy_ctrl; // LSB is reset line to eth phy 355 volatile uint32_t debug_mux_ctrl; 355 356 } output_regs_t; 356 357 usrp2/branches/features/host-ng/firmware/lib/u2_init.c
r9004 r9111 56 56 clocks_init(); 57 57 58 // clocks_enable_test_clk(true); 59 58 60 // Enable ADCs 59 61 output_regs->adc_ctrl = ADC_CTRL_ON;
