Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable
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:
2983.attach
2984.attach
2985.attach
2986.attach
0 Likes
2 Replies
Eric1
Employee
Employee
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
0 Likes
Not applicable
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
0 Likes