add temp read for ext clocked mode
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-02-15 16:40:48 +01:00
parent 666188036f
commit a2ec4a4828
5 changed files with 58 additions and 31 deletions

View File

@ -8,27 +8,23 @@
namespace SUS {
/**
* Some MAX1227 could not be reached with frequencies around 4 MHz. Maybe this is caused by
* the decoder and buffer circuits. Thus frequency is here defined to 1 MHz.
*/
static const uint32_t MAX1227_SPI_FREQ = 1000000;
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
static const DeviceCommandId_t WRITE_SETUP = 0x1;
static const DeviceCommandId_t WRITE_SETUP = 1;
/**
* This command initiates the ADC conversion for all channels including the internal
* temperature sensor.
*/
static const DeviceCommandId_t START_INT_TIMED_CONVERSIONS = 0x2;
static const DeviceCommandId_t START_INT_TIMED_CONVERSIONS = 2;
/**
* This command reads the internal fifo which holds the temperature and the channel
* conversions.
*/
static constexpr DeviceCommandId_t READ_INT_TIMED_CONVERSIONS = 0x3;
static constexpr DeviceCommandId_t READ_INT_TIMED_CONVERSIONS = 3;
static constexpr DeviceCommandId_t READ_EXT_TIMED_CONVERSIONS = 0x4;
static constexpr DeviceCommandId_t READ_EXT_TIMED_CONVERSIONS = 4;
static constexpr DeviceCommandId_t READ_EXT_TIMED_TEMPS = 5;
/**
* @brief This is the configuration byte which will be written to the setup register after
@ -61,7 +57,7 @@ static const uint8_t SIZE_READ_INT_CONVERSIONS = 14;
// 6 * conv byte, 6 * 0 and one trailing zero
static constexpr uint8_t SIZE_READ_EXT_CONVERSIONS = 13;
static const uint8_t MAX_CMD_SIZE = 16;
static const uint8_t MAX_CMD_SIZE = 32;
static const uint8_t POOL_ENTRIES = 7;