TI中文支持网
TI专业的中文技术问题搜集分享网站

c6678 uart nor

hi,
我用的是tmdsevm6678le评估板,仿真器xds560,在跑ti\pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_test时,其他均正常,只有uart和nor失败,详情如下

nor:

[C66xx_0] Current core id is 0
[C66xx_0] EEPROM test start
[C66xx_0] test_eeprom: passed
[C66xx_0] EEPROM test complete
[C66xx_0] NAND test start
[C66xx_0] test_nand: passed
[C66xx_0] NAND test complete
[C66xx_0] NOR test start
[C66xx_0] test_nor: Read failed errno = 0x2
[C66xx_0] NOR test complete

uart:

[C66xx_0] Current core id is 0
[C66xx_0] UART test start
[C66xx_0] Open a serial port console in a PC connected to
[C66xx_0] the board using UART and set its baudrate to 115200
[C66xx_0] You should see following message —[C66xx_0] This is a Platform UART API unit test …
[C66xx_0] Type 10 characters in serial console

于是我把程序换成论坛上提供的测试程序KI_STK_20140123,中的uart,还是失败,具体现象如下:

[C66xx_0] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHz
[C66xx_0][C66xx_0] Init UART0 at 115200bps in loopback mode…
[C66xx_0] Required baud rate 115200, effective baud rate 115740!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 1024 correct bytes. Consumes 88471996 cycles, throughput is 92Kbps
[C66xx_0][C66xx_0] Init UART0 at 230400bps in loopback mode…
[C66xx_0] Required baud rate 230400, effective baud rate 231481!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 0 correct bytes. Consumes 44236354 cycles, throughput is 185Kbps
[C66xx_0][C66xx_0] Init UART0 at 460800bps in loopback mode…
[C66xx_0] Required baud rate 460800, effective baud rate 452898!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 0 correct bytes. Consumes 22609858 cycles, throughput is 362Kbps
[C66xx_0][C66xx_0] Init UART0 at 921600bps in loopback mode…
[C66xx_0] Required baud rate 921600, effective baud rate 946969!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 0 correct bytes. Consumes 10813630 cycles, throughput is 757Kbps
[C66xx_0][C66xx_0] Init UART0 at 1843200bps in loopback mode…
[C66xx_0] Required baud rate 1843200, effective baud rate 1736111!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 0 correct bytes. Consumes 5898694 cycles, throughput is 1388Kbps
[C66xx_0][C66xx_0] Init UART0 at 3686400bps in loopback mode…
[C66xx_0] Required baud rate 3686400, effective baud rate 3472222!
[C66xx_0] UART0: Tx 1024 bytes, Rx 1024 bytes, 0 correct bytes. Consumes 2949652 cycles, throughput is 2777Kbps
[C66xx_0][C66xx_0] Init UART0 at 115200bps…
[C66xx_0] Required baud rate 115200, effective baud rate 115740!
[C66xx_0] Start print character code from 0 to 255 over UART0…

在尝试打印字符后,就卡住了,我的串口上位机程序也没有反应,当然我的串口线已经连上,com1打开,波特率也设成了115200,请问是我的配置哪里有问题吗?还是买来的板子uart模块有问题?另外,nor flash通过spi驱动,所以我尝试运行KI_STK_20140123,中的spi,运行仍然失败,请教下是哪里有问题,会是nor flash芯片的原因吗?
[C66xx_0] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHz
[C66xx_0][C66xx_0] SPI internal loopback test at 66MHz…
[C66xx_0] SPI loopback test passed with data pattern 0x0. Throughput= 32Mbps
[C66xx_0] SPI loopback test passed with data pattern 0xffff. Throughput= 32Mbps
[C66xx_0] SPI loopback test passed with data pattern 0x5555. Throughput= 32Mbps
[C66xx_0] SPI interrupt test: manually generate RX overrun error…

另外我在跑KI_STK_20140123的程序时都是不能单步执行的,显示如下:
No source available for "main() at SPI\Debug\SPI.out:{3} 0xc06aa84{4}"请问是需要在哪里设置吗?
总结下我的问题:
1.uart配置哪里有问题?还是说板子uart模块有问题?
2.spi驱动nor flash,代码运行失败,会是哪里的问题?
3.KI_STK_20140123的程序不能单步执行,是哪里设置有问题?
菜鸟提问,各位大神多多指教

Allen35065:

1,你去下一个最新的MCSDK, 运行一下POST工程看看有没有问题C:\ti\mcsdk_2_01_02_06\tools\post,当然先要验证你的PC串口OK,EVM上有个跳线控制UART是走USB或者串口针,你看看跳线是否正确;

2, 还是上面那样,保证BOOT mode设置到NO BOOT,按照C:\ti\mcsdk_2_01_02_06\tools\post\docs的步骤运行POST看看,

3, STK不能单步是因为打开了优化,在编译菜单里关闭优化重编译即可。

aderlice:

回复 Allen35065:

hi  Allen Yin,

首先非常感谢你的回答,你说的很对,我尝试改变跳线的连接后,串口已经可以正常调通了,我会按照你说的去下载一个最新的mcsdk,然后继续尝试,如果有新的进展会更新在这里,谢谢

aderlice:

回复 Allen35065:

hi,你是对的,我确实在ti\mcsdk_2_01_02_05\tools\writer\nor找到了一个nor操作的示例代码,可以正常运行,我对比了下D:\ti\pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_test的项目,发现是在malloc时出现了问题,应该是我设置的内存太小,请问怎么能加大内存?请多多指点,我的cmd文件内容如下:/****************************************************************************** * Copyright (c) 2011 Texas Instruments Incorporated – http://www.ti.com *  *  Redistribution and use in source and binary forms, with or without  *  modification, are permitted provided that the following conditions  *  are met: * *    Redistributions of source code must retain the above copyright  *    notice, this list of conditions and the following disclaimer. * *    Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the  *    documentation and/or other materials provided with the    *    distribution. * *    Neither the name of Texas Instruments Incorporated nor the names of *    its contributors may be used to endorse or promote products derived *    from this software without specific prior written permission. * *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  *  "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 THE COPYRIGHT  *  OWNER OR CONTRIBUTORS 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. *  *****************************************************************************//* *  Linker command file * */-c-heap  0x40000-stack 0x8000/* Memory Map 1 – the default */MEMORY{    L1PSRAM (RWX)  : org = 0x0E00000, len = 0x7FFF    L1DSRAM (RWX)  : org = 0x0F00000, len = 0x7FFF     L2SRAM (RWX)   : org = 0x0820000, len = 0x200000    MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000    DDR3 (RWX)     : org = 0x80000000,len = 0x10000000}SECTIONS{    .csl_vect   >       L2SRAM    .cppi       >       L2SRAM    .linkram    >       L2SRAM    .mac_buffer >       L2SRAM    platform_lib >     L2SRAM    .text       >       L2SRAM    GROUP (NEAR_DP)    {    .neardata    .rodata     .bss    } load > L2SRAM    .stack      >       L2SRAM    .cinit      >       L2SRAM    .cio        >       L2SRAM    .const      >       L2SRAM    .data       >       L2SRAM    .switch     >       L2SRAM    .sysmem     >       L2SRAM    .far        >       L2SRAM    .testMem    >       L2SRAM    .fardata    >       L2SRAM}

aderlice:

回复 Allen35065:

谢谢

赞(0)
未经允许不得转载:TI中文支持网 » c6678 uart nor
分享到: 更多 (0)