Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/OMAPL138B-EP: ProcessorSDK: CSL headers for EPWM messed up

$
0
0

Part Number:OMAPL138B-EP

Tool/software: Code Composer Studio

Hi

Yet another issue while migrating from MCSDK to ProcessorSDK.

The header files for the EHRPWM module (which the CSL now calls "EPWM" instead for whatever reason) seem to be pretty messed up. Let me point out some issues:

* The ti/csl/csl_epwm.h does not include the actual header file in the "ti/csl/src/ip/epwm/V0/" folder for the SOC_OMAPL138, only for many other SOCs. This is a bit funny, when you remember that all this is inside the PDK_OMAPL138 folder! So I had to include this manually:

#include <ti/csl/src/ip/epwm/V0/hw_pwmss_submodule_offsets.h>
#include <ti/csl/src/ip/epwm/V0/cslr_epwm.h>

* The overlay structure for the EPWM registers is not defined in the headers! So I also had to do this manually:

typedef volatile CSL_EpwmRegs             *CSL_EhrpwmRegsOvly;

* The new header does not define any meaningfull tokens for the register values. So e.g. one has to write:

CSL_FINS(ehrpwm0Regs->TBCTL, EPWM_TBCTL_CTRMODE, 0x3);

instead of:

CSL_FINST(ehrpwm0Regs->TBCTL, EHRPWM_TBCTL_CTRMODE, STOPFREEZE);

* The register HRCNFG is named HRCTL in the header files instead. Also it's fields are named differently.

* The base address of the EHRPWM modules (now called EPWM) also have been renamed to... can you guess it? No, it is not CSL_EPWM_x_REGS.

It is CSL_HRPWM_x_REGS !!!  Fair enough to compensate for the missing "HR" somewhere...

Are the CSL headers for the EHRPWM supposed to work this way or am I overseeing something?


Viewing all articles
Browse latest Browse all 262198

Trending Articles