MC56F8006 DTMF

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC56F8006 DTMF

2,059 Views
davefs
Contributor I

I'm trying to implement a DTMF decoder using my MC56F8006Demo board.  I feel like I'm pretty close.  When I run it in debugging mode in Code Warrior it looks like it jumps to void Cpu_Interrupt(void), which apparently is for unhanded interrupts.

 

Whenever I comment out this line, I don't have the problem. 

 

dtmfresult = DTMFDetection(pDTMFDet, (Frac16 *) &AdcBuffer[AdcReadIndex], 16);

 

Also, if I put a breakpoint on that line then it never seems to jump to the Cpu_interrupt.  I'm guessing there's either a timing problem or I'm not continuing enough times to hit whatever condition is causing the problem.  I was hoping I could look at the variables before it called the DTMFDetection function and find something wrong that caused it to hit the interrupt, but no luck.  After it hits the interrupt I'm having a hard time finding what's causing the problem.

 

I've attached the code, it's basically a modified version of the FFT example.  It still has a lot of the FFT stuff in it, I'm using that to verify sampling my sound source is working, I plan on cleaning that all out once I get it working.  It looks like the problem happens independent of my sound source connected to the board, so you shouldn't need to connect anything to the board to see the error.

 

Thanks!

Labels (1)
Tags (1)
0 Kudos
4 Replies

437 Views
davefs
Contributor I

 

pConfig = (dtmfdet_sConfigure *) memMallocEM (sizeof (dtmfdet_sConfigure));
        if (pConfig == NULL) assert(!"Out of memory");

 

I've done a bunch more work on this trying to find the problem.  i notice that it breaks on whatever code is after the assert below.  The weird thing is if I look at the value of pConfig (in the variable watch window in Code Warrior), it's not NULL.  Everything looks good.  Any ideas why this would be happening.  From what I can tell the pConfig doesn't look too big, so I don't know why it's doing this.

 

pConfig = (dtmfdet_sConfigure *) memMallocEM (sizeof (dtmfdet_sConfigure));        

if (pConfig == NULL) assert(!"Out of memory");

 

I've attached the cleaned up code (removed FFT stuff).

 

Thanks

0 Kudos

437 Views
davefs
Contributor I

I'm still having issues with the code.  Here's an update of the code (this is rewritten from scratch instead of using the FFT example).  It seems to runs without crashing sometimes, even though it never seems to detect DTMF tones.  When it crashes it looks like it's crashing at the DTMFDetection method.  It probably crashes about 70% of the time.  It seems to work best right after I powercycle the chip.

 

Is it possible that the error is in the library.  It seems like it shouldn't be that hard to sample a source and then run the function to see if a DTMF tone is in it.  Also, processor expert thinks my DSC supports that function, but is it possible that it really doesn't work?

 

Any ideas on this would be helpful, I'm not sure where to go from here.

0 Kudos

437 Views
davefs
Contributor I

Is it possible the MC56F8006 simply doesn't have enough memory (with 16K) for the DTMF library to work?  Here's the processor expert help page for it C:\ProgramData\Processor Expert\CW56800_PE3_00\DOCs\PEhlp00.html .  If there's not enough on chip memory could I use external memroy to do it?

 

Thanks

0 Kudos

437 Views
ProcessorExpert
Senior Contributor III

Hello,

I have look on the project and it seems that there are the following issues that could cause the problems:

 

- The saturation mode must be enabled for any SDK based components (like telephony libraries) to work properly. It can be done by enabling the property Saturation mode in the CPU component.

 

- There might be not enough heap space for the the DTMF library. This might require a deeper analysis... You could try to play with stack and heap settings in the CPU component Build options tab.

 

best regards
Petr Hradsky
Processor Expert Support Team

 

0 Kudos