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.

Compiler/TMS320F28054M: TMS320F28054M

Part Number: TMS320F28054M


Tool/software: TI C/C++ Compiler

I am trying to setup motor parameters from E2PROM in instaspin labs. My intention is to comment out motor parameters in user.h files and set the values inside code with appropriate values stored in E2Prom.

However, as comment out, any of the parameters, an compiler error is flashed, saying XXXX parameter is not defined. I found out that this error is also triggered via user.h appropriate lines....

In view of this can anybody comment if 

1. instaspin or spintac libraries need these constants inside ?

2. If yes, is there any way to use E2PROM values?

3. If no, can I comment out lines triggering compiler warnings and append code as appropriate?

  • A better way to do what you want is, instead of removing the #define lines from user.h, would be instead to edit the USER_setParams() function that is called in the InstaSPIN labs. Check that function, you'll see all of the variable assignments. Comment out whichever assignment you'd like to change in USER_setParams() function and instead assign the value you want from EEPROM instead.

    Sean