diff options
author | Josh Blum <josh@joshknows.com> | 2010-05-13 22:49:42 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-05-13 22:49:42 +0000 |
commit | bb3c5d65561bbd720085d8c0bac2ac5cb978773e (patch) | |
tree | 2617eee6a913442b1bdb1765b34387273aade705 /host/apps/omap_debug | |
parent | d4a75cef3ed64a305b8c4ef3001ed34c9d47d287 (diff) | |
download | uhd-bb3c5d65561bbd720085d8c0bac2ac5cb978773e.tar.gz uhd-bb3c5d65561bbd720085d8c0bac2ac5cb978773e.tar.bz2 uhd-bb3c5d65561bbd720085d8c0bac2ac5cb978773e.zip |
got clock gen config working and tested
Diffstat (limited to 'host/apps/omap_debug')
-rw-r--r-- | host/apps/omap_debug/clkgen-config.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/host/apps/omap_debug/clkgen-config.cc b/host/apps/omap_debug/clkgen-config.cc index 85371c5d1..e8279b4ae 100644 --- a/host/apps/omap_debug/clkgen-config.cc +++ b/host/apps/omap_debug/clkgen-config.cc @@ -50,6 +50,7 @@ static const unsigned int config_data[] = { 0x001704, 0x001807, 0x001900, + //0x001a00,//for debug 0x001a32, 0x001b12, 0x001c44, @@ -117,7 +118,7 @@ static const unsigned int config_data[] = { }; -const unsigned int CLKGEN_SELECT = 127; +const unsigned int CLKGEN_SELECT = 145; enum gpio_direction {IN, OUT}; @@ -238,7 +239,7 @@ spidev::spidev(std::string fname) { int ret; int mode = 0; - int speed = 12000000; + int speed = 12000; int bits = 24; fd = open(fname.c_str(), O_RDWR); @@ -277,9 +278,10 @@ static void send_config_to_clkgen(gpio &chip_select, const unsigned int data[], for (unsigned int i = 0; i < data_size; i++) { - chip_select.set_value(1); - spi.send((char *)&data[i], (char *)&rbuf, 4); + std::cout << "sending " << std::hex << data[i] << std::endl; chip_select.set_value(0); + spi.send((char *)&data[i], (char *)&rbuf, 4); + chip_select.set_value(1); }; } |