I'm having issues getting the DAC to work via hardware triggering using the PDB. I'm using the MKV31F512. I've had the DAC running fine using software triggering, but get no output on the DAC trying to trigger via hardware using the PDB output with PIT0 trigger input to the PDB using PDB interval trigger 0. In the debugger the PDB0 peripheral register does not populate, making it difficult to see what's going on. Any insight would be appreciated. Code is attached.
Original Attachment has been moved to: main.c.zip
Hi Phil Woods
Please check the following post:
Using PIT channel 0 as a PDB trigger input source
Here are some recommendations for PIT as PDB trigger. I saw in your code that you have enable continuous mode in PDB, when PIT trigger PDB, PDB will trigger DAC according to PDB INT count. Do you need to synchronize the your PDB with PIT, or why do you need to use PIT in your application?
I also recommend you to check the following post:
K22F DAC trigger documentation
They could help you in your final application and understanding PDB module.
Best Regards
Jorge Alcala