I'm looking to use the PDB for one-shot interrupt generation (I'm not driving DACs or ADC, just looking for interrupt generation). While I can get the Interrupt Flag (PDBIF) to go active I can't get my interrupt to actually vector. I noticed in the PDB block diagram that the interrupt appears to be gated by TOEx. But this is somewhat confusing, as I don't want to involve the DAC triggers at all. Can anyone provide help? What is the mystery setting to get interrupt to fire?
My setup code:
// Enable PDB clock
SIM->SCGC6 |= SIM_SCGC6_PDB_MASK;
// Set timeout
PDB0->IDLY = PDB_IDLY_IDLY(0x7fff);
PDB0->SC =
PDB_SC_SWTRIG_MASK | // Software trigger
PDB_SC_TRGSEL(0xF) | // Software trigger select
PDB_SC_PDBEN_MASK | // Enable PDB
PDB_SC_PDBIE_MASK | // Enable Interrupt
PDB_SC_LDOK_MASK; // Load OK