lpcware

Missing PWMC register in LPC13xx LPCOpen V2.05

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by R2D2 on Mon May 12 03:08:19 MST 2014
There's no PWMC register in timer register struct of lpc_chip_13xx\inc\timer_13xx.h  :((
(lpcopen_2_05_lpcxpresso_nxp_lpcxpresso_1343 & lpcopen_2_05_lpcxpresso_nxp_lpcxpresso_1347)


typedef struct {
__IO uint32_t IR;
__IO uint32_t TCR;
__IO uint32_t TC;
__IO uint32_t PR;
__IO uint32_t PC;
__IO uint32_t MCR;
__IO uint32_t MR[4];
__IO uint32_t CCR;
__IO uint32_t CR[4];
__IO uint32_t EMR;
__I  uint32_t RESERVED0[12];
__IO uint32_t CTCR;
[color=#f00]//!!**!!added
__IO uint32_t PWMC;/*!< PWM Control Register */
[/color]} LPC_TIMER_T;


and of course no PWMC read/write functions:


//!!**!!added
STATIC INLINE void Chip_TIMER_PWMWrite(LPC_TIMER_T *pTMR, uint32_t pwmval)
{
pTMR->PWMC = pwmval;
}

//!!**!!added
STATIC INLINE uint32_t Chip_TIMER_PWMRead(LPC_TIMER_T *pTMR)
{
return pTMR->PWMC;
}


Outcomes