ACS board now working #98

Merged
meierj merged 8 commits from mueller/acs-board-working into develop 2021-09-23 16:03:11 +02:00
3 changed files with 11 additions and 8 deletions
Showing only changes of commit 0ccf062d51 - Show all commits

View File

@ -442,7 +442,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev, SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED); MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF, auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF,
spiCookie, 0); spiCookie, spi::LIS3_TRANSITION_DELAY);
mgmLis3Handler->setStartUpImmediately(); mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1 #if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true); mgmLis3Handler->setToGoToNormalMode(true);
@ -451,7 +451,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED); RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF, auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF,
spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_A); spiCookie, spi::RM3100_TRANSITION_DELAY);
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1 #if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true); mgmRm3100Handler->setToGoToNormalMode(true);
@ -460,7 +460,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED); MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler2 = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF, auto mgmLis3Handler2 = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF,
spiCookie, 0); spiCookie, spi::LIS3_TRANSITION_DELAY);
mgmLis3Handler2->setStartUpImmediately(); mgmLis3Handler2->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1 #if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler2->setToGoToNormalMode(true); mgmLis3Handler2->setToGoToNormalMode(true);
@ -469,7 +469,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev, spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED); RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF, mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF,
spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_B); spiCookie, spi::RM3100_TRANSITION_DELAY);
mgmRm3100Handler->setStartUpImmediately(); mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1 #if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true); mgmRm3100Handler->setToGoToNormalMode(true);
@ -487,7 +487,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED); L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF, auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0); spiCookie, spi::L3G_TRANSITION_DELAY);
gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1 #if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true); gyroL3gHandler->setToGoToNormalMode(true);
@ -503,7 +503,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev, spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED); L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF, gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0); spiCookie, spi::L3G_TRANSITION_DELAY);
gyroL3gHandler->setStartUpImmediately(); gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1 #if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true); gyroL3gHandler->setToGoToNormalMode(true);

View File

@ -10,14 +10,17 @@
*/ */
namespace spi { namespace spi {
/* Default values, changing them is not supported for now */ // Default values, changing them is not supported for now
static constexpr uint32_t DEFAULT_LIS3_SPEED = 976'000; static constexpr uint32_t DEFAULT_LIS3_SPEED = 976'000;
static constexpr uint32_t LIS3_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_LIS3_MODE = spi::SpiModes::MODE_3; static constexpr spi::SpiModes DEFAULT_LIS3_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_RM3100_SPEED = 976'000; static constexpr uint32_t DEFAULT_RM3100_SPEED = 976'000;
static constexpr uint32_t RM3100_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_RM3100_MODE = spi::SpiModes::MODE_3; static constexpr spi::SpiModes DEFAULT_RM3100_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_L3G_SPEED = 976'000; static constexpr uint32_t DEFAULT_L3G_SPEED = 976'000;
static constexpr uint32_t L3G_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3; static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 3'900'000; static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 3'900'000;

2
fsfw

@ -1 +1 @@
Subproject commit 29c74283f117bb68186d1161896d82e3361680c2 Subproject commit c9b343ebcd92de1d214a9b1d7abafee4a7e79888