diff options
author | Raghu Nambiath | 2018-06-28 21:04:15 -0500 |
---|---|---|
committer | Raghu Nambiath | 2018-06-28 21:04:15 -0500 |
commit | 009208f2020530fe4828251b834d68fdc0762e38 (patch) | |
tree | 8c887257049d602a4054f9e0ec7bc7791e3877d5 | |
parent | 09fe2df62f641ba419d166a9dfcfb075007850e7 (diff) | |
parent | a8406d49905b766f78c289805818330423c56735 (diff) | |
download | mcbsp-lld-009208f2020530fe4828251b834d68fdc0762e38.tar.gz mcbsp-lld-009208f2020530fe4828251b834d68fdc0762e38.tar.xz mcbsp-lld-009208f2020530fe4828251b834d68fdc0762e38.zip |
Merge pull request #8 in PROCESSOR-SDK/mcbsp-lld from PRSDK-3515 to master
* commit 'a8406d49905b766f78c289805818330423c56735':
PRSDK-3515 Add Board_init function to enable module clock
-rw-r--r-- | example/c6657/MCBSPDigLpbk/mcbspMasterDigLpbk.c | 10 | ||||
-rw-r--r-- | example/c674x/MCBSPDigLpbk/mcbspMasterDigLpbk.c | 10 | ||||
-rw-r--r-- | example/k2g/MCBSPDigLpbk/mcbspMasterDigLpbk.c | 10 | ||||
-rw-r--r-- | example/omapl138/MCBSPDigLpbk/mcbspMasterDigLpbk.c | 10 |
4 files changed, 36 insertions, 4 deletions
diff --git a/example/c6657/MCBSPDigLpbk/mcbspMasterDigLpbk.c b/example/c6657/MCBSPDigLpbk/mcbspMasterDigLpbk.c index 7281420..e2f11b2 100644 --- a/example/c6657/MCBSPDigLpbk/mcbspMasterDigLpbk.c +++ b/example/c6657/MCBSPDigLpbk/mcbspMasterDigLpbk.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * master functionality using Digital Loopback setup. The file configures | 5 | * master functionality using Digital Loopback setup. The file configures |
6 | * the EVM in master mode. | 6 | * the EVM in master mode. |
7 | * | 7 | * |
8 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | 8 | * Copyright (C) 2012 - 2018 Texas Instruments Incorporated - http://www.ti.com/ |
9 | * | 9 | * |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -50,6 +50,7 @@ | |||
50 | #include <xdc/runtime/System.h> | 50 | #include <xdc/runtime/System.h> |
51 | 51 | ||
52 | #include <xdc/cfg/global.h> | 52 | #include <xdc/cfg/global.h> |
53 | #include <board.h> | ||
53 | 54 | ||
54 | /* Include EDMA3 Driver */ | 55 | /* Include EDMA3 Driver */ |
55 | #include <ti/sdo/edma3/drv/edma3_drv.h> | 56 | #include <ti/sdo/edma3/drv/edma3_drv.h> |
@@ -86,6 +87,8 @@ extern int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize); | |||
86 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); | 87 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); |
87 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); | 88 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); |
88 | 89 | ||
90 | extern Board_STATUS Board_init(Board_initCfg); | ||
91 | |||
89 | /* FPGA Configuration Misc-1 Register offset */ | 92 | /* FPGA Configuration Misc-1 Register offset */ |
90 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) | 93 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) |
91 | 94 | ||
@@ -854,7 +857,12 @@ Void main(Void) | |||
854 | { | 857 | { |
855 | Task_Params taskParams; | 858 | Task_Params taskParams; |
856 | EDMA3_DRV_Result edmaResult = 0; | 859 | EDMA3_DRV_Result edmaResult = 0; |
860 | #ifdef SIMULATOR_SUPPORT | ||
857 | uint8_t uchValue, uchReadValue; | 861 | uint8_t uchValue, uchReadValue; |
862 | #endif | ||
863 | |||
864 | Board_initCfg arg = BOARD_INIT_MODULE_CLOCK | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO; | ||
865 | Board_init(arg); | ||
858 | 866 | ||
859 | uint32_t temp; | 867 | uint32_t temp; |
860 | /* Get the core number. */ | 868 | /* Get the core number. */ |
diff --git a/example/c674x/MCBSPDigLpbk/mcbspMasterDigLpbk.c b/example/c674x/MCBSPDigLpbk/mcbspMasterDigLpbk.c index 8bc44a3..688d782 100644 --- a/example/c674x/MCBSPDigLpbk/mcbspMasterDigLpbk.c +++ b/example/c674x/MCBSPDigLpbk/mcbspMasterDigLpbk.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * master functionality using Digital Loopback setup. The file configures | 5 | * master functionality using Digital Loopback setup. The file configures |
6 | * the EVM in master mode. | 6 | * the EVM in master mode. |
7 | * | 7 | * |
8 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | 8 | * Copyright (C) 2012 - 2018 Texas Instruments Incorporated - http://www.ti.com/ |
9 | * | 9 | * |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -66,6 +66,7 @@ | |||
66 | /* MCBSP Driver Include File. */ | 66 | /* MCBSP Driver Include File. */ |
67 | #include <ti/drv/mcbsp/mcbsp_drv.h> | 67 | #include <ti/drv/mcbsp/mcbsp_drv.h> |
68 | #include <ti/drv/mcbsp/mcbsp_osal.h> | 68 | #include <ti/drv/mcbsp/mcbsp_osal.h> |
69 | #include <board.h> | ||
69 | 70 | ||
70 | /* PlatformLib Include File */ | 71 | /* PlatformLib Include File */ |
71 | //#include <ti/platform/platform.h> | 72 | //#include <ti/platform/platform.h> |
@@ -84,6 +85,8 @@ extern int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize); | |||
84 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); | 85 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); |
85 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); | 86 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); |
86 | 87 | ||
88 | extern Board_STATUS Board_init(Board_initCfg); | ||
89 | |||
87 | /* FPGA Configuration Misc-1 Register offset */ | 90 | /* FPGA Configuration Misc-1 Register offset */ |
88 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) | 91 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) |
89 | 92 | ||
@@ -851,7 +854,12 @@ Void main(Void) | |||
851 | { | 854 | { |
852 | Task_Params taskParams; | 855 | Task_Params taskParams; |
853 | EDMA3_DRV_Result edmaResult = 0; | 856 | EDMA3_DRV_Result edmaResult = 0; |
857 | #ifdef SIMULATOR_SUPPORT | ||
854 | uint8_t uchValue, uchReadValue; | 858 | uint8_t uchValue, uchReadValue; |
859 | #endif | ||
860 | |||
861 | Board_initCfg arg = BOARD_INIT_MODULE_CLOCK | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO; | ||
862 | Board_init(arg); | ||
855 | 863 | ||
856 | /* Get the core number. */ | 864 | /* Get the core number. */ |
857 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); | 865 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); |
diff --git a/example/k2g/MCBSPDigLpbk/mcbspMasterDigLpbk.c b/example/k2g/MCBSPDigLpbk/mcbspMasterDigLpbk.c index ec0ec8b..888acbe 100644 --- a/example/k2g/MCBSPDigLpbk/mcbspMasterDigLpbk.c +++ b/example/k2g/MCBSPDigLpbk/mcbspMasterDigLpbk.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * master functionality using Digital Loopback setup. The file configures | 5 | * master functionality using Digital Loopback setup. The file configures |
6 | * the EVM in master mode. | 6 | * the EVM in master mode. |
7 | * | 7 | * |
8 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | 8 | * Copyright (C) 2012 - 2018 Texas Instruments Incorporated - http://www.ti.com/ |
9 | * | 9 | * |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -50,6 +50,7 @@ | |||
50 | #include <xdc/runtime/System.h> | 50 | #include <xdc/runtime/System.h> |
51 | 51 | ||
52 | #include <xdc/cfg/global.h> | 52 | #include <xdc/cfg/global.h> |
53 | #include <board.h> | ||
53 | 54 | ||
54 | /* Include EDMA3 Driver */ | 55 | /* Include EDMA3 Driver */ |
55 | #include <ti/sdo/edma3/drv/edma3_drv.h> | 56 | #include <ti/sdo/edma3/drv/edma3_drv.h> |
@@ -81,6 +82,8 @@ extern void McbspDevice_init(void); | |||
81 | 82 | ||
82 | extern int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize); | 83 | extern int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize); |
83 | 84 | ||
85 | extern Board_STATUS Board_init(Board_initCfg); | ||
86 | |||
84 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); | 87 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); |
85 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); | 88 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); |
86 | 89 | ||
@@ -852,7 +855,12 @@ Void main(Void) | |||
852 | { | 855 | { |
853 | Task_Params taskParams; | 856 | Task_Params taskParams; |
854 | EDMA3_DRV_Result edmaResult = 0; | 857 | EDMA3_DRV_Result edmaResult = 0; |
858 | #ifdef SIMULATOR_SUPPORT | ||
855 | uint8_t uchValue, uchReadValue; | 859 | uint8_t uchValue, uchReadValue; |
860 | #endif | ||
861 | |||
862 | Board_initCfg arg = BOARD_INIT_MODULE_CLOCK | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO; | ||
863 | Board_init(arg); | ||
856 | 864 | ||
857 | /* Get the core number. */ | 865 | /* Get the core number. */ |
858 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); | 866 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); |
diff --git a/example/omapl138/MCBSPDigLpbk/mcbspMasterDigLpbk.c b/example/omapl138/MCBSPDigLpbk/mcbspMasterDigLpbk.c index 8bc44a3..3426cd1 100644 --- a/example/omapl138/MCBSPDigLpbk/mcbspMasterDigLpbk.c +++ b/example/omapl138/MCBSPDigLpbk/mcbspMasterDigLpbk.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * master functionality using Digital Loopback setup. The file configures | 5 | * master functionality using Digital Loopback setup. The file configures |
6 | * the EVM in master mode. | 6 | * the EVM in master mode. |
7 | * | 7 | * |
8 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | 8 | * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ |
9 | * | 9 | * |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -66,6 +66,7 @@ | |||
66 | /* MCBSP Driver Include File. */ | 66 | /* MCBSP Driver Include File. */ |
67 | #include <ti/drv/mcbsp/mcbsp_drv.h> | 67 | #include <ti/drv/mcbsp/mcbsp_drv.h> |
68 | #include <ti/drv/mcbsp/mcbsp_osal.h> | 68 | #include <ti/drv/mcbsp/mcbsp_osal.h> |
69 | #include <board.h> | ||
69 | 70 | ||
70 | /* PlatformLib Include File */ | 71 | /* PlatformLib Include File */ |
71 | //#include <ti/platform/platform.h> | 72 | //#include <ti/platform/platform.h> |
@@ -84,6 +85,8 @@ extern int32_t Osal_dataBufferInitMemory(uint32_t dataBufferSize); | |||
84 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); | 85 | extern void McbspXmtInterrupt_init(void *mcbspTxChan); |
85 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); | 86 | extern void McbspRcvInterrupt_init(void *mcbspRxChan); |
86 | 87 | ||
88 | extern Board_STATUS Board_init(Board_initCfg); | ||
89 | |||
87 | /* FPGA Configuration Misc-1 Register offset */ | 90 | /* FPGA Configuration Misc-1 Register offset */ |
88 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) | 91 | #define MCBSP_FPGA_MISC_REG_OFFSET (0x0C) |
89 | 92 | ||
@@ -851,7 +854,12 @@ Void main(Void) | |||
851 | { | 854 | { |
852 | Task_Params taskParams; | 855 | Task_Params taskParams; |
853 | EDMA3_DRV_Result edmaResult = 0; | 856 | EDMA3_DRV_Result edmaResult = 0; |
857 | #ifdef SIMULATOR_SUPPORT | ||
854 | uint8_t uchValue, uchReadValue; | 858 | uint8_t uchValue, uchReadValue; |
859 | #endif | ||
860 | |||
861 | Board_initCfg arg = BOARD_INIT_MODULE_CLOCK | BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_UART_STDIO; | ||
862 | Board_init(arg); | ||
855 | 863 | ||
856 | /* Get the core number. */ | 864 | /* Get the core number. */ |
857 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); | 865 | coreNum = 0; //CSL_chipReadReg (CSL_CHIP_DNUM); |