|
|
@@ -557,7 +557,9 @@ int lmx_freq_set_main_band_int_mode(void *bar1, double freq, double f_pd) {
|
|
|
lmx2594regs[112-FCAL_ADDR]
|
|
|
};
|
|
|
// Create a header for the LMX2594 with the appropriate number of words
|
|
|
- uint32_t LMX_HEADER = ((0 << 23) | (DeviceIdLmx2594 << 18) | ((sizeof(lmx_change_freq_regs)/4) << 1) | 1);
|
|
|
+ // uint32_t LMX_HEADER = ((0 << 23) | (DeviceIdLmx2594 << 18) | ((sizeof(lmx_change_freq_regs)/4) << 1) | 1);
|
|
|
+ // Create a header for the LMX2594 with the appropriate number of words MOSI 4
|
|
|
+ uint32_t LMX_HEADER = ((ENUM_SPIMODE_4MOSI << 23) | ((sizeof(lmx_change_freq_regs) / 4) << BITP_LMX2594_4MOSI_HEADER) | 1);
|
|
|
uint32_t *ptr = bar1 + LMX_BASE_ADDR;
|
|
|
*ptr = LMX_HEADER;
|
|
|
for (int i = 0; i < sizeof(lmx_change_freq_regs)/4; i++) {
|
|
|
@@ -1292,7 +1294,9 @@ int lmx_freq_set_out_of_band_int_mode(void *bar1, double freq, double f_pd) {
|
|
|
};
|
|
|
|
|
|
// Create a header for the LMX2594 with the appropriate number of words
|
|
|
- uint32_t LMX_HEADER = ((0 << 23) | (DeviceIdLmx2594 << 18) | ((sizeof(lmx_change_freq_regs) / 4) << 1) | 1);
|
|
|
+ // uint32_t LMX_HEADER = ((0 << 23) | (DeviceIdLmx2594 << 18) | ((sizeof(lmx_change_freq_regs) / 4) << 1) | 1);
|
|
|
+ // Create a header for the LMX2594 with the appropriate number of words MOSI 4
|
|
|
+ uint32_t LMX_HEADER = ((ENUM_SPIMODE_4MOSI << 23) | ((sizeof(lmx_change_freq_regs) / 4) << BITP_LMX2594_4MOSI_HEADER) | 1);
|
|
|
uint32_t *ptr = bar1 + LMX_BASE_ADDR;
|
|
|
*ptr = LMX_HEADER;
|
|
|
// Send the data
|
|
|
@@ -1328,6 +1332,9 @@ double lmx_lower_bond_set (double freq, double f_pd) {
|
|
|
int lmx_freq_set(void *bar1, double freq,double f_pd) {
|
|
|
|
|
|
// double f_pd = 175e6;
|
|
|
+ // Set the 4 Mosi mode
|
|
|
+ uint32_t *spi_mode = bar1 +RST_ADDR;
|
|
|
+ *spi_mode = SPI_MODE_4MOSI;
|
|
|
double N_div = 0;
|
|
|
if (freq < 10e6 || freq > 15e9) {
|
|
|
printf("Frequency range is 10 MHz to 15 GHz\n");
|
|
|
@@ -1344,6 +1351,10 @@ int lmx_freq_set(void *bar1, double freq,double f_pd) {
|
|
|
}
|
|
|
// Switch the keys
|
|
|
key_switch(bar1, freq,lmx_freq);
|
|
|
+ usleep(1);
|
|
|
+ // Return the 1 MOSI mode
|
|
|
+ *spi_mode = SPI_MODE_1MOSI;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|