Not applicable
Nov 07, 2014
01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 07, 2014
01:52 AM
Hi,
I am using the XMC4500 Relax Kit and I have created a PWM signal (using Dave, system frequency at 120 MHz, external frequency oscillator 12 MHz). I have also created two interruptions: Period Match Interrupt and Compare Match Interrupt that I have connected to the PWM signal. In the interrupt codes, I have only set then reset pins in order to visualize them thanks to an oscilloscope.
In the first place, I have set the PWM frequency to 100 kHz and I can see the good frequency for the PWM (yellow in pictures bellow) and pins corresponding to the interruption (green for the Period Match Interrupt and violet for the Compare Match Interrupt) are set then reset periodically and at the right moment.
Then I tried to configure the PWM frequency to 1MHz. It seems that the interrupts are not active at the right moment as the pins don’t toggle after every rising or falling edge. Besides, the period of each interruption is different whereas it shouldn’t have to. Is there a possibility to increase the PWM frequency a 1 MHz ?
Best regards,
Jey
I am using the XMC4500 Relax Kit and I have created a PWM signal (using Dave, system frequency at 120 MHz, external frequency oscillator 12 MHz). I have also created two interruptions: Period Match Interrupt and Compare Match Interrupt that I have connected to the PWM signal. In the interrupt codes, I have only set then reset pins in order to visualize them thanks to an oscilloscope.
In the first place, I have set the PWM frequency to 100 kHz and I can see the good frequency for the PWM (yellow in pictures bellow) and pins corresponding to the interruption (green for the Period Match Interrupt and violet for the Compare Match Interrupt) are set then reset periodically and at the right moment.
Then I tried to configure the PWM frequency to 1MHz. It seems that the interrupts are not active at the right moment as the pins don’t toggle after every rising or falling edge. Besides, the period of each interruption is different whereas it shouldn’t have to. Is there a possibility to increase the PWM frequency a 1 MHz ?
Best regards,
Jey
9 Replies
Nov 09, 2014
08:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 09, 2014
08:04 PM
Jey wrote:
Hi,
I am using the XMC4500 Relax Kit and I have created a PWM signal (using Dave, system frequency at 120 MHz, external frequency oscillator 12 MHz). I have also created two interruptions: Period Match Interrupt and Compare Match Interrupt that I have connected to the PWM signal. In the interrupt codes, I have only set then reset pins in order to visualize them thanks to an oscilloscope.
In the first place, I have set the PWM frequency to 100 kHz and I can see the good frequency for the PWM (yellow in pictures bellow) and pins corresponding to the interruption (green for the Period Match Interrupt and violet for the Compare Match Interrupt) are set then reset periodically and at the right moment.
Then I tried to configure the PWM frequency to 1MHz. It seems that the interrupts are not active at the right moment as the pins don’t toggle after every rising or falling edge. Besides, the period of each interruption is different whereas it shouldn’t have to. Is there a possibility to increase the PWM frequency a 1 MHz ?
Best regards,
Jey
Hi Jey,
Is there any other interrupts other than the period and compare match interrupt within your software?
Best Regards
Travis
Not applicable
Nov 13, 2014
12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 13, 2014
12:35 AM
Hi Travis,
No, there is no other interrupt than the period and compare match interrupt (I am using the NVIC002 App for both interrupts).
Best regards,
Jey
No, there is no other interrupt than the period and compare match interrupt (I am using the NVIC002 App for both interrupts).
Best regards,
Jey
Nov 13, 2014
10:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 13, 2014
10:44 PM
Hi Jey,
We are able to replicate this issue at PWM frequency of 500kHz by setting an IO during compare match and resetting the IO at period match. From the oscilloscope, we can see that the IO waveform is being delay which explains that the interrupt experience some delay of about 12 CLK cycles. This is very significant in high frequency as the compare/period match pulse width is very narrow. Therefore I can conclude that this is considered reasonable and would suggest that you reduce your PWM frequency
We are able to replicate this issue at PWM frequency of 500kHz by setting an IO during compare match and resetting the IO at period match. From the oscilloscope, we can see that the IO waveform is being delay which explains that the interrupt experience some delay of about 12 CLK cycles. This is very significant in high frequency as the compare/period match pulse width is very narrow. Therefore I can conclude that this is considered reasonable and would suggest that you reduce your PWM frequency
Not applicable
Nov 14, 2014
04:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 14, 2014
04:44 AM
Hi Travis,
Thanks for your answer. I have an other question (maybe I have to create a new post?). Is there a solution to toggle an output at 10 Mhz ? I didn't succeed upper 4 MHz by setting and resetting a pin in a loop (without any interrupt or other fonction).
Best regards,
Jey
Thanks for your answer. I have an other question (maybe I have to create a new post?). Is there a solution to toggle an output at 10 Mhz ? I didn't succeed upper 4 MHz by setting and resetting a pin in a loop (without any interrupt or other fonction).
Best regards,
Jey
Nov 16, 2014
07:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2014
07:11 PM
Jey wrote:
Hi Travis,
Thanks for your answer. I have an other question (maybe I have to create a new post?). Is there a solution to toggle an output at 10 Mhz ? I didn't succeed upper 4 MHz by setting and resetting a pin in a loop (without any interrupt or other fonction).
Best regards,
Jey
Hi Jey,
At 500KHz we are already experience some drift in the interrupt, so any frequency higher than this will be very significant.
May I know, why do you need to toggle the IO pin instead of generating a 10Mhz PWM?
Best Regards
Travis
Nov 16, 2014
07:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2014
07:12 PM
Jey wrote:
Hi Travis,
Thanks for your answer. I have an other question (maybe I have to create a new post?). Is there a solution to toggle an output at 10 Mhz ? I didn't succeed upper 4 MHz by setting and resetting a pin in a loop (without any interrupt or other fonction).
Best regards,
Jey
Hi Jey,
At 500KHz we are already experience some drift in the interrupt, so any frequency higher than this will be very significant.
May I know, why do you need to toggle the IO pin instead of generating a 10Mhz PWM?
Best Regards
Travis
Not applicable
Dec 03, 2014
12:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 03, 2014
12:51 AM
Hi Travis,
I wanted to create a specific (23 bits) SPI communication at 1Mhz. There will be treatment (interrupts...) between two SPI frames and I am afraid that the system will not be fast enough to manage this without having any troubles at high frequencies. Does a compilation option exist to optimize the clock system for these functionnalities ?
Best Regards
Jey
I wanted to create a specific (23 bits) SPI communication at 1Mhz. There will be treatment (interrupts...) between two SPI frames and I am afraid that the system will not be fast enough to manage this without having any troubles at high frequencies. Does a compilation option exist to optimize the clock system for these functionnalities ?
Best Regards
Jey
Not applicable
Dec 30, 2014
12:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 30, 2014
12:57 PM
I am facing the same problem: I am using a XMC 4500 relax kit and currently I am trying to communicate with a resolver to digital IC. The R2D IC (http://www.tamagawa-seiki.com/pdf/download/AU6803_04_E_Manual_DRAFT20120229.pdf) has a 3wire serial comunication protocol: a CLK signal, an SCSB to start the data out from the IC and a DATA signal. To read the information from the IC I used a PWMSP001 App, where the CLK signal is the PWM output with a duty cycle of 50% and frequency of 31 250 000Hz. I try to read the digital pin at the compare match interrupt. However, the reading takes a long time, and I cannot read the pin before the next compare match. How can I overcome this problem? Is there a way to reduce the pin reading time?
Not applicable
Dec 30, 2014
01:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 30, 2014
01:17 PM
Hi, I am facing the same problem:
I am using a XMC 4500 relax kit and currently I am trying to communicate with a resolver to digital IC. The R2D IC (http://www.tamagawa-seiki.com/pdf/download/AU6803_04_E_Manual_DRAFT20120229.pdf) has a 3wire serial comunication protocol: a CLK signal, an SCSB to start the data out from the IC and a DATA signal. To read the information from the IC I used a PWMSP001 App, where the CLK signal is the PWM output with a duty cycle of 50% and frequency of 3 125 000Hz. I try to read the digital pin at the compare match interrupt. However, the reading takes a long time, and I cannot read the pin before the next compare match. How can I overcome this problem?
I am using a XMC 4500 relax kit and currently I am trying to communicate with a resolver to digital IC. The R2D IC (http://www.tamagawa-seiki.com/pdf/download/AU6803_04_E_Manual_DRAFT20120229.pdf) has a 3wire serial comunication protocol: a CLK signal, an SCSB to start the data out from the IC and a DATA signal. To read the information from the IC I used a PWMSP001 App, where the CLK signal is the PWM output with a duty cycle of 50% and frequency of 3 125 000Hz. I try to read the digital pin at the compare match interrupt. However, the reading takes a long time, and I cannot read the pin before the next compare match. How can I overcome this problem?