ptme bridge wip

This commit is contained in:
2021-05-27 13:07:57 +02:00
parent 9c0045dbd9
commit d60bf5e037
6 changed files with 100 additions and 84 deletions

View File

@ -5,6 +5,7 @@
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <string.h>
#include "OBSWConfig.h"
/**
* @brief This class handles the interfacing to the telemetry (PTME) and telecommand (PDEC) IP
@ -38,8 +39,8 @@ public:
protected:
/**
* Overwriting this function for testing purpose. Function is periodically called in
* performOperation.
* Overwriting this function to provide the capability of testing the PTME IP Core
* implementation.
*/
virtual ReturnValue_t handleTm() override;
@ -73,8 +74,9 @@ private:
/**
* Writing to this offset within the PTME memory space will insert data for encoding to the
* PTME IP core.
* The address offset is 0x400 (= 4 * 256)
*/
static const int PTME_DATA_REG_OFFSET = 0x400;
static const int PTME_DATA_REG_OFFSET = 256;
LinuxLibgpioIF* gpioComIF = nullptr;
@ -90,8 +92,7 @@ private:
/** The file descriptor of the UIO driver */
int fd;
/** PTME base address */
void* ptmeBaseAddress = nullptr;
uint32_t* ptmeBaseAddress = nullptr;
/**
* @brief This function sends the config byte to the PTME IP Core to initiate a packet
@ -111,13 +112,19 @@ private:
*
* @return RETURN_OK when ready to receive data else PAPB_BUSY.
*/
ReturnValue_t pollPapbSignal();
ReturnValue_t pollPapbBusySignal();
/**
* @brief This function can be used for debugging to check wheter there are packets in
* the packet buffer of the PTME or not.
*/
void ptmeBufferEmpty();
void isPtmeBufferEmpty();
/**
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
* to the input of the PTME IP Core. Can be used to test the implementation.
*/
ReturnValue_t sendTestFrame();
};
#endif /* MISSION_OBC_CCSDSIPCOREBRIDGE_H_ */