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.

Storing Results

Other Parts Discussed in Thread: TMS320F28335

Hi

I am working with TMS320f28335. How can I store my results (using C language) in specific memory location in order to display these results as graphs using CCS3. Its very helpful if there is an example.

 

Thank you very much

  • #define MemAddr 0x109000 (whatever u like, check memory map)

    float *ptrBuffer;

    void main()

    {

          ptrBuffer=(float *)MemAddr;

          for(i=0;i<Num;i++)

         {

           *(ptrBuffer+i)=SampleValue;

         }

    }

  • Just a couple of things to add to Yu's post.  This is how I would write the code as it will allow less reliance on the memory map (however it is essentially the same as the code above):

    float ptrBuffer[size];

     

    void main()

     {
        int i;

       for (i=0; i < size; i++)

        {

            ptrBuffer[i] = SampleValue;

        }

    }

     

    Note that ptrBuffer can be any data type you want (int,float,unsigned int etc.).  Make sure it is the same data type as SampleValue.

    Tim