Merge pull request 'GNSS Update' (#121) from mueller/gnss-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #121
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
Jakob Meier 2022-01-03 08:00:15 +01:00
commit 09db06e8b2
7 changed files with 27 additions and 40 deletions

View File

@ -8,13 +8,11 @@ static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1"; static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3"; static constexpr char UART_GNSS_DEV[] = "/dev/ttyUL0";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL2";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5"; static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL3";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8"; static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL4";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL7";
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0"; static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2"; static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
@ -31,6 +29,8 @@ namespace gpioNames {
static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select"; static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select";
static constexpr char RESET_GNSS_0[] = "reset_gnss_0"; static constexpr char RESET_GNSS_0[] = "reset_gnss_0";
static constexpr char RESET_GNSS_1[] = "reset_gnss_1"; static constexpr char RESET_GNSS_1[] = "reset_gnss_1";
static constexpr char GNSS_0_ENABLE[] = "enable_gnss_0";
static constexpr char GNSS_1_ENABLE[] = "enable_gnss_1";
static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0"; static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2"; static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
static constexpr char HEATER_0[] = "heater0"; static constexpr char HEATER_0[] = "heater0";
@ -54,7 +54,7 @@ namespace gpioNames {
static constexpr char EN_RW_2[] = "enable_rw_2"; static constexpr char EN_RW_2[] = "enable_rw_2";
static constexpr char EN_RW_3[] = "enable_rw_3"; static constexpr char EN_RW_3[] = "enable_rw_3";
static constexpr char EN_RW_4[] = "enable_rw_4"; static constexpr char EN_RW_4[] = "enable_rw_4";
static constexpr char SPI_MUX_SELECT[] = "spi_mux_select"; static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select"; static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0"; static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0"; static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";

View File

@ -51,11 +51,6 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
return result; return result;
} }
/** Disconnect PS SPI peripheral and select AXI SPI core */
if(gpioIF->pullHigh(gpioIds::SPI_MUX) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull spi mux gpio high" << std::endl;
}
/** Sending frame start sign */ /** Sending frame start sign */
writeBuffer[0] = 0x7E; writeBuffer[0] = 0x7E;
writeSize = 1; writeSize = 1;
@ -239,10 +234,5 @@ void closeSpi (gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
if(mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) { if(mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;; sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;;
} }
/** Route SPI interface again to PS SPI peripheral */
if(gpioIF->pullLow(gpioIds::SPI_MUX) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull spi mux gpio low" << std::endl;
}
} }
} }

View File

@ -474,7 +474,19 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
gpio::LOW); gpio::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
// TODO: Add enable pins for GPS as soon as new interface board design is finished // Enable pins for GNSS
consumer.str("");
consumer << "0x" << std::hex << objects::GPS0_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_0_ENABLE, consumer.str(),
gpio::DIR_OUT, gpio::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_ENABLE, gpio);
consumer.str("");
consumer << "0x" << std::hex << objects::GPS1_HANDLER;
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_1_ENABLE, consumer.str(), gpio::DIR_OUT,
gpio::LOW);
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio);
gpioComIF->addGpios(gpioCookieAcsBoard); gpioComIF->addGpios(gpioCookieAcsBoard);
std::string spiDev = q7s::SPI_DEFAULT_DEV; std::string spiDev = q7s::SPI_DEFAULT_DEV;
@ -558,22 +570,14 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
resetArgsGnss0.gnss1 = false; resetArgsGnss0.gnss1 = false;
resetArgsGnss0.gpioComIF = gpioComIF; resetArgsGnss0.gpioComIF = gpioComIF;
resetArgsGnss0.waitPeriodMs = 100; resetArgsGnss0.waitPeriodMs = 100;
auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, q7s::UART_GNSS_0_DEV, auto uartCookieGps0 = new UartCookie(objects::GPS0_HANDLER, q7s::UART_GNSS_DEV,
UartModes::CANONICAL, uart::GNSS_BAUD, uart::HYPERION_GPS_REPLY_MAX_BUFFER); UartModes::CANONICAL, uart::GNSS_BAUD, uart::HYPERION_GPS_REPLY_MAX_BUFFER);
uartCookieGps0->setToFlushInput(true); uartCookieGps0->setToFlushInput(true);
uartCookieGps0->setReadCycles(6); uartCookieGps0->setReadCycles(6);
auto uartCookieGps1 = new UartCookie(objects::GPS1_HANDLER, q7s::UART_GNSS_1_DEV,
UartModes::CANONICAL, uart::GNSS_BAUD, uart::HYPERION_GPS_REPLY_MAX_BUFFER);
uartCookieGps1->setToFlushInput(true);
uartCookieGps1->setReadCycles(6);
auto gpsHandler0 = new GPSHyperionHandler(objects::GPS0_HANDLER, objects::UART_COM_IF, auto gpsHandler0 = new GPSHyperionHandler(objects::GPS0_HANDLER, objects::UART_COM_IF,
uartCookieGps0, debugGps); uartCookieGps0, debugGps);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0); gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
gpsHandler0->setStartUpImmediately(); gpsHandler0->setStartUpImmediately();
auto gpsHandler1 = new GPSHyperionHandler(objects::GPS1_HANDLER, objects::UART_COM_IF,
uartCookieGps1, debugGps);
gpsHandler1->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss1);
gpsHandler1->setStartUpImmediately();
} }
void ObjectFactory::createHeaterComponents() { void ObjectFactory::createHeaterComponents() {
@ -842,15 +846,6 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
gpio::LOW); gpio::LOW);
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio); gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
/**
* This GPIO is only internally connected to the SPI MUX module and responsible to disconnect
* the PS SPI peripheral from the SPI interface and route out the SPI lines of the AXI SPI core.
* Per default the PS SPI is selected (EMIO = 0).
*/
gpio = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_SELECT,
"SPI Reaction Wheel Callback ", gpio::DIR_OUT, gpio::LOW);
gpioCookieRw->addGpio(gpioIds::SPI_MUX, gpio);
gpioComIF->addGpios(gpioCookieRw); gpioComIF->addGpios(gpioCookieRw);
auto rw1SpiCookie = new SpiCookie(addresses::RW1, gpioIds::CS_RW1, q7s::SPI_RW_DEV, auto rw1SpiCookie = new SpiCookie(addresses::RW1, gpioIds::CS_RW1, q7s::SPI_RW_DEV,

2
fsfw

@ -1 +1 @@
Subproject commit b98c85d33fd79853e674f75dadd0a082a962aee4 Subproject commit 2506af27ed84585c64df2679b0c6a3c969f31941

View File

@ -27,6 +27,8 @@ enum gpioId_t {
GNSS_0_NRESET, GNSS_0_NRESET,
GNSS_1_NRESET, GNSS_1_NRESET,
GNSS_0_ENABLE,
GNSS_1_ENABLE,
GYRO_0_ENABLE, GYRO_0_ENABLE,
GYRO_2_ENABLE, GYRO_2_ENABLE,

@ -1 +1 @@
Subproject commit f596c53315f1f81facb28faec3150612a5ad2ca0 Subproject commit 2d10c6b85ea4cab4f4baf1918c51d54eee4202c2

2
tmtc

@ -1 +1 @@
Subproject commit 827738f6efbfbcf32d56397e5c713f136dbd8556 Subproject commit 242c0e48a9bbcb1039dec6a2b6abba52e826870e