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.

TMS320F28069M: Description for architecture of motorware in C

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE, DRV8301

Tool/software:

Hello, Are there any document or descriptions around architecture of the C code that in provided for Motoroware? 

I am looking for documents which clearly describe every sub function for the code. F.ex. HAL_HANDLE following that how it can configure MCU pins ... 

Thanks in Advance.  

  • Thanks for reply. I already saw that description. But problem is the very complex body of the MotorWare Code. plenty of pointers are using that is confusing. 

  • For instnase, I would like to know what is the intention of below code:

    typedef struct _HAL_Obj_ *HAL_Handle;
    Is "HAL_Handle" defined as pointer wich is points to _HAL_Obj_? 
    If yes, what is the founction of "typedef struct" at the beginig? If you look on to the code, there are another "typedef struct" which is defined a couple of line before.
    So there is two "typedef struct _HAL_Obj_" in one code. 
    typedef struct _HAL_Obj_
    {
      ADC_Handle    adcHandle;        //!< the ADC handle

      CLK_Handle    clkHandle;        //!< the clock handle
     
      CPU_Handle    cpuHandle;        //!< the CPU handle

      FLASH_Handle  flashHandle;      //!< the flash handle

      GPIO_Handle   gpioHandle;       //!< the GPIO handle

      OFFSET_Handle offsetHandle_I[3];  //!< the handles for the current offset estimators
      OFFSET_Obj    offset_I[3];        //!< the current offset objects

      OFFSET_Handle offsetHandle_V[3];  //!< the handles for the voltage offset estimators
      OFFSET_Obj    offset_V[3];        //!< the voltage offset objects

      OSC_Handle    oscHandle;        //!< the oscillator handle

      PIE_Handle    pieHandle;        //<! the PIE handle

      PLL_Handle    pllHandle;        //!< the PLL handle

      PWM_Handle    pwmHandle[3];     //<! the PWM handles

      PWMDAC_Handle pwmDacHandle[3];  //<! the PWMDAC handles

      PWR_Handle    pwrHandle;        //<! the power handle

      TIMER_Handle  timerHandle[3];   //<! the timer handles

      WDOG_Handle   wdogHandle;       //!< the watchdog handle

      HAL_AdcData_t adcBias;          //!< the ADC bias

      _iq           current_sf;       //!< the current scale factor, amps_pu/cnt

      _iq           voltage_sf;       //!< the voltage scale factor, volts_pu/cnt

      uint_least8_t numCurrentSensors; //!< the number of current sensors
      uint_least8_t numVoltageSensors; //!< the number of voltage sensors

      SPI_Handle    spiAHandle;       //!< the SPI handle
      SPI_Handle    spiBHandle;       //!< the SPI handle

      DRV8301_Handle drv8301Handle;   //!< the drv8301 interface handle
      DRV8301_Obj    drv8301;         //!< the drv8301 interface object

    #ifdef QEP
      QEP_Handle    qepHandle[2];        //!< the QEP handles
    #endif

    } HAL_Obj;
  • Is "HAL_Handle" defined as pointer wich is points to _HAL_Obj_? 

    Yes as the source code that could be clear to link the object.

    If yes, what is the founction of "typedef struct" at the beginig? If you look on to the code, there are another "typedef struct" which is defined a couple of line before.
    So there is two "typedef struct _HAL_Obj_" in one code. 

    Just for the same one as the typical definition a struct object. You may find the detailed description about this in a C language textbook.