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.

LAUNCHXL-F280049C: SYSCONFIG / PWM

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hello,

I use SysConfig in my project. I have 2 problems. I don t know if they are linked.

I load the empty example provided by TI for the 49C.

At the beginning of the main source file, the board.h file, which is generated by sysconfig, is included.

But, whatever is the configuration I choose as active, the board.h included is the file that is in the filder susconfig/RAM

So, If I set as active the FLASH configuration, add a PWM with a specific period, it will be not taken into account if the same sysconfig file has not been generated previously for the RAM configuration

How can we include the right board.h ?

Then, my second question:

if you look at my Sysconfig file, you can see that I chose to disable the link between the timer and any PWM module. I cannot understand why this choice is possible, because the timer belongs to a module. Am I wrong ?

when looking at the board.h, I seen that the time base is PWM2

If I try to change this choice and regenerate the board.h file, the Timer is till the PWM2 one:

It is very unconvenient because when we synchronise the SOC of an ADC, we have to look which module Sysconfig chose for the PWM to select the right module in the ADC section.

How to choose the module of the PWM with Sysconfig ?

Thank you.

  • Hi Vincent,

    Thanks for your questions.

    How can we include the right board.h ?

    The correct one should be included AFTER the project is built again. So you will need to build the project again for changes to occur to the board.h/board.c files.

    If I try to change this choice and regenerate the board.h file, the Timer is till the PWM2 one:

    So the issue, if I'm understanding correctly, is actually likely happening because you're trying to edit the generated board.h/board.c files. These are auto-generated by Sysconfig, and when you change the manually, they will get overwritten every time you build the project.

    So solution here is to not edit the board.h/board.c files manually, but through updating Sysconfig.

    Regards,

    Vince

  • Hello.

    Thanks for helping me.

    It seems my explanations were not clear enough.

    Second Problem (the most serious)

    -----------------------------------------------

    These are auto-generated by Sysconfig, and when you change the manually, they will get overwritten every time you build the project.

    No. I don't try to change anything manually, and open the file generated by sysconfig. Seen my screenshots -I made the source of files appear)

    Please follow this example step by step:

    1- load the empty example for 49C

    2- set the FLASH config as active

    3- launch sysconfig, add a PWM handler with Time base linked with ePWM3

    4- build the project and open the generated bord.h

    The period is the vcalue we asked for but the module is PWM2

    First Problem 

    ----------------------------

    Of course I could export the generated file somewhere else in the folder after it is ganerated. 

    The good solution is to use a different include path depending on which configuration is chosen.

    But it should have been done by Texas. You provide an example which has to be use for each project. When I ask something here, your first response is "please use the example provided by C2000Ware". So I expected that everythiing is validated.

    Please please asnwer me quickly, these problems prevent my project to move forward

  • edit: for the first problem, the quickier solution I found is that:

    But I think that a more elegant solution does exist, because when building the project, SysConfig knows where to generate the files (so the project must know where to find the headers)

    Maybe it deals with this include:

    (I didn t find the definition of SYSCONFIG_TOOL_INCLUDE_PATH)

  • edit (again, sorry about that): i ve juste seen I made a mistake. I mixed up the choice for the module and the linking between timer for a module and its period for another one.

    So, please forget the first question. Only the include issue still bother me

  • Hi Vincent,

    Thanks for the follow-ups. So first question is resolved, glad that is found.

    Second question about the include paths: I'm surprised it isn't working as you expected (Sysconfig SHOULD be generating the files in the right paths).

    Maybe you already tried this, but when you build, try clicking "CPU1_FLASH" from the build dropdown. That should automatically swap out the path for Sysconfig's generated output files.

    The solution you created with the #ifdef parameters also will work well, so that is another workaround for it.

    Regards,

    Vince

  • Hello, I did some test.

    It seems that the inclided file is the right one, wathever is the configuration built. The problem is due to the parser. When clicking on the name "board.h" with Ctrl Key in the source C file , it always open the one which is in the RAM folder. Can you try this and come back to me ?

  • Hi vincent,

    I was able to replicate your issue, but deleting the "CPU1_RAM" folder seems to fix the issue (it will open the correct _FLASH folder when you do that).

    Regards,

    Vince