Not applicable
Jan 25, 2018
06:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 25, 2018
06:54 AM
Hi all,
I'm using the XMC4500 Relax Lite and i want to use the DSM App for reading the ACPL-7970.
The DSM App is not triggering an Interrupt, not even with the extra app.
My problem is, that it worked, even without the extra Interrupt App, but now it doesn't anymore and I don't know why.
Pins are properly mapped.
I hope one of you can help me. Thanks in advance!
The part of my code:
#include
status = DAVE_Init();
...
void ISR_DSM()
{
// Update stored vals
DS_ADC_DEMOD_CH_GetResult(DS_ADC_DEMOD_0_CHANNEL_A,&resultA);
DS_ADC_DEMOD_CH_GetResult(DS_ADC_DEMOD_0_CHANNEL_B,&resultB);
current = (((float)resultA * 0.320)/32768.0) / 0.100;
voltage = (((float)resultB * 0.320)/32768.0) * 180;
}
App:
I'm using the XMC4500 Relax Lite and i want to use the DSM App for reading the ACPL-7970.
The DSM App is not triggering an Interrupt, not even with the extra app.
My problem is, that it worked, even without the extra Interrupt App, but now it doesn't anymore and I don't know why.
Pins are properly mapped.
I hope one of you can help me. Thanks in advance!
The part of my code:
#include
status = DAVE_Init();
...
void ISR_DSM()
{
// Update stored vals
DS_ADC_DEMOD_CH_GetResult(DS_ADC_DEMOD_0_CHANNEL_A,&resultA);
DS_ADC_DEMOD_CH_GetResult(DS_ADC_DEMOD_0_CHANNEL_B,&resultB);
current = (((float)resultA * 0.320)/32768.0) / 0.100;
voltage = (((float)resultB * 0.320)/32768.0) * 180;
}
App:
2 Replies
Jan 30, 2018
09:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 30, 2018
09:00 AM
Dear ExXeptional,
generally form configuration point of view it looks correct.
There are 2 topics you can try:
1. The DSD is set to "Clock master: DSM" so the DSD expects an clk.
Maybe something is wrong with this clk. You can check this by setting the DSD as clk master.
2. Depending of the DSM clk the interrupt frequency can be quite high:
DSM clk = 10MHz, Dezimation= 32 => 313kHz
If the calculation in the ISR is long or other tasks interrupt the ISR it is maybe not.
You could check this with an variable increasing in the main while and resetting in another (CCU4) interrupt.
I assume you have connect a interrupt app to the DS ch A result signal.
I Hope this is helping.
Regards
Eric
generally form configuration point of view it looks correct.
There are 2 topics you can try:
1. The DSD is set to "Clock master: DSM" so the DSD expects an clk.
Maybe something is wrong with this clk. You can check this by setting the DSD as clk master.
2. Depending of the DSM clk the interrupt frequency can be quite high:
DSM clk = 10MHz, Dezimation= 32 => 313kHz
If the calculation in the ISR is long or other tasks interrupt the ISR it is maybe not.
You could check this with an variable increasing in the main while and resetting in another (CCU4) interrupt.
I assume you have connect a interrupt app to the DS ch A result signal.
I Hope this is helping.
Regards
Eric
Not applicable
Jan 31, 2018
06:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 31, 2018
06:38 AM
Hi Eric,
thank you for your reply
You are right, I forgot to change the decimation to 256.
But the problem was, that I did not call DS_ADC_DEMOD_Start(&DS_ADC_DEMOD_0); at the beginning.
Apparently I deleted that line by accident.
Well, thank you nonetheless.
Regards
thank you for your reply
You are right, I forgot to change the decimation to 256.
But the problem was, that I did not call DS_ADC_DEMOD_Start(&DS_ADC_DEMOD_0); at the beginning.
Apparently I deleted that line by accident.
Well, thank you nonetheless.
Regards