AM273x MCU+ SDK  08.02.00
cbuff/v1/cbuff.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
54 #ifndef CBUFF_V1_H_
55 #define CBUFF_V1_H_
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Include Files */
63 /* ========================================================================== */
64 
65 #include <stdbool.h>
66 #include <drivers/hw_include/cslr_soc.h>
67 #include <drivers/hw_include/cslr_cbuff.h>
68 #include <drivers/edma.h>
69 #include <drivers/hw_include/hw_types.h>
70 
71 
72 /* ========================================================================== */
73 /* Macros */
74 /* ========================================================================== */
75 
77 #define CBUFF_ERRNO_BASE (-3300)
78 
83 #define CBUFF_MAX_USER_BUFFER (3U)
84 
85 
94 #define CBUFF_STATUS_SUCCESS ((int32_t)0)
95 
98 #define CBUFF_EINVAL (CBUFF_ERRNO_BASE-1)
99 
103 #define CBUFF_ENOMEM (CBUFF_ERRNO_BASE-2)
104 
109 #define CBUFF_EINUSE (CBUFF_ERRNO_BASE-3)
110 
115 #define CBUFF_ENOTSUP (CBUFF_ERRNO_BASE-4)
116 
121 #define CBUFF_EDMA_FAIL (CBUFF_ERRNO_BASE-5)
122 
126 #define CBUFF_ELIMIT (CBUFF_ERRNO_BASE-6)
127  /* end defgroup CBUFF_ERROR_CODES */
129 
137 #define CBUFF_MAX_NUM_SESSION (7U)
138 
143 #define CBUFF_EDMA_MAX_NUM_CHANNELS (32U)
144 
152 #define CBUFF_MAX_LINKED_LIST_SIZE (32U)
153 
160 #define CBUFF_LL_READ_THRESHOLD (0x4U)
161 
168 #define CBUFF_LL_WRITE_THRESHOLD (0x40U)
169 
175 #define CBUFF_MAX_TRANSFER_SIZE_CBUFF_UNITS (0x3FFFU)
176 
187 #define CBUFF_MIN_TRANSFER_SIZE_CBUFF_UNITS ((CBUFF_LL_READ_THRESHOLD * 16U) / 2U)
188 
189 /* ========================================================================== */
190 /* typedefs */
191 /* ========================================================================== */
192 
196 typedef void* CBUFF_Handle;
197 
201 typedef void* CBUFF_SessionHandle;
202 
203 
212 typedef uint32_t CBUFF_Interface;
213 
214 #define CBUFF_Interface_MDO ((uint32_t) 1)
215 #define CBUFF_Interface_LVDS ((uint32_t) 2)
227 typedef uint32_t CBUFF_Command;
228 
229 #define CBUFF_Command_GET_CBUFF_STATS ((uint32_t) 1)
230 #define CBUFF_Command_CLEAR_CBUFF_STATS ((uint32_t) 2)
231 #define CBUFF_Command_GET_ACTIVE_SESSION ((uint32_t) 3)
241 typedef uint32_t CBUFF_OutputDataFmt;
242 
243 #define CBUFF_OutputDataFmt_12bit ((uint32_t) 0)
244 #define CBUFF_OutputDataFmt_14bit ((uint32_t) 1)
245 #define CBUFF_OutputDataFmt_16bit ((uint32_t) 2)
255 typedef uint32_t CBUFF_DataType;
256 
257 #define CBUFF_DataType_REAL ((uint32_t) 0)
258 #define CBUFF_DataType_COMPLEX ((uint32_t) 1)
269 typedef uint32_t CBUFF_LVDSLaneFmtMap;
270 
271 #define CBUFF_LVDSLaneFmtMapLANEx_FMT_0_y ((uint32_t) 0)
272 #define CBUFF_LVDSLaneFmtMapLANEx_FMT_1_y ((uint32_t) 1)
281 typedef uint32_t CBUFF_LLType;
282 
286 #define CBUFF_LLType_UNUSED ((uint32_t) 0)
287 #define CBUFF_LLType_USER ((uint32_t) 1)
288 #define CBUFF_LLType_HEADER ((uint32_t) 2)
291 /* ========================================================================== */
292 /* Internal/Private Structure Declarations */
293 /* ========================================================================== */
294 
303 typedef struct CBUFF_Stats_t
304 {
315  uint32_t numFrameDone;
316 
327  uint32_t numChirpDone;
328 
333 
339 
344  uint8_t chirpError;
345 }CBUFF_Stats;
346 
357 typedef struct CBUFF_BufferCfg_t
358 {
364  uint16_t size;
365 
371  uint32_t address;
373 
382 typedef struct CBUFF_LinkListParams_t
383 {
388 
393  uint8_t crcEnable;
394 
399  uint8_t lpHdrEn;
400 
407  uint8_t outputDataFmt;
408 
412  uint16_t transferSize;
413 
419 
423  uint8_t align96;
424 
428  uint8_t dataFmtMap;
429 
433  uint8_t vcNum;
434 
438  uint8_t hsyncStart;
439 
443  uint8_t hsyncEnd;
444 
448  uint32_t lpHeaderValue;
449 
453  uint32_t threshold;
455 
457 typedef struct
458 {
459  /*
460  * SOC configuration
461  */
462  uint32_t baseAddr;
464  uint32_t fifoBaseAddr;
468  uint32_t errorIntrNum;
470  uint32_t intrNum;
472  uint32_t cbuffChannelId[CBUFF_MAX_NUM_SESSION];
474 } CBUFF_Attrs;
475 
476 /* ========================================================================== */
477 /* Structures */
478 /* ========================================================================== */
479 
488 typedef struct CBUFF_LVDSCfg_t
489 {
493  uint8_t crcEnable;
494 
502  uint8_t lvdsLaneEnable;
503 
507  uint8_t msbFirst;
508 
512  uint8_t ddrClockMode;
513 
518 
524 
533 typedef struct CBUFF_EDMAChannelCfg_t
534 {
538  uint32_t chainChannelsId;
539 
545 
555 typedef struct CBUFF_EDMAInfo_t
556 {
563 
570 
598  uint32_t dmaNum;
600 
623 typedef int32_t (*CBUFF_EDMAChannelAllocateFxn) (CBUFF_EDMAInfo* ptrEDMAInfo, CBUFF_EDMAChannelCfg* ptrEDMAChannelCfg);
624 
637 typedef void (*CBUFF_EDMAChannelFreeFxn) (CBUFF_EDMAChannelCfg* ptrEDMAChannelCfg);
638 
655 typedef void (*CBUFF_FrameDoneCallbackFxn) (CBUFF_SessionHandle sessionHandle);
656 
665 typedef struct CBUFF_SwSessionCfg_t
666 {
672 
681 typedef struct CBUFF_SessionCfg_t
682 {
683 
695 
700 
705 
710 
716 
722 
729 
738 typedef struct CBUFF_InitCfg_t
739 {
740 
745 
749  uint8_t enableECC;
750 
756  uint8_t crcEnable;
757 
763  uint8_t maxSessions;
764 
778 
783 
790 
800 typedef struct CBUFF_EDMATrackingEntry_t
801 {
807 
811  uint32_t srcAddress;
812 
817  uint32_t transferSize;
819 
828 typedef struct CBUFF_Session_t
829 {
833  bool isValid;
834 
838  struct CBUFF_Driver_t* ptrDriverMCB;
839 
844 
848  uint8_t dmaNum;
849 
854 
858  uint16_t adcTransferSize;
859 
863  uint8_t linkListIndex;
864 
870 
875 
880 
891 
895  volatile uint32_t numFrameDone;
896 
900  volatile uint32_t numChirpDone;
902 
911 typedef struct CBUFF_Driver_t
912 {
918 
922  CSL_CbuffRegs* ptrCBUFFReg;
923 
927  struct CBUFF_InterfaceFxn_t* interfaceFxn;
928 
933 
938 
944 
950 
955 
960 
964  volatile uint32_t totalNumFrameDone;
965 
969  volatile uint32_t totalNumChirpDone;
970 
975 
979  volatile uint32_t totalNumErrorInterrupts;
980 }CBUFF_Object;
981 
997 typedef int32_t (*CBUFF_initFxn) (CBUFF_Object* ptrDriverMCB, int32_t* errCode);
998 
1014 typedef int32_t (*CBUFF_deinitFxn) (CBUFF_Object* ptrDriverMCB, int32_t* errCode);
1015 
1031 typedef int32_t (*CBUFF_openFxn) (CBUFF_Session* ptrSession, int32_t* errCode);
1032 
1048 typedef int32_t (*CBUFF_closeFxn) (CBUFF_Session* ptrSession, int32_t* errCode);
1049 
1063 typedef void (*CBUFF_initLinkListParamsFxn) (CBUFF_Session* ptrSession, CBUFF_LinkListParams* ptrLinkListParams);
1064 
1079 typedef void (*CBUFF_finalizeLinkListParamsFxn) (CBUFF_Session* ptrSession, CBUFF_LinkListParams* ptrLinkListParams);
1080 
1089 typedef struct CBUFF_InterfaceFxn_t
1090 {
1095 
1101 
1107 
1113 
1118 
1124 
1131  /* end defgroup CBUFF_DRIVER_EXTERNAL_DATA_STRUCTURE */
1133 
1135 extern CBUFF_Attrs gCbuffAttrs[];
1137 extern CBUFF_Object gCbuffObject[];
1139 extern CBUFF_Object *gCbuffObjectPtr[];
1141 extern uint32_t gCbuffConfigNum;
1142 
1143 /* ========================================================================== */
1144 /* Function Declarations */
1145 /* ========================================================================== */
1146 
1162 void CBUFF_init(void);
1163 
1164 
1178 CBUFF_Handle CBUFF_open (CBUFF_InitCfg* ptrInitCfg, int32_t* errCode);
1179 
1180 
1198 CBUFF_SessionHandle CBUFF_createSession (CBUFF_Handle cbuffHandle, CBUFF_SessionCfg* ptrSessionCfg, int32_t* errCode);
1199 
1200 
1215 int32_t CBUFF_close(CBUFF_SessionHandle sessionHandle, int32_t* errCode);
1216 
1231 int32_t CBUFF_deinit (CBUFF_Handle cBuffHandle, int32_t* errCode);
1232 
1253 int32_t CBUFF_control(CBUFF_Handle cBuffHandle, CBUFF_Command cmd, void* arg, uint32_t argLen, int32_t* errCode);
1254 
1269 int32_t CBUFF_activateSession (CBUFF_SessionHandle sessionHandle, int32_t* errCode);
1270 
1285 int32_t CBUFF_deactivateSession (CBUFF_SessionHandle sessionHandle, int32_t* errCode);
1286 
1287 #ifdef __cplusplus
1288 }
1289 #endif
1290 
1291 #endif /* #ifndef CBUFF_V1_H_ */
1292 
CBUFF_Object::ptrCBUFFReg
CSL_CbuffRegs * ptrCBUFFReg
CBUFF register space.
Definition: cbuff/v1/cbuff.h:922
CBUFF_Session::sessionCfg
CBUFF_SessionCfg sessionCfg
Configuration used to create the session.
Definition: cbuff/v1/cbuff.h:843
CBUFF_MAX_USER_BUFFER
#define CBUFF_MAX_USER_BUFFER
Maximum number of user supplied data buffers which can be configured and sent over the interface.
Definition: cbuff/v1/cbuff.h:83
CBUFF_Stats::numFrameDone
uint32_t numFrameDone
Number of frame done interrupts received: This is available only in the following cases: (a) Enable d...
Definition: cbuff/v1/cbuff.h:315
CBUFF_SessionCfg::allocateEDMAChannelFxn
CBUFF_EDMAChannelAllocateFxn allocateEDMAChannelFxn
Application provided EDMA Channel allocation function.
Definition: cbuff/v1/cbuff.h:704
CBUFF_Object
CBUFF Driver.
Definition: cbuff/v1/cbuff.h:912
CBUFF_EDMAInfo
CBUFF EDMA Information block.
Definition: cbuff/v1/cbuff.h:556
CBUFF_Session::numActiveADCChannels
uint8_t numActiveADCChannels
Number of active ADC Channels.
Definition: cbuff/v1/cbuff.h:853
CBUFF_Object::hwiErrorISRHandle
HwiP_Object hwiErrorISRHandle
Registered interrupt handler for the CBUFF Module.
Definition: cbuff/v1/cbuff.h:937
CBUFF_SessionCfg::freeEDMAChannelFxn
CBUFF_EDMAChannelFreeFxn freeEDMAChannelFxn
Application provided EDMA Channel free function.
Definition: cbuff/v1/cbuff.h:709
CBUFF_Attrs
CBUFF instance attributes - used during init time.
Definition: cbuff/v1/cbuff.h:458
CBUFF_LVDSCfg::msbFirst
uint8_t msbFirst
Set the flag to 1 to indicate that the MSB is sent first or LSB.
Definition: cbuff/v1/cbuff.h:507
CBUFF_SessionHandle
void * CBUFF_SessionHandle
A handle that is returned from a CBUFF Session.
Definition: cbuff/v1/cbuff.h:201
CBUFF_Object::ptrSessionTable
CBUFF_Session * ptrSessionTable
This is the table which tracks all the sessions which can be created by the CBUFF Driver.
Definition: cbuff/v1/cbuff.h:943
CBUFF_SwSessionCfg
CBUFF Software Triggered Session configuration.
Definition: cbuff/v1/cbuff.h:666
CBUFF_initFxn
int32_t(* CBUFF_initFxn)(CBUFF_Object *ptrDriverMCB, int32_t *errCode)
This is the function invoked by the CBUFF driver to initialize the high speed interface.
Definition: cbuff/v1/cbuff.h:997
CBUFF_InterfaceFxn::closeFxn
CBUFF_closeFxn closeFxn
This is the function which is used to close the high speed interface.
Definition: cbuff/v1/cbuff.h:1117
CBUFF_InitCfg
CBUFF Initialization Configuration.
Definition: cbuff/v1/cbuff.h:739
CBUFF_Session::isValid
bool isValid
Status flag which indicates if the session is active or not.
Definition: cbuff/v1/cbuff.h:833
CBUFF_Session::linkListIndex
uint8_t linkListIndex
Link Index which tracks the linked list entries being added.
Definition: cbuff/v1/cbuff.h:863
CBUFF_openFxn
int32_t(* CBUFF_openFxn)(CBUFF_Session *ptrSession, int32_t *errCode)
This is the function invoked by the CBUFF driver to open the high speed interface for the specific se...
Definition: cbuff/v1/cbuff.h:1031
CBUFF_LVDSCfg::ddrClockMode
uint8_t ddrClockMode
Set the flag to 1 for DDR Clock Mode and 0 for SDR.
Definition: cbuff/v1/cbuff.h:512
CBUFF_LinkListParams::transferSize
uint16_t transferSize
Transfer size.
Definition: cbuff/v1/cbuff.h:412
gCbuffConfigNum
uint32_t gCbuffConfigNum
Externally defined driver configuration array size.
CBUFF_Object::hwAttrs
CBUFF_Attrs const * hwAttrs
HWA Hardware related params.
Definition: cbuff/v1/cbuff.h:959
CBUFF_Session::numChirpDone
volatile uint32_t numChirpDone
Number of chirp done interrupts received.
Definition: cbuff/v1/cbuff.h:900
gCbuffObject
CBUFF_Object gCbuffObject[]
Externally defined driver object.
CBUFF_BufferCfg::address
uint32_t address
Address of the Buffer: Please be aware that the address should be in a memory range which is accessib...
Definition: cbuff/v1/cbuff.h:371
CBUFF_Stats::numErrorInterrupts
uint32_t numErrorInterrupts
Number of error interrupts received. This is always available.
Definition: cbuff/v1/cbuff.h:332
CBUFF_Stats::numChirpDone
uint32_t numChirpDone
Number of chirp done interrupts received: This is available only in the following cases: (a) Enable d...
Definition: cbuff/v1/cbuff.h:327
CBUFF_EDMATrackingEntry::srcAddress
uint32_t srcAddress
Source address of the EDMA Transfer.
Definition: cbuff/v1/cbuff.h:811
CBUFF_Session::dmaNum
uint8_t dmaNum
DMA number associated with the session.
Definition: cbuff/v1/cbuff.h:848
CBUFF_Object::numActiveLVDSLanes
uint8_t numActiveLVDSLanes
Number of active LVDS lanes configured.
Definition: cbuff/v1/cbuff.h:954
CBUFF_Handle
void * CBUFF_Handle
A handle that is returned from a CBUFF_open() call.
Definition: cbuff/v1/cbuff.h:196
CBUFF_Stats::frameStartError
uint8_t frameStartError
Flag which indicated if a frame start error was detected. This is always available.
Definition: cbuff/v1/cbuff.h:338
CBUFF_Attrs::maxLVDSLanesSupported
uint32_t maxLVDSLanesSupported
Definition: cbuff/v1/cbuff.h:466
CBUFF_InitCfg::outputDataFmt
CBUFF_OutputDataFmt outputDataFmt
This is used to specify the LVDS/CSI2 output format.
Definition: cbuff/v1/cbuff.h:744
CBUFF_deinit
int32_t CBUFF_deinit(CBUFF_Handle cBuffHandle, int32_t *errCode)
Description The function is used to deinitialize and shutdown the CBUFF driver.
CBUFF_Object::ptrCurrentActiveSession
CBUFF_Session * ptrCurrentActiveSession
This is the pointer to the currently active session. This can be NULL to indicate that no session is ...
Definition: cbuff/v1/cbuff.h:949
CBUFF_Session::ptrDriverMCB
struct CBUFF_Driver_t * ptrDriverMCB
This is the back pointer to the CBUFF Driver MCB.
Definition: cbuff/v1/cbuff.h:838
CBUFF_close
int32_t CBUFF_close(CBUFF_SessionHandle sessionHandle, int32_t *errCode)
Description The function deletes the specific session.
CBUFF_EDMAChannelCfg::chainChannelsId
uint32_t chainChannelsId
EDMA Chain Channels Identifier.
Definition: cbuff/v1/cbuff.h:538
CBUFF_MAX_LINKED_LIST_SIZE
#define CBUFF_MAX_LINKED_LIST_SIZE
Maximum number of linked list entries which can be tracked by the driver.
Definition: cbuff/v1/cbuff.h:152
CBUFF_Stats::chirpError
uint8_t chirpError
Flag which indicated if a chirp error was detected. This is always available.
Definition: cbuff/v1/cbuff.h:344
CBUFF_InitCfg::maxSessions
uint8_t maxSessions
This is the maximum number of sessions which can be supported for the CBUFF Instance....
Definition: cbuff/v1/cbuff.h:763
CBUFF_LinkListParams::type
CBUFF_LLType type
Type of data being stored in the linked list entry.
Definition: cbuff/v1/cbuff.h:387
CBUFF_Command
uint32_t CBUFF_Command
CBUFF Command.
Definition: cbuff/v1/cbuff.h:227
CBUFF_EDMAInfo::edmaHandle
EDMA_Handle edmaHandle
EDMA Instance handle: This is the configuration which was passed by the application....
Definition: cbuff/v1/cbuff.h:562
CBUFF_Object::initCfg
CBUFF_InitCfg initCfg
Initialization configuration used to setup the driver. This is valid once the driver has been INITIAL...
Definition: cbuff/v1/cbuff.h:917
edma.h
CBUFF_Session::adcTransferSize
uint16_t adcTransferSize
Number of ADC Sample per chirp * [Complex(2) or Real(1)].
Definition: cbuff/v1/cbuff.h:858
CBUFF_Object::totalNumFrameDone
volatile uint32_t totalNumFrameDone
Total number of frame done interrupts received.
Definition: cbuff/v1/cbuff.h:964
CBUFF_Interface
uint32_t CBUFF_Interface
High Speed Interface.
Definition: cbuff/v1/cbuff.h:212
CBUFF_Object::hwiISRHandle
HwiP_Object hwiISRHandle
Registered interrupt handler for the CBUFF Module.
Definition: cbuff/v1/cbuff.h:932
CBUFF_EDMATrackingEntry::transferSize
uint32_t transferSize
Size of the data being transferred by the EDMA. This is stored in CBUFF Units.
Definition: cbuff/v1/cbuff.h:817
CBUFF_createSession
CBUFF_SessionHandle CBUFF_createSession(CBUFF_Handle cbuffHandle, CBUFF_SessionCfg *ptrSessionCfg, int32_t *errCode)
Description The function creates a session with the specified configuration.
CBUFF_deactivateSession
int32_t CBUFF_deactivateSession(CBUFF_SessionHandle sessionHandle, int32_t *errCode)
Description The function deactivates the specific CBUFF session.
CBUFF_InterfaceFxn::deinitFxn
CBUFF_deinitFxn deinitFxn
This is the function which is used to deinitialize and shutdown the high speed interface.
Definition: cbuff/v1/cbuff.h:1106
CBUFF_LinkListParams::align96
uint8_t align96
96 byte transfer mode
Definition: cbuff/v1/cbuff.h:423
CBUFF_LVDSCfg
CBUFF LVDS Initialization configuration.
Definition: cbuff/v1/cbuff.h:489
CBUFF_SessionCfg::header
CBUFF_BufferCfg header
This is the header which needs to be added to the stream. If the size in the header is set to 0 then ...
Definition: cbuff/v1/cbuff.h:721
CBUFF_BufferCfg
CBUFF Buffer configuration.
Definition: cbuff/v1/cbuff.h:358
CBUFF_Session
CBUFF Session.
Definition: cbuff/v1/cbuff.h:829
CBUFF_LinkListParams::crcEnable
uint8_t crcEnable
CRC Enable: Only ADC Buffers have CRC and these need to be verified.
Definition: cbuff/v1/cbuff.h:393
CBUFF_SessionCfg::edmaHandle
EDMA_Handle edmaHandle
EDMA Instance Handle: The session will allocate EDMA channels.
Definition: cbuff/v1/cbuff.h:699
CBUFF_InterfaceFxn::initFxn
CBUFF_initFxn initFxn
This is the function which is used to initialize the high speed interface.
Definition: cbuff/v1/cbuff.h:1100
CBUFF_LVDSCfg::ddrClockModeMux
uint8_t ddrClockModeMux
Set the flag to 1 for DDR Mode Clock Mux and 0 for SDR Mode Clock Mux.
Definition: cbuff/v1/cbuff.h:517
CBUFF_OutputDataFmt
uint32_t CBUFF_OutputDataFmt
Output Data Format.
Definition: cbuff/v1/cbuff.h:241
CBUFF_InterfaceFxn
CBUFF Interface Function.
Definition: cbuff/v1/cbuff.h:1090
CBUFF_closeFxn
int32_t(* CBUFF_closeFxn)(CBUFF_Session *ptrSession, int32_t *errCode)
This is the function invoked by the CBUFF driver to close the high speed interface for the specific s...
Definition: cbuff/v1/cbuff.h:1048
CBUFF_activateSession
int32_t CBUFF_activateSession(CBUFF_SessionHandle sessionHandle, int32_t *errCode)
Description The function activates the specific CBUFF session.
CBUFF_LLType
uint32_t CBUFF_LLType
CBUFF Linked List Type.
Definition: cbuff/v1/cbuff.h:281
CBUFF_InterfaceFxn::interface
CBUFF_Interface interface
High speed interface for which the interface functions are defined.
Definition: cbuff/v1/cbuff.h:1094
CBUFF_Session::numFrameDone
volatile uint32_t numFrameDone
Number of frame done interrupts received.
Definition: cbuff/v1/cbuff.h:895
CBUFF_InterfaceFxn::initLinkListParamsFxn
CBUFF_initLinkListParamsFxn initLinkListParamsFxn
This is the function which is used to initialize the linked list parameters to the default values for...
Definition: cbuff/v1/cbuff.h:1123
CBUFF_DataType
uint32_t CBUFF_DataType
Data Type.
Definition: cbuff/v1/cbuff.h:255
CBUFF_LVDSCfg::lvdsLaneEnable
uint8_t lvdsLaneEnable
LVDS Lane configuration: The bit mask here is used to indicate the active LVDS lanes i....
Definition: cbuff/v1/cbuff.h:502
CBUFF_EDMAChannelCfg
CBUFF EDMA channel resource configuration.
Definition: cbuff/v1/cbuff.h:534
CBUFF_LinkListParams::lpHeaderValue
uint32_t lpHeaderValue
Long Packet Header Value.
Definition: cbuff/v1/cbuff.h:448
CBUFF_SessionCfg::frameDoneCallbackFxn
CBUFF_FrameDoneCallbackFxn frameDoneCallbackFxn
This is the callback function which is triggered once the frame has been sent over the HSI....
Definition: cbuff/v1/cbuff.h:694
CBUFF_SessionCfg::swCfg
CBUFF_SwSessionCfg swCfg
Configuration used if the session is executing in software trigerred mode.
Definition: cbuff/v1/cbuff.h:727
CBUFF_LVDSCfg::crcEnable
uint8_t crcEnable
Enable/Disable CRC on LVDS.
Definition: cbuff/v1/cbuff.h:493
CBUFF_control
int32_t CBUFF_control(CBUFF_Handle cBuffHandle, CBUFF_Command cmd, void *arg, uint32_t argLen, int32_t *errCode)
Description The function is used to get/set information from the CBUFF Driver.
CBUFF_FrameDoneCallbackFxn
void(* CBUFF_FrameDoneCallbackFxn)(CBUFF_SessionHandle sessionHandle)
Definition: cbuff/v1/cbuff.h:655
CBUFF_Attrs::errorIntrNum
uint32_t errorIntrNum
Definition: cbuff/v1/cbuff.h:468
CBUFF_Object::interfaceFxn
struct CBUFF_InterfaceFxn_t * interfaceFxn
High speed interface function table to be used by the CBUFF Driver.
Definition: cbuff/v1/cbuff.h:927
CBUFF_LinkListParams::dataFmtMap
uint8_t dataFmtMap
Data Format mapping.
Definition: cbuff/v1/cbuff.h:428
CBUFF_Attrs::baseAddr
uint32_t baseAddr
Definition: cbuff/v1/cbuff.h:462
CBUFF_EDMAChannelFreeFxn
void(* CBUFF_EDMAChannelFreeFxn)(CBUFF_EDMAChannelCfg *ptrEDMAChannelCfg)
Definition: cbuff/v1/cbuff.h:637
CBUFF_SessionCfg
CBUFF configuration.
Definition: cbuff/v1/cbuff.h:682
CBUFF_InterfaceFxn::openFxn
CBUFF_openFxn openFxn
This is the function which is used to open and setup the high speed interface.
Definition: cbuff/v1/cbuff.h:1112
CBUFF_finalizeLinkListParamsFxn
void(* CBUFF_finalizeLinkListParamsFxn)(CBUFF_Session *ptrSession, CBUFF_LinkListParams *ptrLinkListParams)
This is the function prototype invoked by the CBUFF Driver to finalize the linked list parameters for...
Definition: cbuff/v1/cbuff.h:1079
CBUFF_LinkListParams::vcNum
uint8_t vcNum
Virtual channel.
Definition: cbuff/v1/cbuff.h:433
CBUFF_Attrs::intrNum
uint32_t intrNum
Definition: cbuff/v1/cbuff.h:470
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:91
CBUFF_SessionCfg::dataType
CBUFF_DataType dataType
Type of Data: Real or Complex which is going to be streamed out via the CBUFF High speed interface.
Definition: cbuff/v1/cbuff.h:715
CBUFF_InitCfg::enableECC
uint8_t enableECC
Enable/Disable the ECC in the CBUFF module.
Definition: cbuff/v1/cbuff.h:749
CBUFF_BufferCfg::size
uint16_t size
Size of the Buffer: This can be set to 0 to indicate that no buffer is specified. The size is specifi...
Definition: cbuff/v1/cbuff.h:364
CBUFF_InitCfg::enableDebugMode
bool enableDebugMode
This is a flag which if set to true will register the ISR to track Frame Start/Done and Chirp done.
Definition: cbuff/v1/cbuff.h:777
EDMA_Handle
void * EDMA_Handle
A handle that is returned from a EDMA_open() call.
Definition: edma/v0/edma.h:469
CBUFF_LVDSLaneFmtMap
uint32_t CBUFF_LVDSLaneFmtMap
LVDS Lane Format Map.
Definition: cbuff/v1/cbuff.h:269
CBUFF_EDMA_MAX_NUM_CHANNELS
#define CBUFF_EDMA_MAX_NUM_CHANNELS
Maximum number of EDMA channels which can be used by the CBUFF driver.
Definition: cbuff/v1/cbuff.h:143
CBUFF_Attrs::fifoBaseAddr
uint32_t fifoBaseAddr
Definition: cbuff/v1/cbuff.h:464
CBUFF_EDMATrackingEntry
CBUFF EDMA Tracking Entry.
Definition: cbuff/v1/cbuff.h:801
gCbuffObjectPtr
CBUFF_Object * gCbuffObjectPtr[]
Externally defined driver object pointer.
CBUFF_init
void CBUFF_init(void)
Description This function initializes the CBUFF module. This function must be called before any oth...
gCbuffAttrs
CBUFF_Attrs gCbuffAttrs[]
Externally defined driver configuration array.
CBUFF_open
CBUFF_Handle CBUFF_open(CBUFF_InitCfg *ptrInitCfg, int32_t *errCode)
Description The function Configures CBUFF peripheral with user provided configuration.
CBUFF_LinkListParams::totalTransferSize
uint16_t totalTransferSize
Cumulative Transfer Size for all linked entries. This is applicable only if the HSI is CSI.
Definition: cbuff/v1/cbuff.h:418
CBUFF_LinkListParams::hsyncEnd
uint8_t hsyncEnd
Horizontal sync end.
Definition: cbuff/v1/cbuff.h:443
CBUFF_LVDSCfg::laneFormat
CBUFF_LVDSLaneFmtMap laneFormat
LVDS Lane Format:
Definition: cbuff/v1/cbuff.h:522
CBUFF_EDMAInfo::dmaNum
uint32_t dmaNum
DMA Number: There are multiple DMA in the CBUFF driver. There exists a mapping between the CBUFF DMA ...
Definition: cbuff/v1/cbuff.h:598
CBUFF_Object::totalNumChirpDone
volatile uint32_t totalNumChirpDone
Total number of chirp done interrupts received.
Definition: cbuff/v1/cbuff.h:969
CBUFF_InitCfg::crcEnable
uint8_t crcEnable
In order to ensure data integrity of data transfer from ADC buffer to CBUFF there is a CRC computed a...
Definition: cbuff/v1/cbuff.h:756
CBUFF_LinkListParams
CBUFF Linked List parameters.
Definition: cbuff/v1/cbuff.h:383
CBUFF_deinitFxn
int32_t(* CBUFF_deinitFxn)(CBUFF_Object *ptrDriverMCB, int32_t *errCode)
This is the function invoked by the CBUFF driver to deinitialize and shutdown the high speed interfac...
Definition: cbuff/v1/cbuff.h:1014
CBUFF_Session::edmaChannelCount
uint8_t edmaChannelCount
Counter which tracks the EDMA channels.
Definition: cbuff/v1/cbuff.h:874
CBUFF_InterfaceFxn::finalizeLinkListParamsFxn
CBUFF_finalizeLinkListParamsFxn finalizeLinkListParamsFxn
This is the function which is used to finalize and setup the linked list parameters after which they ...
Definition: cbuff/v1/cbuff.h:1129
CBUFF_EDMAChannelAllocateFxn
int32_t(* CBUFF_EDMAChannelAllocateFxn)(CBUFF_EDMAInfo *ptrEDMAInfo, CBUFF_EDMAChannelCfg *ptrEDMAChannelCfg)
Definition: cbuff/v1/cbuff.h:623
CBUFF_LinkListParams::hsyncStart
uint8_t hsyncStart
Horizontal sync start.
Definition: cbuff/v1/cbuff.h:438
CBUFF_Object::totalNumNonActiveSessionInterrupts
uint32_t totalNumNonActiveSessionInterrupts
Number of interrupts received when there is no active session.
Definition: cbuff/v1/cbuff.h:974
CBUFF_EDMAChannelCfg::shadowLinkChannelsId
uint32_t shadowLinkChannelsId
EDMA Shadow link channels Identifier.
Definition: cbuff/v1/cbuff.h:543
CBUFF_MAX_NUM_SESSION
#define CBUFF_MAX_NUM_SESSION
Maximum number of sessions which can be supported by the CBUFF Driver.
Definition: cbuff/v1/cbuff.h:137
CBUFF_InitCfg::lvdsCfg
CBUFF_LVDSCfg lvdsCfg
LVDS Initialization configuration: This needs to be specified if the interface is configured to be LV...
Definition: cbuff/v1/cbuff.h:788
CBUFF_LinkListParams::outputDataFmt
uint8_t outputDataFmt
Output data format: 00 - 16bit 01 - 14bit 10 - 12bit.
Definition: cbuff/v1/cbuff.h:407
CBUFF_EDMAInfo::isFirstEDMAChannel
bool isFirstEDMAChannel
Flag which if set indicates that this is the first EDMA channel which is being allocated....
Definition: cbuff/v1/cbuff.h:569
CBUFF_initLinkListParamsFxn
void(* CBUFF_initLinkListParamsFxn)(CBUFF_Session *ptrSession, CBUFF_LinkListParams *ptrLinkListParams)
This is the function prototype invoked by the CBUFF Driver to initialize the linked list parameters f...
Definition: cbuff/v1/cbuff.h:1063
CBUFF_Stats
CBUFF Statistics.
Definition: cbuff/v1/cbuff.h:304
CBUFF_InitCfg::interface
CBUFF_Interface interface
The interface over which the CBUFF module will send out the data.
Definition: cbuff/v1/cbuff.h:782
CBUFF_Session::numChirpsPerFrame
uint32_t numChirpsPerFrame
This is the number of chirps per frame.
Definition: cbuff/v1/cbuff.h:890
CBUFF_LinkListParams::lpHdrEn
uint8_t lpHdrEn
Long packet header enable: This is to be 1 for the first entry in the group.
Definition: cbuff/v1/cbuff.h:399
CBUFF_LinkListParams::threshold
uint32_t threshold
Thresholds to be configured.
Definition: cbuff/v1/cbuff.h:453
CBUFF_EDMATrackingEntry::cbuffEDMAChannelCfg
CBUFF_EDMAChannelCfg cbuffEDMAChannelCfg
EDMA Channel Configuration allocated by the application and which is used to program the CBUFF Transf...
Definition: cbuff/v1/cbuff.h:806
CBUFF_Object::totalNumErrorInterrupts
volatile uint32_t totalNumErrorInterrupts
Total number of error interrupts received.
Definition: cbuff/v1/cbuff.h:979