...
 
Commits (3)
# Copyright (C) 2018 Amarisoft/LimeMicro
# TRX Makefile for Lime MicroSystems
# Copyright (C) 2017-2020 Amarisoft/LimeMicro
# TRX Makefile for LimeMicro Systems version 2020-04-20
ifeq "$(TARGET)" "ARM"
CC=gcc
CXX=g++
AR=ar
else
CC=gcc #-m64
CXX=g++ -m64
AR=ar
endif
CFLAGS=-O3 -fno-strict-aliasing -Werror-implicit-function-declaration
CFLAGS+=-march=native
CFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CFLAGS+=-MMD -g -Wno-unused-but-set-variable -Wno-unused-result -Wl,--no-undefined
CFLAGS+=-mfpmath=sse --param max-inline-insns-single=10000 --param large-function-growth=10000 --param inline-unit-growth=10000
ifneq "$(TARGET)" "ARM"
CFLAGS+=-DHAVE_SSE -mfpmath=sse
endif
CFLAGS+=--param max-inline-insns-single=10000 --param large-function-growth=10000 --param inline-unit-growth=10000
CXXFLAGS:=-std=c++11
LIBS:=-lLimeSuite
......
/*
* Amarisoft Transceiver API version 2019-09-30
* Copyright (C) 2013-2019 Amarisoft
* Amarisoft Transceiver API version 2020-04-20
* Copyright (C) 2013-2020 Amarisoft
*/
#ifndef TRX_DRIVER_H
#define TRX_DRIVER_H
......
/*
* LimeMicroSystem transceiver driver
* Copyright (C) 2015-2018 Amarisoft/LimeMicroSystems
* Copyright (C) 2015-2020 Amarisoft/LimeMicroSystems
*/
#include <stdlib.h>
#include <stdio.h>
......@@ -333,10 +333,6 @@ static int trx_lms7002m_start(TRXState *s1, const TRXDriverParams *p)
LMS_WriteFPGAReg(s->device,0xCC, s->tdd_trx_switch_mode);
LMS_WriteFPGAReg(s->device,0xCD, s->tdd_trx_switch_dir);
LMS_WriteFPGAReg(s->device,0x17, 0x0011);
uint16_t reg13;
LMS_ReadFPGAReg(s->device,0x13, &reg13);
reg13 &= ~((1<<7)|(1 <<15)|(1<<8)|(1<<14));
LMS_WriteFPGAReg(s->device,0x13, reg13|(s->tdd_tx_en_ctrl<<7)|(s->tdd_tx_en_dir<<14)|(s->tdd_rx_en_ctrl<<8)|(s->tdd_rx_en_dir<<15));
s->tx_channel_count = p->tx_channel_count;
s->rx_channel_count = p->rx_channel_count;
......@@ -433,6 +429,10 @@ static int trx_lms7002m_start(TRXState *s1, const TRXDriverParams *p)
}
}
uint16_t reg13;
LMS_ReadFPGAReg(s->device,0x13, &reg13);
reg13 &= ~((1<<7)|(1 <<15)|(1<<8)|(1<<14));
LMS_WriteFPGAReg(s->device,0x13, reg13 | 0x60);
if (s->calibrate & CALIBRATE_FILTER)
{
for(int ch=0; ch< s->tx_channel_count; ++ch)
......@@ -469,6 +469,7 @@ static int trx_lms7002m_start(TRXState *s1, const TRXDriverParams *p)
fprintf(stderr, "Failed to calibrate Rx\n");
}
}
LMS_WriteFPGAReg(s->device,0x13, reg13|(s->tdd_tx_en_ctrl<<7)|(s->tdd_tx_en_dir<<14)|(s->tdd_rx_en_ctrl<<8)|(s->tdd_rx_en_dir<<15));
LMS_RegisterLogHandler(LogHandler);
printf("Running\n");
return 0;
......