meier/plocMPSoC #188
@ -8,14 +8,12 @@ static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0";
|
||||
|
||||
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
|
||||
|
||||
static constexpr char UART_GNSS_DEV[] = "/dev/ttyUL0";
|
||||
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL2";
|
||||
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL3";
|
||||
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/ttyUL0";
|
||||
|
||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
|
||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
|
||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
|
||||
@ -31,6 +29,8 @@ namespace gpioNames {
|
||||
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_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_2_ENABLE[] = "enable_gyro_2";
|
||||
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_3[] = "enable_rw_3";
|
||||
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 PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
||||
|
@ -51,11 +51,6 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
|
||||
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 */
|
||||
writeBuffer[0] = 0x7E;
|
||||
writeSize = 1;
|
||||
@ -239,10 +234,5 @@ void closeSpi (gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
|
||||
if(mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -474,7 +474,19 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
||||
gpio::LOW);
|
||||
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);
|
||||
|
||||
std::string spiDev = q7s::SPI_DEFAULT_DEV;
|
||||
@ -558,22 +570,14 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
||||
resetArgsGnss0.gnss1 = false;
|
||||
resetArgsGnss0.gpioComIF = gpioComIF;
|
||||
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);
|
||||
uartCookieGps0->setToFlushInput(true);
|
||||
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,
|
||||
uartCookieGps0, debugGps);
|
||||
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
|
||||
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() {
|
||||
@ -842,15 +846,6 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
gpio::LOW);
|
||||
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);
|
||||
|
||||
auto rw1SpiCookie = new SpiCookie(addresses::RW1, gpioIds::CS_RW1, q7s::SPI_RW_DEV,
|
||||
|
@ -27,6 +27,8 @@ enum gpioId_t {
|
||||
|
||||
GNSS_0_NRESET,
|
||||
GNSS_1_NRESET,
|
||||
GNSS_0_ENABLE,
|
||||
GNSS_1_ENABLE,
|
||||
|
||||
GYRO_0_ENABLE,
|
||||
GYRO_2_ENABLE,
|
||||
|
Loading…
Reference in New Issue
Block a user