summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0507801)
raw | patch | inline | side by side (parent: 0507801)
author | KALYAN VAGVALA <k-vagvala@ti.com> | |
Thu, 8 Apr 2021 05:35:17 +0000 (11:05 +0530) | ||
committer | Ankur <ankurbaranwal@ti.com> | |
Thu, 8 Apr 2021 11:38:15 +0000 (06:38 -0500) |
packages/ti/drv/adcbuf/example/main.c | [moved from packages/ti/drv/adcbuf/example/main_mss.c with 97% similarity] | patch | blob | history |
packages/ti/drv/adcbuf/example/makefile | patch | blob | history | |
packages/ti/drv/adcbuf/src/adcbuf_mmwave.c | patch | blob | history |
similarity index 97%
rename from packages/ti/drv/adcbuf/example/main_mss.c
rename to packages/ti/drv/adcbuf/example/main.c
index 09f91e116d187ce02be3a8c1b52a76f6b6ca90f6..9c3b5ba71bd90ca551b3dbb8e765640affd2028e 100644 (file)
rename from packages/ti/drv/adcbuf/example/main_mss.c
rename to packages/ti/drv/adcbuf/example/main.c
index 09f91e116d187ce02be3a8c1b52a76f6b6ca90f6..9c3b5ba71bd90ca551b3dbb8e765640affd2028e 100644 (file)
#include <stdio.h>
/* BIOS/XDC Include Files. */
#include <stdio.h>
/* BIOS/XDC Include Files. */
-#include <xdc/std.h>
-#include <xdc/runtime/System.h>
-#include <ti/sysbios/BIOS.h>
-#include <ti/sysbios/knl/Task.h>
+#include <ti/osal/TaskP.h>
+#include <ti/osal/DebugP.h>
+#include <ti/osal/SemaphoreP.h>
/* ADCBUF Driver: */
#include <ti/drv/adcbuf/adcbuf.h>
/* ADCBUF Driver: */
#include <ti/drv/adcbuf/adcbuf.h>
-
#include <ti/drv/edma/edma.h>
#include <ti/csl/soc.h>
#include <ti/osal/osal.h>
#include <ti/drv/edma/edma.h>
#include <ti/csl/soc.h>
#include <ti/osal/osal.h>
/* ========================================================================== */
/* Macros */
/* ========================================================================== */
/* ========================================================================== */
/* Macros */
/* ========================================================================== */
+static uint8_t gAppTskStackMain[4 * 1024] __attribute__((aligned(32)));
+
/* Test definition specific to the device */
#define TOTAL_TEST_CASES (4U)
#define TEST_ADCBUF_NUM_SAMPLES (1024U)
/* Test definition specific to the device */
#define TOTAL_TEST_CASES (4U)
#define TEST_ADCBUF_NUM_SAMPLES (1024U)
* @retval
* Not Applicable.
*/
* @retval
* Not Applicable.
*/
-void Test_ADCBUFInitTask(UArg arg0, UArg arg1)
+void Test_ADCBUFInitTask(void* arg0, void* arg1)
{
EDMA_Handle EdmaHandle = NULL;
SemaphoreP_Params semParams;
{
EDMA_Handle EdmaHandle = NULL;
SemaphoreP_Params semParams;
/* Basic API Test */
if(Test_ADCBUFApiTest() < 0)
/* Basic API Test */
if(Test_ADCBUFApiTest() < 0)
- printf ("ADCBUF Basic API test failed\n");
+ printf ("ADCBUF Basic API test failed\n");
else
else
- printf ("ADCBUF Basic API test passed\n");
+ printf ("ADCBUF Basic API test passed\n");
/**************************************************************************
* Test: Parameter validation test
/**************************************************************************
* Test: Parameter validation test
/* Test input parameters */
if (Test_ADCBUFCmdParamsCheckTest() < 0)
/* Test input parameters */
if (Test_ADCBUFCmdParamsCheckTest() < 0)
- printf ("ADCBUF Input Parameters Validation Test failed\n");
+ printf ("ADCBUF Input Parameters Validation Test failed\n");
else
else
- printf ("ADCBUF Input Parameters Validation Test passed\n");
+ printf ("ADCBUF Input Parameters Validation Test passed\n");
/**************************************************************************
* Test: Reopen the driver to test in Continuous Mode
/**************************************************************************
* Test: Reopen the driver to test in Continuous Mode
/* Register interrupts */
if(OSAL_INT_SUCCESS != Osal_RegisterInterrupt(&intrPrms, &hwiHandle))
{
/* Register interrupts */
if(OSAL_INT_SUCCESS != Osal_RegisterInterrupt(&intrPrms, &hwiHandle))
{
- printf("Error: Unable to register Chirp interrupt\n");
- hwiHandle = NULL;
- goto Exit;
+ printf("Error: Unable to register Chirp interrupt\n");
+ hwiHandle = NULL;
+ goto Exit;
}
/* Initialize the data format for the test */
}
/* Initialize the data format for the test */
while(edmaTransComplete == false)
{
EDMA_isTransferComplete(EdmaHandle, 0, &edmaTransComplete);
while(edmaTransComplete == false)
{
EDMA_isTransferComplete(EdmaHandle, 0, &edmaTransComplete);
- Task_sleep(1);
+ TaskP_sleepInMsecs(1);
}
}
else
}
}
else
printf ("gVerifyFailCount = %d\n", gVerifyFailCount);
}
else
printf ("gVerifyFailCount = %d\n", gVerifyFailCount);
}
else
- printf ("ADCBUF Test Pattern passed\n");
+ printf ("ADCBUF Test Pattern passed\n");
/* Clear the counter */
gIntCounter = 0;
/* Clear the counter */
gIntCounter = 0;
printf("Debug: Semaphore Instance %p has been closed successfully\n", gIntSemaHandle);
Exit:
printf("Debug: Semaphore Instance %p has been closed successfully\n", gIntSemaHandle);
Exit:
- /* After test all done, terminate DSP by calling BIOS_exit().
- This is required by MCPI test framework script.
- MCPI test framework script waits for DSP halt,
- if DSP doesn't halt, script will wait until timeout then claim test fail.
- */
- BIOS_exit(0);
+ /* Stop OS */
+ OS_stop();
return;
}
return;
}
*/
int main (void)
{
*/
int main (void)
{
- Task_Params taskParams;
+ TaskP_Params taskParams;
/* Initialize the Task Parameters. */
/* Initialize the Task Parameters. */
- Task_Params_init(&taskParams);
- taskParams.stackSize = 4*1024;
- Task_create(Test_ADCBUFInitTask, &taskParams, NULL);
+ TaskP_Params_init(&taskParams);
+ taskParams.stack = gAppTskStackMain;
+ taskParams.stacksize = sizeof(gAppTskStackMain);
+ TaskP_create(Test_ADCBUFInitTask, &taskParams);
- /* Start BIOS */
- BIOS_start();
+ /* Start OS */
+ OS_start();
return 0;
}
return 0;
}
index 51d72c6727df2e367f7dbd6c2e9ec3a9a23cc819..d2f2ef0dfe91da00eeb938936e0994bab41666a4 100644 (file)
# Common source files and CFLAGS across all platforms and cores
PACKAGE_SRCS_COMMON = .
# Common source files and CFLAGS across all platforms and cores
PACKAGE_SRCS_COMMON = .
-SRCS_mcu1_0 += main_mss.c
-#SRCS_c66xdsp_1 += main.c
+SRCS_mcu1_0 += main.c
+SRCS_c66xdsp_1 += main.c
CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS)
CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS)
diff --git a/packages/ti/drv/adcbuf/src/adcbuf_mmwave.c b/packages/ti/drv/adcbuf/src/adcbuf_mmwave.c
index c81788def03064482ba6a3b35db1c03a94c0efef..6a867565a0270fba567f8b59cffa11b58b54f22d 100644 (file)
@@ -1199,9 +1199,7 @@ uint32_t ADCBUF_MMWave_getChanBufAddr(ADCBuf_Handle handle, uint8_t channel, int
*errCode = ADCBUF_STATUS_SUCCESS;
/* Check if the channel is enabled? */
*errCode = ADCBUF_STATUS_SUCCESS;
/* Check if the channel is enabled? */
- /*if(CSL_FEXTR(ptrRssCtrlRegBase->ADCBUFCFG1, ADCBUFCFG1_RX0EN_BIT_END + channel,
- ADCBUFCFG1_RX0EN_BIT_START + channel) != (uint32_t)0U)*/
- if(isChannelEnabled(ptrRssCtrlRegBase, channel) == (uint32_t)0U)
+ if(isChannelEnabled(ptrRssCtrlRegBase, channel) != (uint32_t)0U)
{
uint32_t addrOffset;
{
uint32_t addrOffset;