This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28379D:32位地址限制为16位、并在使用 EMIF 和 SDFM 功能时返回起始地址。

Guru**** 2587365 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1232745/tms320f28379d-32-bit-addresses-are-limited-to-16-bits-and-returned-to-the-start-address-while-using-emif-and-sdfm-feature

器件型号:TMS320F28379D

你好。 成员.  

在使用 EMIF 和 SDFM 功能时、我遇到了"32位地址限制为16位并返回起始地址"的问题。  

这里是背景信息。  

0. Launchpad f28379d 和 F28379D_EMIF_DC 子卡通过 EMIF1连接。

SDFM 数据存储在 Filter2_result 缓冲区中1024点。 数据滤波器输出格式由32位设置。   

存储1024点后、使用"memcpy_far_fast"函数通过 EMIF1将这些数据从缓冲区复制到 far SDRAM 存储器的 SrcBuffer。

3.我想做的是在 SDRAM 上存储超过百万个数据点。 为此、按照我的要求重复执行步骤2。(>64次、64 * 1024 = 65536。)

以下是用于实现上述背景的 SDFM 中断部分代码。

__interrupt void Sdfm1_ISR(void)
{
    volatile int32 *srcptr;
    volatile int32 *srcptrnew;
    srcptr = srcBuffer;

    Uint32 sdfmReadFlagRegister = 0;
    static uint16_t loopCounter1 = 0;
    static uint16_t loopCounter2 = 0;
    
    sdfmReadFlagRegister = Sdfm_readFlagRegister(gPeripheralNumber);
    if(loopCounter1 > MAX_SAMPLES)
    {
        loopCounter1 = 0;  // Reset the counter. Add breakpoint at below statement to view the filter results in graph view.
        srcptrnew = srcptr + loopCounter2*1024;
        loopCounter2++;
        memcpy_fast_far((volatile void*)srcptrnew, (volatile const void*)Filter2_Result, MAX_SAMPLES*2);
       
        if(loopCounter2 == 65) 
            {ESTOP0;
            }
        else;

    }else; 
    while((sdfmReadFlagRegister & 0x2000) != 0x2000)
    {
    }
    Filter2_Result[loopCounter1++] = SDFM1_READ_FILTER2_DATA_32BIT; 
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP5;
}

问题如下。  

我期望的是 srcBuffer 的地址可以表示在16位范围内。(int32)  

但在传递65536之后、地址返回到 srcBuffer 的起始地址。  

因此、我无法使我的数据存储的数量范围超过16位。

这是相应地址的内存浏览器。 (1024个数据点的第65间隔)

 

这是 srcBuffer 的65536数组数据。(数组首先由值"7965"初始化)

显示在65535个阵列之后、没有更新的阵列数据。  

我看到了与 memcpy_fast_far 函数相关的线程、其中提到 FAST far 函数对超过22位的地址有效。  

因此、我想 memcpy_fast_far 函数可以处理65535多个数据点。  

在这种情况下、我可以检查什么以确保正常运行? 或者,如果它不可用,请引导我正确的方式。  

谢谢你。  

祝你一切顺利。