Hi,
Starting from the program pdb_dac_trigger.c available in the KSDK v2.0 driver_examples/pdb directory,
I'm trying to use the PIT Channel 0 as a trigger input source of the PDB instead of a trigger software.
To do so, I have made some unsuccessfully changes in the pdb_dac_trigger.c program. See joined file.
So, any help, or idea is welcome.
Best Regards
Nadine,
Original Attachment has been moved to: pdb_dac_trigger.c.zip
解決済! 解決策の投稿を見る。
Hello Nadine,
Some quick points:
/* FIfo loading */
for (DACIndex = 0U; DACIndex < DAC_USED_BUFFER_SIZE; DACIndex++)
{
DAC_BASE->DAT[DACIndex].DATL = datl[sinusIndex]; /* Low 8-bit. */
DAC_BASE->DAT[DACIndex].DATH = dath[sinusIndex]; /* High 4-bit. */
sinusIndex++;
}
if (sinusIndex >= SINUS_SIZE)
sinusIndex = 0;
DACIndex = 0;
PIT_StartTimer(PIT, kPIT_Chnl_0);
I hope this can help you!
Best Regards,
Isaac
Hello Nadine,
Some quick points:
/* FIfo loading */
for (DACIndex = 0U; DACIndex < DAC_USED_BUFFER_SIZE; DACIndex++)
{
DAC_BASE->DAT[DACIndex].DATL = datl[sinusIndex]; /* Low 8-bit. */
DAC_BASE->DAT[DACIndex].DATH = dath[sinusIndex]; /* High 4-bit. */
sinusIndex++;
}
if (sinusIndex >= SINUS_SIZE)
sinusIndex = 0;
DACIndex = 0;
PIT_StartTimer(PIT, kPIT_Chnl_0);
I hope this can help you!
Best Regards,
Isaac
Hi Isaac,
Thanks for the answer. My program is working now.
Best Regards
Nadine,