May 16, 2013
07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 16, 2013
07:03 AM
13 Replies
Not applicable
Jun 11, 2013
03:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 11, 2013
03:07 AM
Hi Amsantos,
Thank you very much for the interest. This was planned and we will info you if any update.
Best regards,
Sophia
Thank you very much for the interest. This was planned and we will info you if any update.
Best regards,
Sophia
Not applicable
Aug 14, 2013
11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 14, 2013
11:42 PM
Hi Sophia,
I also take very much interest in this peripheral. Maybe there is some "non-Dave3" example code already available ?!
Best regards
Uwe
I also take very much interest in this peripheral. Maybe there is some "non-Dave3" example code already available ?!
Best regards
Uwe
Aug 21, 2013
02:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 21, 2013
02:26 AM
Hi UHeller,
I have the basic initialisation code on the CSG0 for the HRPWM module. For the HRC part, I am still working on it.
void CSG_Init(void)
{
//remove the HRPWM from reset -> SCU
SCU_RESET->PRCLR0 |= 0x00800000;
SCU_CLK->CLKSET |= SCU_CLK_CLKSET_CCUCEN_Msk;
SCU_CLK->CGATCLR0 |= 0x00800085;//HRPWM+CCU8+CCU4+VADC
HRPWM0->HRBSC |= 0x100;
HRPWM0->CSGCFG |= 0x03;
HRPWM0_CSG0->DSV2 = 0x220;
//DSV1 shadow register
HRPWM0_CSG0 ->SDSV1 = 0x220;
// Pulse Swallow shadow register
HRPWM0_CSG0 ->SPC = 0;
//Shadow transfer
HRPWM0->CSGTRG |= 0x01;
HRPWM0->HRCCFG |= 0x020000; // CLKC, module clock frequency is set to 120MHz
HRPWM0->CSGCLRG |= 0x004;
HRPWM0->CSGSETG |= 0x001; // set DAC run bit
HRPWM0->CSGSETG |= 0x002; // set comparator run bit
}
I have the basic initialisation code on the CSG0 for the HRPWM module. For the HRC part, I am still working on it.
void CSG_Init(void)
{
//remove the HRPWM from reset -> SCU
SCU_RESET->PRCLR0 |= 0x00800000;
SCU_CLK->CLKSET |= SCU_CLK_CLKSET_CCUCEN_Msk;
SCU_CLK->CGATCLR0 |= 0x00800085;//HRPWM+CCU8+CCU4+VADC
HRPWM0->HRBSC |= 0x100;
HRPWM0->CSGCFG |= 0x03;
HRPWM0_CSG0->DSV2 = 0x220;
//DSV1 shadow register
HRPWM0_CSG0 ->SDSV1 = 0x220;
// Pulse Swallow shadow register
HRPWM0_CSG0 ->SPC = 0;
//Shadow transfer
HRPWM0->CSGTRG |= 0x01;
HRPWM0->HRCCFG |= 0x020000; // CLKC, module clock frequency is set to 120MHz
HRPWM0->CSGCLRG |= 0x004;
HRPWM0->CSGSETG |= 0x001; // set DAC run bit
HRPWM0->CSGSETG |= 0x002; // set comparator run bit
}
Not applicable
Aug 28, 2013
10:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2013
10:56 AM
Hi CheongSL,
back from holidays I immediately took the init to my code right after DAVE3_Init. But unfortunately it doesn't seem to work. RESET, CLKSET and CGATCLR0 registers are modified according to code but after that none of the HRPWM0-registers get the values written to them. All registers remain 0.
Any idea ?
Greets
Uwe
back from holidays I immediately took the init to my code right after DAVE3_Init. But unfortunately it doesn't seem to work. RESET, CLKSET and CGATCLR0 registers are modified according to code but after that none of the HRPWM0-registers get the values written to them. All registers remain 0.
Any idea ?
Greets
Uwe
Aug 29, 2013
01:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 29, 2013
01:31 AM
Hi Uwe,
What is the value writen to the SCU_CLK->CGATCLR0 register? Clock gating for both CCU8 and HRPWM0 must be disabled.
Best regards,
Siew Lee
What is the value writen to the SCU_CLK->CGATCLR0 register? Clock gating for both CCU8 and HRPWM0 must be disabled.
Best regards,
Siew Lee
Not applicable
Aug 29, 2013
05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 29, 2013
05:58 AM
Hi Siew Lee,
I just copied the code you provided to my project and called the CSG_Init() rifgt after DAVE_Init(). Stepping through your init routine you can see the first three statements charging the values of the written registers but the no changes in HRPWM->* registers are visible while stepping further on.
I found in the manual the note that between SCU-registers and HRPWM-registers there should be
5th Step: Write 0x00004A4E to the GLBANA register. (xmc4400: v.11, page 22-127)
Maybe you did that outside of the init-routine.
Best regards
Uwe
I just copied the code you provided to my project and called the CSG_Init() rifgt after DAVE_Init(). Stepping through your init routine you can see the first three statements charging the values of the written registers but the no changes in HRPWM->* registers are visible while stepping further on.
I found in the manual the note that between SCU-registers and HRPWM-registers there should be
5th Step: Write 0x00004A4E to the GLBANA register. (xmc4400: v.11, page 22-127)
Maybe you did that outside of the init-routine.
Best regards
Uwe
Attachments are accessible only for community members.
Aug 29, 2013
07:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 29, 2013
07:45 PM
Not applicable
Aug 29, 2013
10:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 29, 2013
10:10 PM
Hi Siew Lee,
thanks for the quick answer. Indeed the additional writing of GLBANA does not change anything.
In your first example you proposed to de-assert HRPWM, CCU8, CCU4 and VADC with
With
as you propose now you just skip the de-assertion of CCU4 and VADC.
CCU8 was de-asserted in both examples, so nothing addition was made active here but some peripherals are missing now.
I will test it Sunday evening since I'm on leave for the weekend.
Best Regards
Uwe
thanks for the quick answer. Indeed the additional writing of GLBANA does not change anything.
In your first example you proposed to de-assert HRPWM, CCU8, CCU4 and VADC with
SCU_CLK->CGATCLR0 |= 0x00800085;//HRPWM+CCU8+CCU4+VADC
With
SCU_RESET->PRCLR0 |= 0x00800080
as you propose now you just skip the de-assertion of CCU4 and VADC.
CCU8 was de-asserted in both examples, so nothing addition was made active here but some peripherals are missing now.
I will test it Sunday evening since I'm on leave for the weekend.
Best Regards
Uwe
Not applicable
Sep 01, 2013
11:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 01, 2013
11:58 AM
Hi Siew,
sorry, I mixed up de-assert and clock gating. I tested it and the init works well now. I can see all set values in the HRPWM0-registers.
How can I set a duty cycle now and how can I get the signal out of a pin now ?
Best regards
Uwe
sorry, I mixed up de-assert and clock gating. I tested it and the init works well now. I can see all set values in the HRPWM0-registers.
How can I set a duty cycle now and how can I get the signal out of a pin now ?
Best regards
Uwe
Not applicable
Sep 02, 2013
01:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 02, 2013
01:04 AM
Hi Uwe,
I'm thinking that you should be able to set a duty cycle by writing to CC8yCR since it is using CCU8 modules. Why not to have a try?
Best regards,
Zain
I'm thinking that you should be able to set a duty cycle by writing to CC8yCR since it is using CCU8 modules. Why not to have a try?
Best regards,
Zain
Sep 02, 2013
02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 02, 2013
02:23 AM
Hi Uwe,
You could connect the CSG to CCU8 module. Refer to attach image for the connections.
In DAVE3, add the PWMSP002 app, and connect the CSG output to CCU8 event. Please refer to the XMC44 reference manual, CCU8 Interconnect chapter for the connections.
Example to connect CSG0 output to CCU80 slice 3 event1. This event1 will start the CCU8 timer.
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->INS, CCU8_CC8_INS_EV1IS_Msk, CCU8_CC8_INS_EV1IS_Pos, CCU8xINyP);
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->INS, CCU8_CC8_INS_EV1EM_Msk, CCU8_CC8_INS_EV1EM_Pos, 1);
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->CMC, CCU8_CC8_CMC_STRTS_Msk, CCU8_CC8_CMC_STRTS_Pos, CCU8PWMLIB_EVENT_1);
Best regards,
Siew Lee
You could connect the CSG to CCU8 module. Refer to attach image for the connections.
In DAVE3, add the PWMSP002 app, and connect the CSG output to CCU8 event. Please refer to the XMC44 reference manual, CCU8 Interconnect chapter for the connections.
Example to connect CSG0 output to CCU80 slice 3 event1. This event1 will start the CCU8 timer.
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->INS, CCU8_CC8_INS_EV1IS_Msk, CCU8_CC8_INS_EV1IS_Pos, CCU8xINyP);
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->INS, CCU8_CC8_INS_EV1EM_Msk, CCU8_CC8_INS_EV1EM_Pos, 1);
WR_REG(PWMSP002_Handle0.CC8yRegsPtr->CMC, CCU8_CC8_CMC_STRTS_Msk, CCU8_CC8_CMC_STRTS_Pos, CCU8PWMLIB_EVENT_1);
Best regards,
Siew Lee
Sep 17, 2013
07:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 17, 2013
07:00 PM
Hi,
FYI, I have uploaded the HRPWM example project in this thread: http://www.infineonforums.com/threads/929-HRPWM-device-guide-with-examples.
Best regards,
Siew Lee
FYI, I have uploaded the HRPWM example project in this thread: http://www.infineonforums.com/threads/929-HRPWM-device-guide-with-examples.
Best regards,
Siew Lee
May 20, 2014
02:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 20, 2014
02:11 AM
Hello,
in latest update of Dave Apps, HRPWM Apps are inlcuded. Hope this helps!
BR
Pablo
in latest update of Dave Apps, HRPWM Apps are inlcuded. Hope this helps!
BR
Pablo