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.

TMS320F28069: Proj_Lab05d resources

Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE, MOTORWARE

Hi,

Trying to adapt Lab05d into an application that I have, adding some code into the project.

This raised some intriguing questions in me, maybe someone can help. Maybe my question could be a silly one, but couldn't figure out an answer for myself, thought better addressed on this forum.

The code that I want to add into the project uses 2 DMA channels. I am using L5 DMARAM in conjunction with the DMA channels. From View->Memory Allocatio within CCS, I can see that L5 RAM is free, but not sure about the DMA channels though;  Wondering whether the DMA resources what I am trying to use might be in use with the SpinTAC library ? I was thinking how to understand what resources are available/free when the SpinTAC library is used wrt Lab05d. Are there any other pitfalls in my thought process ?

Any thoughts ?

Thanks,

Manu

  • Please refer to the TMS320F2806xM InstaSPIN-MOTION Technical Reference Manual as below, L8 is reserved for the FAST and SpinTAC library.
    www.ti.com/.../spruhj0b.pdf

    And a DMA example code can be found in controlSUITE, you could refer it to configure the registers for DMC.
    C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\dma_ram_to_ram
  • Hi Yanming,

    Thanks for the pointer.

    Were you pointing out that I can do a DMA of the application data in RAM to the RAM location in use by Proj_Lab05d ?
    That would be an interesting thought and idea to improve performance, though that was not my question.
    My thought was that: I do need 2 DMA channels for a LCD application. The though was simple, what if the DMA channels are in use by Lab05, or is it at all ? That was the question lingering in my mind. To understand this situation, hence my original post.

    Thanks,

    Manu
  • There is no example code supporting DMA in motorWare, you have to refer to the DMA example in controlSUITE and port it to the lab project of motorWare. You could use any DMC channel in your project since all lab project of motorWare don't use DMA by default.
  • I was able to get DMA working in that particular situation and it appears to be working as expected. Eventually, the only problem was that motorware has been using hal and what I worked upon was based on direct register access. It was really hell initially with mixed register access and hal. Eventually, removed hal from most of the places, except the places where it was absolutely necessary. Though not very clean, appears to be much better than the initial situation.
  • That said, I have a question:
    L8 last part is used for InstaSPIN variables, address.
    So, which area can I safely use for my DMA use case ?

    In the actual Proj 5 all RAM is allocated L0-L8, I had to make the following change, for allocating a DMA'able region.

    // RAML0_L8 : origin = 0x008000, length = 0x00B800 /* on-chip RAM block RAML0-L8. From 0x13800 to 0x14000 is reserved for InstaSPIN */
    RAML0_L7 : origin = 0x008000, length = 0x009800 /* on-chip RAM block RAML0-L7. From 0x13800 to 0x14000 is reserved for InstaSPIN */

    Since I am using only about 2K or RAM, I suppose I am not overwriting any of InstaSPIN stuff.
    What do you think ?
  • You could use any DPSARAM sections supporting DMA except L8 part from 0x13800 to 0x14000, like L5, L6 or L7 is ok.