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.

CCS/TMS320F28069: TMDSPLCKIT-V3

Part Number: TMS320F28069
Other Parts Discussed in Thread: AFE031, TMS320F280049, C2000WARE, LAUNCHXL-F28379D

Tool/software: Code Composer Studio

Hi,

I am new to C2000 controller programming. I want to interface F28069 control card with AFE031 on TMDSPLCKIT-V3 Texas Instruments  kit.

I want to do similar work as what is done in project boostxl_afe031_f28379d_pwmmode

What changes should i make in boostxl_afe031_f28379d_pwmmode_main.c and in other files to configure it for f28069 pwmmode.

Please suggest . Thanks for the same.

Regards

Ankur

 

 

  • Hi,

    Thanks for reaching out to C2000 E2E forum. I have routed your query to a TI employee and you can expect a response in the next 24 hours.


    Thanks & Regards

    Pramod

  • Ankur,

    We have ported the example code you reference to also work on the TMS320F280049 device, which is more similar to the F28069 that you mentioned.  I believe the below tools/SW is going to be the quickest way for you to move forward with your design.

    You would need 

    http://www.ti.com/tool/LAUNCHXL-F280049C  $30.00

    http://www.ti.com/tool/BOOSTXL-AFE031 $49.00

    and example code http://dev.ti.com/tirex/explore/node?node=AHd1aG1WMMSw4-li.NBGlQ__gYkahfz__LATEST (or equivalent path in a local C2000Ware installation.

    Best,

    Matthew

  • Hello Matthew,

    Thanks for the reply. There is one correction in previous post.

    In previous post I mentioned that I want to do similar work as what is done in project boostxl_afe031_f28379d_pwmmode.  But I meant for  boostxl_afe031_f28379d_dacmode or boostxl_afe031_f2004x_dacmode

    Now, I have one query. In f28069 there is no direct connection between DMA and SPI then what changes should I made in the code boostxl_afe031_f2004x_dacmode,c to send data over SPI to afe031.

    Also please mention the changes needs  to be done in boostxl_afe031_f28004x_sci.c wrt to f28069.

    And where can I find the header file similar to boostxl_afe031_f28004x_dacmode_isr.h and boostxl_afe031_f28004x_sci.h for f28069.

    Thanks for the help.

    Best Regards

    Ankur Chauhan

  • Hi Ankur,

    Ankur Chauhan1 said:
    Now, I have one query. In f28069 there is no direct connection between DMA and SPI then what changes should I made in the code boostxl_afe031_f2004x_dacmode,c to send data over SPI to afe031.

    The DMA is used for moving the calculated sine table values (from 'fill_SineTable' function) to the SPI TX buffers in a ping-pong buffer fashion. You would need to replace this functionality in software using the CPU or CLA. Essentially you need to replace the dma_isr functionality, which is triggered off a PWM (~1MHz ISR frequency).

    The DMA in this example is used to save CPU overhead. The f2806x being a slower device (max 90 MHz vs 200 MHz), I'm not 100% if it will have the CPU bandwidth to handle this functionality.

    Ankur Chauhan1 said:
    Also please mention the changes needs  to be done in boostxl_afe031_f28004x_sci.c wrt to f28069.

    Not certain. It may just be minor changes like GPIOs. Also the F2806x SCI module's FIFO is 4 bytes instead of 16.

    Ankur Chauhan1 said:
    And where can I find the header file similar to boostxl_afe031_f28004x_dacmode_isr.h and boostxl_afe031_f28004x_sci.h for f28069.

    These should be in C2000ware:

    C:\ti\c2000\C2000Ware_2_01_00_00\device_support\f2806x\common\include

    and

    C:\ti\c2000\C2000Ware_2_01_00_00\device_support\f2806x\headers\include

    Best,

    Kevin

  • Ankur,

    Why don't you use either the LAUNCHXL-F28379D or LAUNXHL-F280049C platforms instead of trying to port to F2806x?

    Best,

    Kevin

  • Hello Kevin,

    Thanks for the response. My university already have TMDSPLCKIT-V3 kit . Now i want to use this kit for my thesis work and need to generate 1Khz sinusoidal signal to be sent over power line.

    Regards

    Ankur Chauhan

  • Hello Kevin,

    Thanks for the response.

    You mentioned to use CPU or CLA. Is it not possible to transfer data from ePWM peripheral to DMA and the from DMA to McBSP TX buffer and then over SPI and finally to AFE031?

    Regrads

    Ankur Chauhan

  • Hi Ankur,

    The McBSP module does have DMA hook-up and can be configured as a SPI, so you're correct that may be an alternative to using the default SPI peripherals.

    Best,

    Kevin

  • Hi Kevin,

    Thanks for clearing the query. I have one more query related to boostxl_afe031_f2004x_dacmode_main.c . 

    While going through this task I found that we are using SPI TX buffer for the data coming from DMA. But we haven't initialize HAL_spi_init() function anywhere.

    I just need to ask then how we are transferring data from f28004x launchpad to AFE031 module?

    Please correct me if I am wrong in my query regarding any concept and help me understanding this.

    Thanks.

    Regards

    Ankur

  • Hi Ankur,

    Ankur Chauhan1 said:

    While going through this task I found that we are using SPI TX buffer for the data coming from DMA. But we haven't initialize HAL_spi_init() function anywhere.

    I just need to ask then how we are transferring data from f28004x launchpad to AFE031 module?

    I'd suggest looking deeper at the HAL_afe031Init(void) function within the afe031_config.c file for how the AFE031 initialization is performed. Press "F3" (in CCS) on the function calls to jump to the definition. Note that the driver implementation within the afe031 specific files are written a little different than the SPI comms in the main code (i.e. compared to DMA to SPI usage for transmitting sine values), but it's overall the same concept with writing to C2000 SPI registers.

    Best,

    Kevin