only reset PTME on rate change init
This commit is contained in:
parent
91106feb82
commit
1cc62238c2
@ -41,6 +41,12 @@ ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
uint8_t AxiPtmeConfig::readCaduRateReg() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
MutexGuard mg(mutex);
|
||||
return static_cast<uint8_t>(*(baseAddress + CADU_BITRATE_REG));
|
||||
}
|
||||
|
||||
void AxiPtmeConfig::enableTxclockManipulator() {
|
||||
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
* frequency of the clock connected to the bit clock input of PTME.
|
||||
*/
|
||||
ReturnValue_t writeCaduRateReg(uint8_t rateVal);
|
||||
uint8_t readCaduRateReg();
|
||||
|
||||
/**
|
||||
* @brief Next to functions control the tx clock manipulator component
|
||||
|
@ -26,6 +26,11 @@ ReturnValue_t PtmeConfig::setRate(uint32_t bitRate) {
|
||||
return axiPtmeConfig->writeCaduRateReg(static_cast<uint8_t>(rateVal));
|
||||
}
|
||||
|
||||
uint32_t PtmeConfig::getRate() {
|
||||
uint8_t rateReg = axiPtmeConfig->readCaduRateReg();
|
||||
return (BIT_CLK_FREQ / (rateReg + 1));
|
||||
}
|
||||
|
||||
void PtmeConfig::invertTxClock(bool invert) {
|
||||
if (invert) {
|
||||
axiPtmeConfig->enableTxclockInversion();
|
||||
|
@ -32,6 +32,7 @@ class PtmeConfig : public SystemObject {
|
||||
* of the CADU clock due to the convolutional code added by the s-Band transceiver.
|
||||
*/
|
||||
ReturnValue_t setRate(uint32_t bitRate);
|
||||
uint32_t getRate();
|
||||
|
||||
/**
|
||||
* @brief Will change the time the tx data signal is updated with respect to the tx clock
|
||||
|
@ -255,6 +255,7 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
updateContext.setModeAfterUpdate = true;
|
||||
return;
|
||||
}
|
||||
if(ptmeConfig.setRate(bitRate))
|
||||
// No rate change, so enable transmitter right away.
|
||||
enableTransmit();
|
||||
} else if (mode == HasModesIF::MODE_OFF) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user