rtd debugging, changed spi modes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Markus Koller 2021-10-19 19:19:57 +02:00
parent 811fe96557
commit 3144514338
4 changed files with 63 additions and 50 deletions

View File

@ -270,6 +270,7 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
spi::DEFAULT_MAX_1227_SPEED); spi::DEFAULT_MAX_1227_SPEED);
RadiationSensorHandler* radsensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF, spiCookieRadSensor); RadiationSensorHandler* radsensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF, spiCookieRadSensor);
radsensor->setStartUpImmediately(); radsensor->setStartUpImmediately();
static_cast<void>(radsensor);
} }
void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComIF* spiComIF) { void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComIF* spiComIF) {
@ -694,45 +695,45 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) {
gpioComIF->addGpios(rtdGpioCookie); gpioComIF->addGpios(rtdGpioCookie);
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC_3, gpioIds::RTD_IC_3, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC_3, gpioIds::RTD_IC_3, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC_4, gpioIds::RTD_IC_4, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC_4, gpioIds::RTD_IC_4, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC_5, gpioIds::RTD_IC_5, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC_5, gpioIds::RTD_IC_5, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC_6, gpioIds::RTD_IC_6, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC_6, gpioIds::RTD_IC_6, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC_7, gpioIds::RTD_IC_7, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC_7, gpioIds::RTD_IC_7, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC_8, gpioIds::RTD_IC_8, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC_8, gpioIds::RTD_IC_8, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC_9, gpioIds::RTD_IC_9, q7s::SPI_DEFAULT_DEV, SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC_9, gpioIds::RTD_IC_9, q7s::SPI_DEFAULT_DEV,
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC_10, gpioIds::RTD_IC_10, SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC_10, gpioIds::RTD_IC_10,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC_11, gpioIds::RTD_IC_11, SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC_11, gpioIds::RTD_IC_11,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC_12, gpioIds::RTD_IC_12, SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC_12, gpioIds::RTD_IC_12,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC_13, gpioIds::RTD_IC_13, SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC_13, gpioIds::RTD_IC_13,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC_14, gpioIds::RTD_IC_14, SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC_14, gpioIds::RTD_IC_14,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC_15, gpioIds::RTD_IC_15, SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC_15, gpioIds::RTD_IC_15,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc16 = new SpiCookie(addresses::RTD_IC_16, gpioIds::RTD_IC_16, SpiCookie* spiRtdIc16 = new SpiCookie(addresses::RTD_IC_16, gpioIds::RTD_IC_16,
std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE,
spi::SpiModes::MODE_1, spi::RTD_SPEED); spi::RTD_MODE, spi::RTD_SPEED);
SpiCookie* spiRtdIc17 = new SpiCookie(addresses::RTD_IC_17, gpioIds::RTD_IC_17, SpiCookie* spiRtdIc17 = new SpiCookie(addresses::RTD_IC_17, gpioIds::RTD_IC_17,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
SpiCookie* spiRtdIc18 = new SpiCookie(addresses::RTD_IC_18, gpioIds::RTD_IC_18, SpiCookie* spiRtdIc18 = new SpiCookie(addresses::RTD_IC_18, gpioIds::RTD_IC_18,
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE,
spi::RTD_SPEED); spi::RTD_SPEED);
Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC_3, objects::SPI_COM_IF, Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC_3, objects::SPI_COM_IF,

View File

@ -35,6 +35,17 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */ /** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW); spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1",
// gpio::OUT, gpio::LOW);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
// /** Setting mux bit 2 to low disables IC1 on the TCS board */
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::HIGH);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
// /** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
// spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW);
// spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
/** The following gpios can take arbitrary initial values */ /** The following gpios can take arbitrary initial values */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW); spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);

View File

@ -33,6 +33,7 @@ static constexpr uint32_t RW_SPEED = 300'000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0; static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
static constexpr uint32_t RTD_SPEED = 2'000'000; static constexpr uint32_t RTD_SPEED = 2'000'000;
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
} }

View File

@ -439,8 +439,8 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
#endif #endif
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
bool enableAside = true; bool enableAside = false;
bool enableBside = false; bool enableBside = true;
if(enableAside) { if(enableAside) {
// A side // A side
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
@ -500,39 +500,39 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::SEND_READ); DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.85, thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * 0.85,
DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
//
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.25,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.6,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.75,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.85,
// DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0, // thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.25, // thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.3,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.6, // thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.75, // thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.75,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER, length * 0.85, // thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.85,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
//
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); // DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.3, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.35,
DeviceHandlerIF::SEND_WRITE); // DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.6, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::GET_WRITE); // DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.75, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.75,
DeviceHandlerIF::SEND_READ); // DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER, length * 0.85, // thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.85,
DeviceHandlerIF::GET_READ); // DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.35,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.75,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.85,
DeviceHandlerIF::GET_READ);
} }
#endif /* OBSW_ADD_ACS_BOARD == 1 */ #endif /* OBSW_ADD_ACS_BOARD == 1 */