My code works, but I have a problem.
It seems, that if the PIT is to fast (max. frequency 4kHz in my application ) I get a Configuration Error (DMA_DSR_BCRn --> CE ).
I think the reason for this error is, that the BCR equals 0 when the DMA receives a start condition from the PIT.
I use the following workaround to fix this problem:
--> Set BCR to a big value (e.g. maximum) in the INIT-function and reload the BCR with this value for example every 100ms.
--> With this workaround the BCR will not become 0
Have you another idea to fix this problem?
Another idea to use the PIT, DMA and the DAC is, that the PIT use the hardware trigger from the DAC and the DAC make a DMA request to reload the DAC.
Have you an example for this use case?
Best regards
Stefan