Spaces:

File size: 9,447 Bytes
5aefcf4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
Ticket Name: RTOS: Tda2xx uart can't output print message

Query Text:
Other Parts Discussed in Thread: TDA2 Tool/software: TI-RTOS 1). When I use ccs6 debug tda2xx board, ccs console can't output print message. file_path: vision_sdk/links_fw/src/rtos/bios_app_common/tda2xx/a15_0/src/main_common_a15_0.c In Int32 main_common(void) I put UARTConsoleInit(UART3_INST); UARTprintf(" \r\n***** A15_0 Firmware build time"); after compiling successfully and download it into board through simulation tool, nothing print out on serial port tool when I run it. attach is source file. 2021.main_common_a15_0.c /*
Copyright (c) [2012 - 2017] Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

 Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
 license under copyrights and patents it now or hereafter owns or controls to
 make,  have made, use, import, offer to sell and sell ("Utilize") this software
 subject to the terms herein.  With respect to the foregoing patent license,
 such license is granted  solely to the extent that any such patent is necessary
 to Utilize the software alone.  The patent license shall not apply to any
 combinations which include this software, other than combinations with devices
 manufactured by or for TI ("TI Devices").  No hardware patent is licensed
 hereunder.

 Redistributions must preserve existing copyright notices and reproduce this
 license (including the above copyright notice and the disclaimer and
 (if applicable) source code license limitations below) in the documentation
 and/or other materials provided with the distribution

 Redistribution and use in binary form, without modification, are permitted
 provided that the following conditions are met:

 * No reverse engineering, decompilation, or disassembly of this software
   is permitted with respect to any software provided in binary form.

 * Any redistribution and use are licensed by TI for use only with TI Devices.

 * Nothing shall obligate TI to provide you with source code for the software
   licensed and provided to you in object code.

 If software source code is provided to you, modification and redistribution of
 the source code are permitted provided that the following conditions are met:

 * Any redistribution and use of the source code, including any resulting
   derivative works, are licensed by TI for use only with TI Devices.

 * Any redistribution and use of any object code compiled from the source code
   and any resulting derivative works, are licensed by TI for use only with TI
   Devices.

 Neither the name of Texas Instruments Incorporated nor the names of its
 suppliers may be used to endorse or promote products derived from this software
 without specific prior written permission.

 DISCLAIMER.

 THIS SOFTWARE IS PROVIDED BY TI AND TI�S LICENSORS "AS IS" AND ANY EXPRESS OR
 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 IN NO EVENT SHALL TI AND TI�S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/**
 *******************************************************************************
 *
 * \file main_a15_01.c
 *
 * \brief  This file implements the A15_0 main()
 *
 *         This file has the A15_0 main(), the entry point to the core.
 *         Set the A15 clock and call System_start() & BIOS_start()
 *
 * \version 0.0 (Jul 2013) : [SS] First version
 *
 *******************************************************************************
*/

/*******************************************************************************
 *  INCLUDE FILES
 *******************************************************************************
 */
#include <src/rtos/utils_common/include/utils.h>
#include <include/link_api/system_common.h>
#include <src/rtos/utils_common/include/utils_idle.h>
#include <src/rtos/utils_common/include/utils_timer_reconfig.h>
#include "detector.h"
#include "/usr/local/PROCESSOR_SDK_VISION_03_01_00_00/ti_components/drivers/pdk_01_08_00_16/packages/ti/drv/stw_lld/uartconsole/uartConsole.h"
#include "/usr/local/PROCESSOR_SDK_VISION_03_01_00_00/ti_components/drivers/pdk_01_08_00_16/packages/ti/drv/stw_lld/uartconsole/uartStdio.h"

/*******************************************************************************
 *  Function prototypes
 *******************************************************************************
 */
Int32 System_start(Task_FuncPtr chainsMainFunc);
Int32 StartupEmulatorWaitFxn (void);
Void A15_main(UArg arg0, UArg arg1);
void mainA15TimerTick(UArg arg);

/**
 *******************************************************************************
 *
 * \brief This function implements the wait loop of A15.
 *
 *        This function would get called if the A15_0 doesn't run the demo
 *        or application. It is not used if A15_0 runs the app.  Do not
 *        remove this function, required when App is moved out of A15
 *
 * \param  arg0 [IN]
 * \param  arg1 [IN]
 *
 * \return  void
 *
 *******************************************************************************
 */
Void A15_main(UArg arg0, UArg arg1)
{
    UInt32 state;
    //UInt32 coreId = System_getSelfProcId();

    while (1)
    {
        BspOsal_sleep(100U);
        //Utils_getAppInitState(coreId, &state);
        //if (state == CORE_APP_INITSTATUS_DO_EXIT)
        //{
        //    break;
        //}
        test_main();
    }
}

/**
 *******************************************************************************
 *
 * \brief This is the main() implementation of A15.
 *
 *        This is the first function  and entry point to A15, does
 *         - Set the correct/required CPU frequency
 *         - Call the System_start with A15_main() and loops there
 *
 * \return  SYSTEM_LINK_STATUS_SOK
 *
 *******************************************************************************
 */
Int32 main_common(void)
{
    /* This is for debug purpose- see the description of function header */
    StartupEmulatorWaitFxn();

    /* This should the first call for initializing the remote debug server
     */
    RemoteLog_init();
    Vps_printf(" ***** A15_0 Firmware build time %s %s \n",
               __TIME__,__DATE__);


    {
        UInt32 clkHz;

        clkHz = Utils_getClkHz(UTILS_CLK_ID_A15);

        if(clkHz==0U)
        {
            clkHz = SYSTEM_A15_FREQ;
        }

        Utils_setCpuFrequency(clkHz);
    }

    //Utils_idlePrepare();
    UARTConsoleInit(UART3_INST);
    //BOARDConfigModulePinMux(DEVICE_ID_UART, DEVICE_UART_INST_ID_3,BOARD_MODE_DEFAULT);
    //BOARDSelectDevice(DEVICE_ID_UART, DEVICE_UART_INST_ID_3);
    //PlatformUART3SetPinMux();
    //UARTStdioInit();

    //UARTConsoleInit(UART2_INST);
    //UARTPuts("\r\nUart Init Done \r\n", -1);
    //UART_Init(UART3_INST);
    UARTprintf(" \r\n***** A15_0 Firmware build time");
    //UARTPuts("\r\nUart Init Done \r\n", -1);

    System_start(A15_main);
    
    BIOS_start();
    
    /* test sourcode */
    

    return (SYSTEM_LINK_STATUS_SOK);
}

/**
 *******************************************************************************
 *
 * \brief This function enables the A15 debug option
 *
 *        This function enables the A15 debug option from main() onwards
 *         - Set the volatile variable enableDebug = 1 to enable debug
 *         - rebuild the code with enableDebug = 1
 *         - Once enableDebug is set to 1, the control waits in this
 *           function even after the free-run
 *         - Can connect to core A15via CCS and J-Tag to debug
 *         - Once CCS is connected, reset enableDebug = 0 to come out of
 *           this function and proceeds with further debug
 *
 * \return  SYSTEM_LINK_STATUS_SOK
 *
 *******************************************************************************
 */
Int32 StartupEmulatorWaitFxn (void)
{
    volatile Int32 enableDebug = 0;
    do
    {
    }while (enableDebug);
    return SYSTEM_LINK_STATUS_SOK;
}

/**
 *******************************************************************************
 *
 * \brief This function enables the A15 Timer Ticks
 *
 * \param  arg [IN]
 *
 *******************************************************************************
 */
void mainA15TimerTick(UArg arg)
{
    Clock_tick();
}

/* Nothing beyond this point */

Responses:
Hi, I have forwarded your question to an expert for comment. Regards, Yordan

when will expertt contact me ? does the expert contact me by this forum or by email ?

Hi Xiangtong, Are you using the TI EVM for this test? The TDA2xx TI EVM does not have UART3 populated. If your board does have UART3 populated, you can check on the following aspects: 1. Has the UART3 IP PRCM been enabled? (Clocks enabled for the IP) 2. The pin muxing has been done properly for the UART3 lines to be sent out the TDA2 device based on your board schematics. Thanks and Regards, Piyali

Hi Xiangtong, We haven't heard back from you on this one.. Is this resolved? Thanks and Regards, Piyali