AnsweredAssumed Answered

DSCs and programmable delay block...

Question asked by TurboMan on Mar 13, 2013
Latest reply on May 10, 2013 by TurboMan

Having problems and looking for suggestions for the PDB.

 

I have a stand alone project, where I can enable / disable the PDB after software delays, but I can't replicate this functionality in production code. I'm using the following:

 

[Code]

//Set PDB producing pulses here...
GPIOC_PER |= 0x4000;//Set GPIOC14 as peripheral for PDB.
PDB1_MCTRL &= ~PDB1_MCTRL_PDBEN_MASK;//Disable module
PDB1_CTRLA &= ~(PDB1_CTRLA_DAF_MASK | PDB1_CTRLA_DBF_MASK);//Clear A and B delay flags
asm(nop);
asm(nop);
PDB1_MCTRL |= PDB1_MCTRL_PDBEN_MASK;//Enable module
PDB1_MCTRL |= PDB1_MCTRL_SWTRIG_MASK;//Software trigger.
asm(nop);
asm(nop);//Spacing nops?

[/Code]

Outcomes