May 15, 2013
12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 15, 2013
12:41 AM
Hi Infineon,
I think that I found the error in file CCU8PWMLIB.c (which is generated for PWMSP002 - which I using in my project)
Description:
I wanted capture contents of Timer ... but I using 2 slices (Timer concatenation).
And in Final result is only lower 16 bit! => contents of upper 16 bit(second slice timer) is not added
... In program I using "PWMSP002_GetTimerRegsVal" function ... this function then call "CCU8PWMLIB_GetTimerRegsVal"
function ... and in this function is error ... there is calculation for TimerReg:
...
ScndSlTMRVal = (RD_REG(HandlePtr->CC8yRegs1Ptr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos) << 16UL);
TimerRegsPtr->TimerReg = (uint32_t)((ScndSlTMRVal << 16UL) |
(RD_REG(HandlePtr->CC8yRegsPtr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos)));
=> contents of second slices timer is shifted twice
fix could be following:
ScndSlTMRVal = (RD_REG(HandlePtr->CC8yRegs1Ptr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos) << 16UL);
TimerRegsPtr->TimerReg = (uint32_t)((ScndSlTMRVal /* << 16UL */) |
(RD_REG(HandlePtr->CC8yRegsPtr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos)));
Best regards,
Koumak
I think that I found the error in file CCU8PWMLIB.c (which is generated for PWMSP002 - which I using in my project)
Description:
I wanted capture contents of Timer ... but I using 2 slices (Timer concatenation).
And in Final result is only lower 16 bit! => contents of upper 16 bit(second slice timer) is not added
... In program I using "PWMSP002_GetTimerRegsVal" function ... this function then call "CCU8PWMLIB_GetTimerRegsVal"
function ... and in this function is error ... there is calculation for TimerReg:
...
ScndSlTMRVal = (RD_REG(HandlePtr->CC8yRegs1Ptr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos) << 16UL);
TimerRegsPtr->TimerReg = (uint32_t)((ScndSlTMRVal << 16UL) |
(RD_REG(HandlePtr->CC8yRegsPtr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos)));
=> contents of second slices timer is shifted twice
fix could be following:
ScndSlTMRVal = (RD_REG(HandlePtr->CC8yRegs1Ptr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos) << 16UL);
TimerRegsPtr->TimerReg = (uint32_t)((ScndSlTMRVal /* << 16UL */) |
(RD_REG(HandlePtr->CC8yRegsPtr->TIMER,
CCU8_CC8_TIMER_TVAL_Msk, CCU8_CC8_TIMER_TVAL_Pos)));
Best regards,
Koumak
- Tags:
- IFX
1 Reply
Not applicable
May 16, 2013
01:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 16, 2013
01:25 AM
Hi Koumak,
Thank you very much for your feedback. A change request was submitted (eTicket ID: 30478400). Will update you once fixed.
Best regards,
Sophia
Thank you very much for your feedback. A change request was submitted (eTicket ID: 30478400). Will update you once fixed.
Best regards,
Sophia