[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5263 - in gnuradio/branches/developers/matt/u2f: firm
From: |
matt |
Subject: |
[Commit-gnuradio] r5263 - in gnuradio/branches/developers/matt/u2f: firmware top/u2_sim |
Date: |
Wed, 9 May 2007 01:26:52 -0600 (MDT) |
Author: matt
Date: 2007-05-09 01:26:52 -0600 (Wed, 09 May 2007)
New Revision: 5263
Added:
gnuradio/branches/developers/matt/u2f/firmware/build_flash
Removed:
gnuradio/branches/developers/matt/u2f/top/u2_sim/build_flash
Modified:
gnuradio/branches/developers/matt/u2f/firmware/bootstrap.c
gnuradio/branches/developers/matt/u2f/firmware/memory_map.h
Log:
latest firmware tools
Modified: gnuradio/branches/developers/matt/u2f/firmware/bootstrap.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/bootstrap.c 2007-05-09
03:38:56 UTC (rev 5262)
+++ gnuradio/branches/developers/matt/u2f/firmware/bootstrap.c 2007-05-09
07:26:52 UTC (rev 5263)
@@ -7,7 +7,7 @@
spi_init();
spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00004500, 24, 0); // CLK2 drives
distribution
- spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00003D80, 24, 0); // Turn on
output 1, normal levels
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00003D80, 24, 0); // Turn on
output 1 (FPGA CLK), normal levels
spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00004B80, 24, 0); // Bypass divider
spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00005A01, 24, 0); // Update Regs
@@ -29,7 +29,36 @@
*gpio_io_rx = (short) 0xDEAD;
*gpio_io_tx = (short) 0xBEEF;
+
+
+ // Enable ADCs
+ p = (char *)(OUTPUTS_BASE + OUTPUTS_ADC);
+ *p = 0; // Power up and enable outputs
+ // Enable clock to ADCs and DACs
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00003F80, 24, 0); // Turn on
output 3 (DAC CLK), normal levels
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00004180, 24, 0); // Turn on out 5
(ADC clk), CMOS
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00004F80, 24, 0); // Bypass Div #3
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00005380, 24, 0); // Bypass Div #5
+ spi_transact(SPI_TXONLY, SPI_SS_AD9510, 0x00005A01, 24, 0); // Update Regs
+
+ spi_transact(SPI_TXONLY, SPI_SS_AD9777, 0x00000004, 16, 0); // Single-R mode
+ //spi_transact(SPI_TXONLY, SPI_SS_AD9777, 0x00000140, 16, 0); //
+ //spi_transact(SPI_TXONLY, SPI_SS_AD9777, 0x00000301, 16, 0); // PLL =
+ //spi_transact(SPI_TXONLY, SPI_SS_AD9777, 0x00000480, 16, 0); // PLL on,
automatic
+
+ short *dsp_i = (short *)(DSP_BASE+DSP_IAMP);
+ short *dsp_q = (short *)(DSP_BASE+DSP_QAMP);
+ int *dsp_freq = (int *)(DSP_BASE+DSP_FREQ);
+ short *dsp_scale_i = (short *)(DSP_BASE+DSP_ISCALE);
+ short *dsp_scale_q = (short *)(DSP_BASE+DSP_QSCALE);
+
+ *dsp_i = (short) 0x7FFF;
+ *dsp_q = (short) 0x7FFF;
+ *dsp_freq = 0x12345678;
+ *dsp_scale_i = (short) 512;
+ *dsp_scale_q = (short) 123;
+
// Set up DAC
int i = 0;
while(1) {
Copied: gnuradio/branches/developers/matt/u2f/firmware/build_flash (from rev
5255, gnuradio/branches/developers/matt/u2f/top/u2_sim/build_flash)
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/build_flash
(rev 0)
+++ gnuradio/branches/developers/matt/u2f/firmware/build_flash 2007-05-09
07:26:52 UTC (rev 5263)
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Based on original from sybreon
+# Use different form in hexdump to create the flash image
+
+mb-gcc -Wall -O2 -g -mxl-soft-div -mxl-soft-mul -msoft-float -o rom.o $@ && \
+mb-objcopy -O binary rom.o rom.bin && \
+#hexdump -v -e'1/4 "%.8X\n"' rom.bin > ../sim/aeMB.rom && \
+hexdump -v -e'1/1 "%.2X\n"' rom.bin > flash.rom && \
+mb-objdump -DSCs rom.o > rom.dump && \
+#rm rom.bin && \
+#mb-run -tv rom.o 2> rom.run && \
+echo "FLASH ROM generated"
Modified: gnuradio/branches/developers/matt/u2f/firmware/memory_map.h
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/memory_map.h 2007-05-09
03:38:56 UTC (rev 5262)
+++ gnuradio/branches/developers/matt/u2f/firmware/memory_map.h 2007-05-09
07:26:52 UTC (rev 5263)
@@ -10,7 +10,7 @@
/////////////////////////////////////////////////////
// SPI Core. See core docs for more info
-#define SPI_BASE 0x1000 // Base address (16-bit)
+#define SPI_BASE 0x2000 // Base address (16-bit)
// Register address offsets
#define SPI_TXRX0 0x000
@@ -45,24 +45,34 @@
////////////////////////////////////////////////
// I2C
-#define I2C_BASE 0x2000
+#define I2C_BASE 0x4000
////////////////////////////////////////////////
// GPIO
-#define GPIO_BASE 0x3000
+#define GPIO_BASE 0x6000
#define GPIO_DDR 0
#define GPIO_IO 4
#define GPIO_RX 0
#define GPIO_TX 2
-
///////////////////////////////////////////////////
// Basic Outputs
-#define OUTPUTS_BASE 0x4000
+#define OUTPUTS_BASE 0x8000
#define OUTPUTS_CLK 0
#define OUTPUTS_SERDES 1
#define OUTPUTS_ADC 2
#define OUTPUTS_MISC 3
+
+
+///////////////////////////////////////////////////
+// DSP Core
+#define DSP_BASE 0xa000
+
+#define DSP_IAMP 0
+#define DSP_QAMP 2
+#define DSP_FREQ 4
+#define DSP_ISCALE 8
+#define DSP_QSCALE 10
Deleted: gnuradio/branches/developers/matt/u2f/top/u2_sim/build_flash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5263 - in gnuradio/branches/developers/matt/u2f: firmware top/u2_sim,
matt <=