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.

Help needed to run a C2000 PLC C example from Code Composer

Other Parts Discussed in Thread: AFE031

I am trying to run the (PRIME) example described in the Appendix B (page 65) of the TI_PRIME_UG.pdf (part of the TI PLC Development Kit) as follows:

- I successfully imported the TI_prime_phy_example project into Code Composer 5.3.0

- The example compiles without any issues, the PHY/AFE related libraries appear to be referenced properly

Using the Debugger
- I downloaded the generated phy_tx_rx_f2806x.out to CPU#1, reset and start CPU#1

- I downloaded the generated phy_tx_rx_f2806x.out to CPU#2, reset and start CPU#2


At this point the 2 modems should exchange packets and their LEDs should go on and off (every 8 pkts the LED's status is flipped). But there is no blinking going on at all.


Doing some step debugging I looked (in the debugger) at the return of the function that sends packets to the AFE031:

  phy_status = PHY_txPpdu(&PHY_tx_ppdu_s, cb_tx);


The phy_status reports PHY_STAT_SUCCESS, however, the call back function cb_tx is not called at all (the code for the LED that is supposed to be turned on/off is in this function), nothing seems to actually happen.

I would appreciate any suggestions at all.

Thank you,

Alex

  • Hi Alex, 

    Which version of PRIME package are you using? We will test the PHY example and let you know the results. Thanks. 

    Wonsoo

  • Hi Wonsoo,

    I am using PrimeDevelopmentPackageV7710, also, please note that I had successfully had the 2 modems exchange packets (using the Zero Configuration GUI) when loading both the G3 and PRIME pre-compiled images supplied with the package, so I know that the setup as a whole is working.

    Thank you,

    Alex

  • Hi Wonsoo,

    Would you have an update on this issue? Have you been able to reproduce the problem or the example is actually running properly on your side?

    Thank you,

    alex

  • Hi Alex, 

    I've run PHY example in PRIME 7.7.1.0 and did see cb_tx called. You can verify it by simply running a single node and put a breakpoint in cb_tx. I've checked that txppdu_cnt increases by 1. Based on the code, the LED is blinking every 8 packet transmissions. 

    The reason why you didn't see the LED blinking would be collisions when both the nodes try to send. So, for a node, rebuild the PHY example by commenting out the PHY_txPpdu in the main func (as below). Then, the node will start with RX mode first and the other node starts with TX mode. I've checked that LED is blinking. 

    /* Start PHY Rx */
    PHY_rxStart(0xFFFF, cb_sync);

    /* Start TX for the first time */
    //PHY_txPpdu(&PHY_tx_ppdu_s, cb_tx);

    Regards,

    Wonsoo

  • Hi Wonsoo,

    I modified the code as per your advise and everything started working as expected with the mention that I had to use a power cord NOT plugged into the grid - but I suspect this may be a limitation of the example.

    Thank you for your help, I may ask you a few more questions as I am progressing with the sw development.

    Regards,

    alex

  • Hi

          I downloaded PrimeDevelopmentEvalPackageV7710 from http://www.ti.com/lsds/ti/apps/smartgrid/plcmodem/product.page#software. However, I could not find any TI_prime_phy_example project or any binary file phy_tx_rx_f2806x.out from the directory .\PrimeDevelopmentEvalPackageV7710\. Please let me know where I can find these phy_example projects?

    Thank you in advance

    -Jim

  • Hi Jim, 

    You can find the full package including PHY example from USB stick provided with V3 kit. Once installing the sw package, you will find the PHY example.zip under SW directory. Thanks. 

    Regards,

    Wonsoo

  • Hi Wonsoo Kim

              Thank you for your quick response. I found the code under the folder PrimeDevelopmentPackageV6000 which comes with the USB stick (I thought this is an old version). However, I cannot use my CCSv5.3 to open the source files under the project phy_tx_rx_vcu. There is a '!' in front of the file test_tx_rx.c and once I clicked it shows that "Error retrieving content description for resource: /test_tx_rx.c." Please let me know how to use CCSv5.3 to turn on the projects.

    Thank you 

    -Jim

  • 7585.ti_plc_prime_phy_example.zip

    Hi Jim, 

    Please, find the attached PHY example project. Thanks. 

    Wonsoo

  • Hi Woonsoo

        I'm sorry for late reply and thank you very much for your attached file. After I ran it on both of my PLC kits, the LEDs started flashing and it seems to work now. I have another question. I'm interested in understanding how the function PHY_rxSmRun() works. Eventually, I would like to determine the frequency response of the power-line channel and I believe starting by studying the function PHY_rxSmRun() might be the best option. However, I am not sure where to look for the code of this function so could you please let me know where can I study the algorithm in the function PHY_rxSmRun()?

    Thank you very much

    -Jim

  • Hello Woonsoo, 

    I'm having an issue about my USB stick. It does not complete the installation. 

    When we entered in contact with TI's support, they say to us that all the content of the stick can be found at the website. 

    However, I cannot find the complete package from PRIME v7710 anywhere (neither the evaluation, the link above is not working). 

    What should I do to get the complete version? If necessary I can send pictures from the kit, or any other required information that proves that I bought this kit.

    I hope you can help me out to solve this problem.

    Regards, 

    Rafael

  • Hi Rafael,

    Could you please request the software package via plc_support@list.ti.com? Thanks.

    Wonsoo