TMS320F28027F: TMS320F28027with DRV8301 to run bldc motor

Part Number: TMS320F28027F
Other Parts Discussed in Thread: TMS320F28027, DRV8301, MOTORWARE

Tool/software:

"My scop of work is to run a motor using UART commands. I have added and written the logic for SCI (Serial Communication Interface) functions, but I cannot enter any commands as it is running automatically. Guide me anyone.

  • Part Number: TMS320F28027F

    Tool/software:

    I am using the TMS320F28027 with the DRV8301 to control a motor via UART commands. However, the motor is not running according to the commands. I have attached the main.c file below. I am working with Project 11. Please let me know what might be the issue .    " main.Png

    Please See the code and verify logic and Let me know

  • Hello,

    It seems the image and .c were not attached. Can you please use the E2E buttons to do so? You can by clicking "Insert" > "Image/Video/File" > "Upload" and select your files to attach.

    Are there specific errors you see when scoping the SCI pins to validate proper communication? Is this project in development or has it already run successfully with proper motor control and this issue has appeared due to some change in software/hardware?

    Best Regards,

    Allison

  • Hi Allison Nguyen

    I have attanched file below main.c file. Please  check code any modification in main.c file please let me know

    main.c

    4401.main.c
    /* --COPYRIGHT--,BSD
     * Copyright (c) 2012, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * --/COPYRIGHT--*/
    //! \file   solutions/instaspin_foc/src/proj_lab02b.c
    //! \brief  All control from user code, only FAST�feedback from ROM
    //!
    //! (C) Copyright 2011, Texas Instruments, Inc.
    
    //! \defgroup PROJ_LAB02B PROJ_LAB02B
    //@{
    
    //! \defgroup PROJ_LAB02B_OVERVIEW Project Overview
    //!
    //! Run InstaSPIN�FOC from user memory (RAM/FLASH), only FAST�in ROM
    //!
    
    // **************************************************************************
    // the includes
    
    // system includes
    #include <math.h>
    #include "main.h"
    
    #include "sw/drivers/sci/src/32b/f28x/f2802x/sci.h"
    #include "hal.h"
    #include "hal_obj.h"
    
    
    #ifdef FLASH
    #pragma CODE_SECTION(mainISR,"ramfuncs");
    #endif
    
    // Include header files used in the main function
    
    
    // **************************************************************************
    // the defines
    
    #define LED_BLINK_FREQ_Hz   5
    
    
    // **************************************************************************
    // the globals
    
    uint_least16_t gCounter_updateGlobals = 0;
    
    bool Flag_Latch_softwareUpdate = true;
    
    CTRL_Handle ctrlHandle;
    
    #ifdef CSM_ENABLE
    #pragma DATA_SECTION(halHandle,"rom_accessed_data");
    #endif
    HAL_Handle halHandle;
    
    #ifdef CSM_ENABLE
    #pragma DATA_SECTION(gUserParams,"rom_accessed_data");
    #endif
    USER_Params gUserParams;
    
    HAL_PwmData_t gPwmData = {_IQ(0.0), _IQ(0.0), _IQ(0.0)};
    
    HAL_AdcData_t gAdcData;
    
    _iq gMaxCurrentSlope = _IQ(0.0);
    
    #ifdef FAST_ROM_V1p6
    CTRL_Obj *controller_obj;
    #else
    
    #ifdef CSM_ENABLE
    #pragma DATA_SECTION(ctrl,"rom_accessed_data");
    #endif
    
    CTRL_Obj ctrl;              //v1p7 format
    #endif
    
    uint16_t gLEDcnt = 0;
    
    volatile MOTOR_Vars_t gMotorVars = MOTOR_Vars_INIT;
    
    #ifdef FLASH
    // Used for running BackGround in flash, and ISR in RAM
    extern uint16_t *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;
    
    #ifdef F2802xF
    extern uint16_t *econst_start, *econst_end, *econst_ram_load;
    extern uint16_t *switch_start, *switch_end, *switch_ram_load;
    #endif
    #endif
    
    
    #ifdef DRV8301_SPI
    // Watch window interface to the 8301 SPI
    DRV_SPI_8301_Vars_t gDrvSpi8301Vars;
    #endif
    
    #ifdef DRV8305_SPI
    // Watch window interface to the 8305 SPI
    DRV_SPI_8305_Vars_t gDrvSpi8305Vars;
    #endif
    
    // **************************************************************************
    // the functions
    
    //Added
    // Define motor control and UART variables
    bool isMotorOn = false;
    bool isWaitingTxFifoEmpty = false;
    bool isTxOffDelayActive = false;
    int txOffDelayCounter = 0;
    int txOffDelayCount = 1000;  // Example delay count
    int counter = 0;
    char buf[8];
    char returnBuf[8];
    
    HAL_Obj *halHandle;
    
    
    
    
    // Added
    
    uint16_t boardId = '5';
    
    volatile bool isVoltageTooLow = true;
    _iq lowVoltageThreshold = _IQ(0.01);
    
    bool isCommandReceived = false;
    bool isCommandStart = false;
    bool isOpenLoop = false;
    bool shouldSendSpeed = false;
    
    
    // Constants for command processing
    #define BUF_SIZE 8
    #define CMD_RX_ON "RX_ON"
    #define CMD_RX_OFF "RX_OFF"
    
    
    // Globals for UART and motor control
    //static char buf[BUF_SIZE];
    
    
    
    
    void main(void)
    {
      uint_least8_t estNumber = 0;
    
    
    #ifdef FAST_ROM_V1p6
      uint_least8_t ctrlNumber = 0;
    #endif
    
      // Only used if running from FLASH
      // Note that the variable FLASH is defined by the project
      #ifdef FLASH
      // Copy time critical code and Flash setup code to RAM
      // The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
      // symbols are created by the linker. Refer to the linker files.
      memCopy((uint16_t *)&RamfuncsLoadStart,(uint16_t *)&RamfuncsLoadEnd,(uint16_t *)&RamfuncsRunStart);
    
      #ifdef CSM_ENABLE
        //copy .econst to unsecure RAM
        if(*econst_end - *econst_start)
          {
            memCopy((uint16_t *)&econst_start,(uint16_t *)&econst_end,(uint16_t *)&econst_ram_load);
          }
    
        //copy .switch ot unsecure RAM
        if(*switch_end - *switch_start)
          {
            memCopy((uint16_t *)&switch_start,(uint16_t *)&switch_end,(uint16_t *)&switch_ram_load);
          }
      #endif
      #endif
    
      // initialize the hardware abstraction layer
      halHandle = HAL_init(&hal,sizeof(hal));
    
    
      // check for errors in user parameters
      USER_checkForErrors(&gUserParams);
    
    
      // store user parameter error in global variable
      gMotorVars.UserErrorCode = USER_getErrorCode(&gUserParams);
    
    
      // do not allow code execution if there is a user parameter error
      if(gMotorVars.UserErrorCode != USER_ErrorCode_NoError)
        {
          for(;;)
            {
              gMotorVars.Flag_enableSys = false;
            }
        }
    
    
      // initialize the user parameters
      USER_setParams(&gUserParams);
    
    
      // set the hardware abstraction layer parameters
      HAL_setParams(halHandle,&gUserParams);
    
    
      // initialize the controller
    #ifdef FAST_ROM_V1p6
      ctrlHandle = CTRL_initCtrl(ctrlNumber, estNumber);        //v1p6 format (06xF and 06xM devices)
      controller_obj = (CTRL_Obj *)ctrlHandle;
    #else
      ctrlHandle = CTRL_initCtrl(estNumber,&ctrl,sizeof(ctrl)); //v1p7 format default
    #endif
    
    
      {
        CTRL_Version version;
    
        // get the version number
        CTRL_getVersion(ctrlHandle,&version);
    
        gMotorVars.CtrlVersion = version;
      }
    
    
      // set the default controller parameters
      CTRL_setParams(ctrlHandle,&gUserParams);
    
    
      // setup faults
      HAL_setupFaults(halHandle);
    
    
      // initialize the interrupt vector table
      HAL_initIntVectorTable(halHandle);
    
    
      // enable the ADC interrupts
      HAL_enableAdcInts(halHandle);
    
    
      //Added
    
      // enable the SCI interrupts
        HAL_enableSciInts(halHandle);
    
    
    
      // enable global interrupts
      HAL_enableGlobalInts(halHandle);
    
    
      // enable debug interrupts
      HAL_enableDebugInt(halHandle);
    
    
      // disable the PWM
      HAL_disablePwm(halHandle);
    
    
    #ifdef DRV8301_SPI
      // turn on the DRV8301 if present
      HAL_enableDrv(halHandle);
      // initialize the DRV8301 interface
      HAL_setupDrvSpi(halHandle,&gDrvSpi8301Vars);
    #endif
    
    #ifdef DRV8305_SPI
      // turn on the DRV8305 if present
      HAL_enableDrv(halHandle);
      // initialize the DRV8305 interface
      HAL_setupDrvSpi(halHandle,&gDrvSpi8305Vars);
    #endif
    
    
      // enable DC bus compensation
      CTRL_setFlag_enableDcBusComp(ctrlHandle, true);
    
    
      for(;;)
      {
        // Waiting for enable system flag to be set
        while(!(gMotorVars.Flag_enableSys));
    
        // loop while the enable system flag is true
        while(gMotorVars.Flag_enableSys)
          {
    
     //Added
           /* if (counter == 8) {
                            isCommandReceived = false;
    
                            if (buf[1] == boardId && buf[2] == 's') {
                                long value = ((long)buf[3]) | ((long)buf[4] << 8) | ((long)buf[5] << 16) | ((long)buf[6] << 24);
                                bool isRunIdentify = true;
    
                                if (value == _IQ(0.0)) {
                                    isRunIdentify = 0;
                                } else if (_IQabs(value) <= _IQ(0.2)) {
                                    isOpenLoop = true;
                                } else {
                                    isOpenLoop = false;
                                }
    
                                gMotorVars.SpeedRef_krpm = value;
                                gMotorVars.Flag_Run_Identify = isRunIdentify;
                            }
    
                            isCommandStart = false;
                            counter = 0;
                        }
    
                        if (shouldSendSpeed) {
                            shouldSendSpeed = false;
    
                            if (buf[1] == boardId && buf[2] == 's') {
                                returnBuf[0] = '<';
                                returnBuf[1] = boardId;
                                returnBuf[2] = 'd';
    
                                long returnValue = gMotorVars.Speed_krpm;
    
                                returnBuf[3] = returnValue;
                                returnBuf[4] = returnValue >> 8;
                                returnBuf[5] = returnValue >> 16;
                                returnBuf[6] = returnValue >> 24;
                                returnBuf[7] = '>';
    
                                serialWrite(returnBuf, 8);
                            }
                        }*/
    
    
    
    
            CTRL_Obj *obj = (CTRL_Obj *)ctrlHandle;
    
            // increment counters
            gCounter_updateGlobals++;
    
    
            if(CTRL_isError(ctrlHandle))
              {
                // set the enable controller flag to false
                CTRL_setFlag_enableCtrl(ctrlHandle,false);
    
                // set the enable system flag to false
                gMotorVars.Flag_enableSys = false;
    
                // disable the PWM
                HAL_disablePwm(halHandle);
              }
            else
              {
                // update the controller state
                bool flag_ctrlStateChanged = CTRL_updateState(ctrlHandle);
    
                // enable or disable the control
                CTRL_setFlag_enableCtrl(ctrlHandle, gMotorVars.Flag_Run_Identify);
    
                if(flag_ctrlStateChanged)
                  {
                    CTRL_State_e ctrlState = CTRL_getState(ctrlHandle);
                    EST_State_e estState = EST_getState(obj->estHandle);
    
                    if(ctrlState == CTRL_State_OffLine)
                      {
                        // enable the PWM
                        HAL_enablePwm(halHandle);
                      }
                    else if(ctrlState == CTRL_State_OnLine)
                      {
                        if((estState < EST_State_LockRotor) || (estState > EST_State_MotorIdentified))
                          {
                            // update the ADC bias values
                            HAL_updateAdcBias(halHandle);
                          }
    
                        // Return the bias value for currents
                        gMotorVars.I_bias.value[0] = HAL_getBias(halHandle,HAL_SensorType_Current,0);
                        gMotorVars.I_bias.value[1] = HAL_getBias(halHandle,HAL_SensorType_Current,1);
                        gMotorVars.I_bias.value[2] = HAL_getBias(halHandle,HAL_SensorType_Current,2);
    
                        // Return the bias value for voltages
                        gMotorVars.V_bias.value[0] = HAL_getBias(halHandle,HAL_SensorType_Voltage,0);
                        gMotorVars.V_bias.value[1] = HAL_getBias(halHandle,HAL_SensorType_Voltage,1);
                        gMotorVars.V_bias.value[2] = HAL_getBias(halHandle,HAL_SensorType_Voltage,2);
    
                        // enable the PWM
                        HAL_enablePwm(halHandle);
                      }
                    else if(ctrlState == CTRL_State_Idle)
                      {
                        // disable the PWM
                        HAL_disablePwm(halHandle);
                        gMotorVars.Flag_Run_Identify = false;
                      }
    
                    if((CTRL_getFlag_enableUserMotorParams(ctrlHandle) == true) &&
                      (ctrlState > CTRL_State_Idle) &&
                      (gMotorVars.CtrlVersion.minor == 6))
                      {
                        // call this function to fix 1p6
                        USER_softwareUpdate1p6(ctrlHandle);
                      }
    
                  }
              }
    
    
            if(EST_isMotorIdentified(obj->estHandle))
              {
                // set the current ramp
                EST_setMaxCurrentSlope_pu(obj->estHandle,gMaxCurrentSlope);
                gMotorVars.Flag_MotorIdentified = true;
    
                // set the speed reference
                CTRL_setSpd_ref_krpm(ctrlHandle,gMotorVars.SpeedRef_krpm);
    
                // set the speed acceleration
                CTRL_setMaxAccel_pu(ctrlHandle,_IQmpy(MAX_ACCEL_KRPMPS_SF,gMotorVars.MaxAccel_krpmps));
    
                if(Flag_Latch_softwareUpdate)
                {
                  Flag_Latch_softwareUpdate = false;
    
                  USER_calcPIgains(ctrlHandle);
                }
    
              }
            else
              {
                Flag_Latch_softwareUpdate = true;
    
                // the estimator sets the maximum current slope during identification
                gMaxCurrentSlope = EST_getMaxCurrentSlope_pu(obj->estHandle);
              }
    
    
            // when appropriate, update the global variables
            if(gCounter_updateGlobals >= NUM_MAIN_TICKS_FOR_GLOBAL_VARIABLE_UPDATE)
              {
                // reset the counter
                gCounter_updateGlobals = 0;
    
                updateGlobalVariables_motor(ctrlHandle);
              }
    
            // recalculate Kp and Ki gains to fix the R/L limitation of 2000.0, and Kp limit to 0.11
            recalcKpKi(ctrlHandle);
    
            if(CTRL_getMotorType(ctrlHandle) == MOTOR_Type_Induction)
              {
                // set electrical frequency limit to zero while identifying an induction motor
                setFeLimitZero(ctrlHandle);
    
                // calculate Dir_qFmt for acim motors
                acim_Dir_qFmtCalc(ctrlHandle);
              }
    
            // enable/disable the forced angle
            EST_setFlag_enableForceAngle(obj->estHandle,gMotorVars.Flag_enableForceAngle);
    
            // enable or disable power warp
            CTRL_setFlag_enablePowerWarp(ctrlHandle,gMotorVars.Flag_enablePowerWarp);
    
    #ifdef DRV8301_SPI
            HAL_writeDrvData(halHandle,&gDrvSpi8301Vars);
    
            HAL_readDrvData(halHandle,&gDrvSpi8301Vars);
    #endif
    #ifdef DRV8305_SPI
            HAL_writeDrvData(halHandle,&gDrvSpi8305Vars);
    
            HAL_readDrvData(halHandle,&gDrvSpi8305Vars);
    #endif
          } // end of while(gFlag_enableSys) loop
    
    
        // disable the PWM
        HAL_disablePwm(halHandle);
    
        // set the default controller parameters (Reset the control to re-identify the motor)
        CTRL_setParams(ctrlHandle,&gUserParams);
        gMotorVars.Flag_Run_Identify = false;
    
      } // end of for(;;) loop
    
    } // end of main() function
    
    
    interrupt void mainISR(void)
    {
      // toggle status LED
      if(++gLEDcnt >= (uint_least32_t)(USER_ISR_FREQ_Hz / LED_BLINK_FREQ_Hz))
      {
        HAL_toggleLed(halHandle,(GPIO_Number_e)HAL_Gpio_LED2);
        gLEDcnt = 0;
      }
    
    
      // acknowledge the ADC interrupt
      HAL_acqAdcInt(halHandle,ADC_IntNumber_1);
    
    
      // convert the ADC data
      HAL_readAdcData(halHandle,&gAdcData);
    
    
      // run the controller
      CTRL_run(ctrlHandle,halHandle,&gAdcData,&gPwmData);
    
    
      // write the PWM compare values
      HAL_writePwmData(halHandle,&gPwmData);
    
    
      // setup the controller
      CTRL_setup(ctrlHandle);
    
    
     //Added
    
    
    
     /* if (isWaitingTxFifoEmpty)
        {
          if (SCI_txFifoIsEmpty(halHandle->sciAHandle)) {
             // if (isWaitingTxFifoEmpty(halHandle->sciAHandle)) {
    
            if (isTxOffDelayActive) {
              txOffDelayCounter++;
              if (txOffDelayCounter >= txOffDelayCount) {
                isTxOffDelayActive = false;
                txOffDelayCounter = 0;
                isWaitingTxFifoEmpty = false;
              }
            } else {
              isWaitingTxFifoEmpty = false;
            }
          }
        }*/
    
      return;
    } // end of mainISR() function
    
    
    //Added
    
    
    // UART Rx ISR
    interrupt void sciARxISR(void)
    {
        HAL_Obj *obj = (HAL_Obj *)halHandle;
    
        while (SCI_rxDataReady(obj->sciAHandle))
        {
            char c = SCI_read(obj->sciAHandle);
    
            if (counter < BUF_SIZE - 1) // -1 to leave space for null terminator
            {
                buf[counter++] = c;
    
                if (c == '>') // End of command
                {
                    buf[counter] = '\0'; // Null-terminate the command string
                    processCommand(buf);
                    counter = 0; // Reset buffer index
                }
            }
            else
            {
                // Buffer overflow, reset counter
                counter = 0;
            }
        }
    
        // Clear SCI interrupt flag
        PIE_clearInt(obj->pieHandle, PIE_GroupNumber_9);
    }
    
    // Process received command
    void processCommand(char *command)
    {
        if (strcmp(command, CMD_RX_ON) == 0)
        {
            isMotorOn = true;
            sendResponse("Motor ON");
        }
        else if (strcmp(command, CMD_RX_OFF) == 0)
        {
            isMotorOn = false;
            sendResponse("Motor OFF");
        }
        else
        {
            sendResponse("Unknown Command");
        }
    }
    
    // Send response to UART
    void sendResponse(const char *message)
    {
        int length = strlen(message);
        returnBuf[0] = '<';
        strncpy(&returnBuf[1], message, length);
        returnBuf[length + 1] = '>';
        serialWrite(returnBuf, length + 2);
    }
    
    // Write data to UART
    void serialWrite(const char *sendData, int length)
    {
        int i = 0;
        while (i < length)
        {
            if (SCI_txReady(halHandle->sciAHandle))
            {
                SCI_write(halHandle->sciAHandle, sendData[i]);
                i++;
            }
        }
        isWaitingTxFifoEmpty = true;
    }
    
    
    
    
    void updateGlobalVariables_motor(CTRL_Handle handle)
    {
      CTRL_Obj *obj = (CTRL_Obj *)handle;
    
      // get the speed estimate
      gMotorVars.Speed_krpm = EST_getSpeed_krpm(obj->estHandle);
    
      // get the real time speed reference coming out of the speed trajectory generator
      gMotorVars.SpeedTraj_krpm = _IQmpy(CTRL_getSpd_int_ref_pu(handle),EST_get_pu_to_krpm_sf(obj->estHandle));
    
      // get the magnetizing current
      gMotorVars.MagnCurr_A = EST_getIdRated(obj->estHandle);
    
      // get the rotor resistance
      gMotorVars.Rr_Ohm = EST_getRr_Ohm(obj->estHandle);
    
      // get the stator resistance
      gMotorVars.Rs_Ohm = EST_getRs_Ohm(obj->estHandle);
    
      // get the stator inductance in the direct coordinate direction
      gMotorVars.Lsd_H = EST_getLs_d_H(obj->estHandle);
    
      // get the stator inductance in the quadrature coordinate direction
      gMotorVars.Lsq_H = EST_getLs_q_H(obj->estHandle);
    
      // get the flux
      gMotorVars.Flux_VpHz = EST_getFlux_VpHz(obj->estHandle);
    
      // get the controller state
      gMotorVars.CtrlState = CTRL_getState(handle);
    
      // get the estimator state
      gMotorVars.EstState = EST_getState(obj->estHandle);
    
      // Get the DC buss voltage
      gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));
    
      return;
    } // end of updateGlobalVariables_motor() function
    
    
    void recalcKpKi(CTRL_Handle handle)
    {
      CTRL_Obj *obj = (CTRL_Obj *)handle;
      EST_State_e EstState = EST_getState(obj->estHandle);
    
      if((EST_isMotorIdentified(obj->estHandle) == false) && (EstState == EST_State_Rs))
        {
          float_t Lhf = CTRL_getLhf(handle);
          float_t Rhf = CTRL_getRhf(handle);
          float_t RhfoverLhf = Rhf/Lhf;
          _iq Kp = _IQ(0.25*Lhf*USER_IQ_FULL_SCALE_CURRENT_A/(USER_CTRL_PERIOD_sec*USER_IQ_FULL_SCALE_VOLTAGE_V));
          _iq Ki = _IQ(RhfoverLhf*USER_CTRL_PERIOD_sec);
    
          // set Rhf/Lhf
          CTRL_setRoverL(handle,RhfoverLhf);
    
          // set the controller proportional gains
          CTRL_setKp(handle,CTRL_Type_PID_Id,Kp);
          CTRL_setKp(handle,CTRL_Type_PID_Iq,Kp);
    
          // set the Id controller gains
          CTRL_setKi(handle,CTRL_Type_PID_Id,Ki);
          PID_setKi(obj->pidHandle_Id,Ki);
    
          // set the Iq controller gains
          CTRL_setKi(handle,CTRL_Type_PID_Iq,Ki);
          PID_setKi(obj->pidHandle_Iq,Ki);
        }
    
      return;
    } // end of recalcKpKi() function
    
    
    void setFeLimitZero(CTRL_Handle handle)
    {
      CTRL_Obj *obj = (CTRL_Obj *)handle;
      EST_State_e EstState = EST_getState(obj->estHandle);
    
      _iq fe_neg_max_pu;
      _iq fe_pos_min_pu;
    
      if((EST_isMotorIdentified(obj->estHandle) == false) && (CTRL_getMotorType(handle) == MOTOR_Type_Induction))
        {
          fe_neg_max_pu = _IQ30(0.0);
    
          fe_pos_min_pu = _IQ30(0.0);
        }
      else
        {
          fe_neg_max_pu = _IQ30(-USER_ZEROSPEEDLIMIT);
    
          fe_pos_min_pu = _IQ30(USER_ZEROSPEEDLIMIT);
        }
    
      EST_setFe_neg_max_pu(obj->estHandle, fe_neg_max_pu);
    
      EST_setFe_pos_min_pu(obj->estHandle, fe_pos_min_pu);
    
      return;
    } // end of setFeLimitZero() function
    
    
    void acim_Dir_qFmtCalc(CTRL_Handle handle)
    {
      CTRL_Obj *obj = (CTRL_Obj *)handle;
      EST_State_e EstState = EST_getState(obj->estHandle);
    
      if(EstState == EST_State_IdRated)
        {
          EST_setDir_qFmt(obj->estHandle, EST_computeDirection_qFmt(obj->estHandle, 0.7));
        }
    
      return;
    } // end of acim_Dir_qFmtCalc() function
    
    
    //@} //defgroup
    // end of file
    
    
    
    

  • Hi Kishor,

    Thank you for the attachment. Please note that it is better to debug based on the symptoms of the issue rather than scan through your entire code. What I really want to know here first is what are the effects you are seeing as a result of the issue. Are you scoping the SCI pins and able to confirm the signals TX/RX are communicating as expected? Are you able to connect to the device in CCS and step through while checking the SCI registers? These are all places I would start if I am having issues with the SCI peripheral. 

    What you can also do is enable loopback mode for SCI (ties RX and TX together internally) to double check SCI is working and echoing back characters as expected - verifying functionality independent of the system.

    In general, what is the context and desired environment (what is the data being communicated)? All of these questions can help us get to the bottom of it.

    Best Regards.

    Allison

  • Hi Allison Nguyen

    "My scop of work is to run a motor using UART commands. I have added and written the logic for SCI (Serial Communication Interface) functions, but I cannot enter any commands as it is running automatically. Please check my code to verify if the logic is correct and let me know if any modifications are needed."

  • Hi Kishor,

    Allison is currently out of office until after the holidays. Please expect a delay in response. Thank you for your patience.

    Best Regards,

    Aishwarya

  • Hi Allison Nguyen

    "My scop of work is to run a motor using UART commands. I have added and written the logic for SCI (Serial Communication Interface) functions, but I cannot enter any commands as it is running automatically. Please check my code to verify if the logic is correct and let me know if any modifications are needed."

  • Hi Kishor,

    Apologies for the delay in response. Is there any update on your debug progress?

    From the above posts, it is difficult to begin to assess your project without further context of what issues you are seeing. A general statement that the motor is not running correctly unfortunately does not give enough information to me to indicate what the issue could be (software, peripheral configurations, communication speed/format, hardware connections). This is why I asked for more details:

    What I really want to know here first is what are the effects you are seeing as a result of the issue. Are you scoping the SCI pins and able to confirm the signals TX/RX are communicating as expected? Are you able to connect to the device in CCS and step through while checking the SCI registers? These are all places I would start if I am having issues with the SCI peripheral. 

    What you can also do is enable loopback mode for SCI (ties RX and TX together internally) to double check SCI is working and echoing back characters as expected - verifying functionality independent of the system.

    If you are able to provide these first, that will narrow down the possibilities of what is causing the issue and allow you to take further targeted debug steps. 

    Best Regards,

    Allison

  • Hi  Allison Nguyen

    "I have written the logic below to run the motor on commands. How should I connect the hardware? Please let me know." 

    //Added
    
    
    // UART Rx ISR
    interrupt void sciARxISR(void)
    {
        HAL_Obj *obj = (HAL_Obj *)halHandle;
    
        while (SCI_rxDataReady(obj->sciAHandle))
        {
            char c = SCI_read(obj->sciAHandle);
    
            if (counter < BUF_SIZE - 1) // -1 to leave space for null terminator
            {
                buf[counter++] = c;
    
                if (c == '>') // End of command
                {
                    buf[counter] = '\0'; // Null-terminate the command string
                    processCommand(buf);
                    counter = 0; // Reset buffer index
                }
            }
            else
            {
                // Buffer overflow, reset counter
                counter = 0;
            }
        }
    
        // Clear SCI interrupt flag
        PIE_clearInt(obj->pieHandle, PIE_GroupNumber_9);
    }
    
    // Process received command
    void processCommand(char *command)
    {
        if (strcmp(command, CMD_RX_ON) == 0)
        {
            isMotorOn = true;
            sendResponse("Motor ON");
        }
        else if (strcmp(command, CMD_RX_OFF) == 0)
        {
            isMotorOn = false;
            sendResponse("Motor OFF");
        }
        else
        {
            sendResponse("Unknown Command");
        }
    }
    
    // Send response to UART
    void sendResponse(const char *message)
    {
        int length = strlen(message);
        returnBuf[0] = '<';
        strncpy(&returnBuf[1], message, length);
        returnBuf[length + 1] = '>';
        serialWrite(returnBuf, length + 2);
    }
    
    // Write data to UART
    void serialWrite(const char *sendData, int length)
    {
        int i = 0;
        while (i < length)
        {
            if (SCI_txReady(halHandle->sciAHandle))
            {
                SCI_write(halHandle->sciAHandle, sendData[i]);
                i++;
            }
        }
        isWaitingTxFifoEmpty = true;
    }
    
    

  • Hi Kishor,

    It would greatly help to debug (single step) your SCI ISR handler watch the characters being buffered from C code reading the data register. You must at the very least verify via CCS debug RX data is getting into the UART from your connected input device. Alternatively connect Putty monitor serail input via virtual COM set up XDS110 xml file. Also check SCI is in blocking or FIFO mode 16 words and also monitor the UART error flags register inside RX ISR handler. 

    Please read the x27F TRM section on SCI circuit analysis to gain a better understanding of what is expected from the development and configuration points. 

    Regards,

  • Hi Genatco

    "My hardware connection consists of an F28027F launch pad with 6 PWM signals connected to the DRV8301 board, and UART pins connected to a PC. The power supply is an external 7V source. Despite this setup, the motor is not running. Could you provide any suggestions for the hardware connections?"

  • UART pins connected to a PC

    Hi Kishor,

    How is SCI being connected to PC serial port? The USB cable from launch pad can easily provide virtual COM port provided switches,GPIO and C configuration exist, check PDF for x27F launch pad and schematic. Both SCI-A/B are configured universal motor control SDK via (hal.c) with default GPIO ports. The SCI configuration is bit more intense using FIFO interrupts, the motor ISR loop may require highest peripheral core priority inside SCIRXISR function, at lease assert EINT using default priority. There is another recent forum post explaining default use of DINT/EINT with TM0 and ADC core priority order.     

  • Hi Genatco

    //Added
    
    
    // UART Rx ISR
    interrupt void sciARxISR(void)
    {
        HAL_Obj *obj = (HAL_Obj *)halHandle;
    
        while (SCI_rxDataReady(obj->sciAHandle))
        {
            char c = SCI_read(obj->sciAHandle);
    
            if (counter < BUF_SIZE - 1) // -1 to leave space for null terminator
            {
                buf[counter++] = c;
    
                if (c == '>') // End of command
                {
                    buf[counter] = '\0'; // Null-terminate the command string
                    processCommand(buf);
                    counter = 0; // Reset buffer index
                }
            }
            else
            {
                // Buffer overflow, reset counter
                counter = 0;
            }
        }
    
        // Clear SCI interrupt flag
        PIE_clearInt(obj->pieHandle, PIE_GroupNumber_9);
    }
    
    // Process received command
    void processCommand(char *command)
    {
        if (strcmp(command, CMD_RX_ON) == 0)
        {
            isMotorOn = true;
            sendResponse("Motor ON");
        }
        else if (strcmp(command, CMD_RX_OFF) == 0)
        {
            isMotorOn = false;
            sendResponse("Motor OFF");
        }
        else
        {
            sendResponse("Unknown Command");
        }
    }
    
    // Send response to UART
    void sendResponse(const char *message)
    {
        int length = strlen(message);
        returnBuf[0] = '<';
        strncpy(&returnBuf[1], message, length);
        returnBuf[length + 1] = '>';
        serialWrite(returnBuf, length + 2);
    }
    
    // Write data to UART
    void serialWrite(const char *sendData, int length)
    {
        int i = 0;
        while (i < length)
        {
            if (SCI_txReady(halHandle->sciAHandle))
            {
                SCI_write(halHandle->sciAHandle, sendData[i]);
                i++;
            }
        }
        isWaitingTxFifoEmpty = true;
    }
    ///////////////////
    in main.h
    void handleMotorCommands(void)
    {
        // Start/Stop the motor based on isMotorOn flag
        if (isMotorOn)
        {
            gMotorVars.Flag_Run_Identify = true;
            printf("Motor is ON\n"); // Debug: Print motor state
        }
        else
        {
            gMotorVars.Flag_Run_Identify = false;
            printf("Motor is OFF\n"); // Debug: Print motor state
        }
    
        // Set the target running speed
        gMotorVars.SpeedRef_krpm = targetSpeed;
        printf("Target speed set to %ld krpm\n", gMotorVars.SpeedRef_krpm); // Debug: Print target speed
    }

    I have attached code, any modifications are needed. Let me know

  • Hi,

    Allison will be out of office until early January, please expect a delayed response if any input is needed from her. 

    Best Regards,

    Ben Collier

  • Hi Kishor,

    Have you been debugging this in CCS as Genatco also suggested? When you step through this code line by line are you able to check the SCI registers and verify the configurations and buffers are being updated as expected?

    Best Regards,

    Allison

  • Hi Allison Nguyen

    "I am facing a linker command issue. Could you suggest how to solve it?"

    Description Resource Path Location Type

    #10010 errors encountered during linking; "proj_lab11.out" not built proj_lab11 C/C++ Problem
    #10099-D F28027F.cmd /proj_lab11 line 127 C/C++ Problem
    #10099-D F28027F.cmd /proj_lab11 line 130 C/C++ Problem
    gmake: *** [proj_lab11.out] Error 1 proj_lab11 C/C++ Problem
    gmake: Target 'all' not remade because of errors. proj_lab11 C/C++ Problem
    #10210-D creating ".esysmem" section with default size of 0x400; use proj_lab11 C/C++ Problem
    #10247-D creating output section ".cio" without a SECTIONS proj_lab11 C/C++ Problem

  • Hi Kishor, 

    If this is a different category of issue you are having now, please create a new thread so that it can be assigned to the correct expert regarding linker command files. If this is the case and/or the original issue is resolved, please let me know and I will close this thread for us.

    Best Regards,

    Allison

  • Hi Allison

    " I am working on UART commands to control a motor. I wrote the code, but these errors keep coming up. I added the linker command F28027.cmd, but it didn't solve the problem."

  • Hi Kishor,

    I am forwarding this inquiry to colleague to help provide input from linker command file side.

    Best Regards,

    Allison

  • Hi Kishor,

    #10210-D creating ".esysmem" section with default size of 0x400; use proj_lab11 C/C++ Problem

    To avoid this error, configure the heap size under Project properties -> C2000 Linker -> Basic Options

    #10247-D creating output section ".cio" without a SECTIONS proj_lab11 C/C++ Problem

    To avoid this error add .cio in the linker cmd file and allocate that to an available memory region. Eg : .cio : > RAMLS0

    Regards,

    Veena

  • Hi Veena Kamath

     I added .cio cmd as shown above screen shot. Still error is coming.

    Description	Resource	Path	Location	Type
    #10010 errors encountered during linking; "proj_lab11.out" not built	proj_lab11		 	C/C++ Problem
    #10099-D program will not fit into available	F28027.cmd	/proj_lab11	line 117	C/C++ Problem
    #10099-D program will not fit into available	F28027.cmd	/proj_lab11	line 144	C/C++ Problem
    gmake: *** [proj_lab11.out] Error 1	proj_lab11		 	C/C++ Problem
    gmake: Target 'all' not remade because of errors.	proj_lab11		 	C/C++ Problem
    #10210-D creating ".esysmem" section with default size of 0x400; use	proj_lab11		 	C/C++ Problem
    #10247-D creating output section "ramfuncs" without a SECTIONS	proj_lab11		 	C/C++ Problem
    #10247-D creating output section "rom_accessed_data" without a	proj_lab11		 	C/C++ Problem
    

  • HI Kishor,

    "#10099-D program will not fit into available F28027.cmd /proj_lab11 line 117 C/C++ Problem"

    Looks like linker is unable to allocate the memory. If there are any other regions with unused memory region, please use them.

     I added .cio cmd as shown above screen shot. Still error is coming.

    Add the same for other output sections listed in the error

    Regards,

    Veena

  • Hi Veena Kamath

    I tried number of time but still error not resolved. I have attached F28027.cmd file. Modifies and resend me.

    /*
    // TI File $Revision: /main/7 $
    // Checkin $Date: July 6, 2009   17:25:36 $
    //###########################################################################
    //
    // FILE:	F28027.cmd
    //
    // TITLE:	Linker Command File For F28027 Device
    //
    //###########################################################################
    // $TI Release:  $
    // $Release Date:  $
    //###########################################################################
    */
    
    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\DSP2802_Headers\cmd
    //
    // For BIOS applications add:      DSP2802x_Headers_BIOS.cmd
    // For nonBIOS applications add:   DSP2802x_Headers_nonBIOS.cmd
    ========================================================= */
    
    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */
    
    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l DSP2802x_Headers_nonBIOS.cmd */
    
    /* Uncomment this line to include file only for BIOS applications */
    /* -l DSP2802x_Headers_BIOS.cmd */
    
    /* 2) In your project add the path to <base>\DSP2802x_headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */
    
    /* Define the memory block start/length for the F28027
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections
    
       Notes:
             Memory blocks on F2802x are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.
    
             The L0 memory block is mirrored - that is
             it can be accessed in high memory or low memory.
             For simplicity only one instance is used in this
             linker file.
    
             Contiguous SARAM memory blocks or flash sectors can be
             be combined if required to create a larger memory block.
    */
    
    MEMORY
    {
    PAGE 0:    /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    
       PRAML0      : origin = 0x008000, length = 0x000800     /* on-chip RAM block L0 */
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
       FLASHD      : origin = 0x3F0000, length = 0x002000     /* on-chip FLASH */
       FLASHC      : origin = 0x3F2000, length = 0x002000     /* on-chip FLASH */
       FLASHA      : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
    
       IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA	  /* IQ Math Tables in Boot ROM */
    
       ROM         : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */
    
    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */
    
       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       DRAML0      : origin = 0x008800, length = 0x000800     /* on-chip RAM block L0 */
       FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */
    }
    
    /* Allocate sections to memory blocks.
       Note:
             codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
                       execution when booting to flash
             ramfuncs  user defined section to store functions that will be copied from Flash into RAM
    */
    
    SECTIONS
    {
    
       /* Allocate program areas: */
       .cinit              : > FLASHA       PAGE = 0
       .pinit              : > FLASHA,      PAGE = 0
       .text               : > FLASHA       PAGE = 0
       codestart           : > BEGIN        PAGE = 0
    
    #ifdef __TI_COMPILER_VERSION__
       #if __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} LOAD = FLASHA,
                             RUN = PRAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             PAGE = 0
       #else
       ramfuncs            : LOAD = FLASHA,
                             RUN = PRAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             PAGE = 0   
       #endif
    #endif                           
                             
       csmpasswds          : > CSM_PWL_P0   PAGE = 0
       csm_rsvd            : > CSM_RSVD     PAGE = 0
    
       /* Allocate uninitalized data sections: */
       .stack              : > RAMM0        PAGE = 1
       .ebss               : > DRAML0       PAGE = 1
       .esysmem            : > DRAML0       PAGE = 1
       .cio                : > RAMM0        PAGE = 1
       /* Initalized sections go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .econst             : > FLASHA       PAGE = 0
       .switch             : > FLASHA       PAGE = 0
    
       /* Allocate IQ math areas: */
       IQmath              : > FLASHA       PAGE = 0            /* Math Code */
       IQmathTables        : > IQTABLES,    PAGE = 0, TYPE = NOLOAD
    
       /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
    
       }
       */
       /* Uncomment the section below if calling the IQNasin() or IQasin()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables3    : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
       {
    
                  IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)
    
       }
       */
        ramfuncs          :  LOAD = FLASHA,
                             RUN = PRAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             PAGE = 0
    
       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset              : > RESET,      PAGE = 0, TYPE = DSECT
       vectors             : > VECTORS     PAGE = 0, TYPE = DSECT
    
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    
    
    

  • Hi Kishor,

    Perhaps add memory browser allocation tool into CCS view and see where code pieces are being placed. It may help you debug even fix LSS memory overlaps in sections. Also check that CCS did not automatically add another *.cmd file in the project path as it can cause similar sections error issues.

  • Hi Genatco 

    "In CSS IDE, I imported the 'Project 11' file by selecting the 'Import' option, then choosing 'CSS Project,' followed by searching for the directory and clicking 'Finish.' However, errors occurred during the process. I need full information about the errors."

  • Hi,

    Please take a look at Memory Allocation (available under View) to understand which memory regions are left unallocated. For sections which are unable to fit, these regions can be used instead

    In CSS IDE, I imported the 'Project 11' file

    Project 11 - can you point me which project (or which SDK) are you referring to here ?

    Regards,

    Veena

  • Hi Veena Kamath

    I used CCS only not SDK. 

  • I meant when you say Project11, is that project from TI or your own project?

    for the memory allocation issue, where you able to find any unallocated RAM and resolve the issue?

    Regards,

    Veena

  • Hi Veena Kamath

    "I am using only the project lab examples from Motorware. When I try to import the Project 11 lab examples, the memory does not support it."

  • When I try to import the Project 11 lab examples, the memory does not support it."

    You meant to say the project wont compile without memory allocation error but CCS can import the project as expected. The sections area noted above post may need to place (.esysmem) in another LLS free memory space. You have to edit (.cmd) file to move (.text) section into flash memory section (C or D) with more free space. 

  • Hi Genatco

    // Added
    .text : > FLASHC PAGE = 0

    //Added
    .esysmem : > RAMM1 PAGE = 1

    Description	Resource	Path	Location	Type
    #10010 errors encountered during linking; "proj_lab11.out" not built	proj_lab11		 	C/C++ Problem
    #10099-D program will not fit into available	F28027.cmd	/proj_lab11	line 124	C/C++ Problem
    gmake: *** [proj_lab11.out] Error 1	proj_lab11		 	C/C++ Problem
    gmake: Target 'all' not remade because of errors.	proj_lab11		 	C/C++ Problem
    #10210-D creating ".esysmem" section with default size of 0x400; use	proj_lab11		 	C/C++ Problem
    #10247-D creating output section ".cio" without a SECTIONS	proj_lab11		 	C/C++ Problem
    #10247-D creating output section "ramfuncs" without a SECTIONS	proj_lab11		 	C/C++ Problem
    #10247-D creating output section "rom_accessed_data" without a	proj_lab11		 	C/C++ Problem
    

  • Have you set the project properties to use Flash memory? The project default is often set to load the program into LSRAM.  If you change the project properties to use Flash memory instead of LSRAM, CCS will create another *.cmd file in the project folder tree.

  • Hi Genatco

    I kindly request give some clarification about what your saying. I didn't understanding. Where to changes in the Project properties. I need explanation .

  • Right click on the project top folder, scroll to properties, click to open all the sections allows to make specific changes on the project.