I want to trigger the DAC module through of RTC 1 hz clock hardware signal and shoot a DMA transfer. How do I configure the registers? My device is the MK64FN1M0VLL12.
The RTC doesn't supply any DMA trigger internally so you may need to use the RTC interrupt to trigger the DAC output (which is possibly not a problem since it occurs only once a second).If you do absolutely need to do it via DMA you can generate a 1Hz RTC clock output signal and connect it to a GPIO pin DMA trigger.
uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)Kinetis: http://www.utasker.com/kinetis.html
HI Mark, thank you for your reply.
Yes, I need to do it via DMA, but I can't connect it to a GPIO pin, because I am already using all RTC_OUT pins to another purpose.
I think to use PDB module to trigger the DAC and the DAC trigger the DMA, but How do I configure the registers? Other problem, I am already using the PDB modulo to trigger my ADCs and I need to share this module. Changing the PDB registers as little as possible.
If you don't need to use the RTC why not use a PIT of a FlexTimer? There are various DMAMUX tiggers from these.
But I don't want to use the pin, do you know another form?
When my circuit is on, I have a OSCILATOR 50MHz Abracon - ASVMB-50.000MHZ-LY-T with +- 10 ppm (-40°C to +85°C), this consums 20 mA.
When my circuit is off, I have a CRYSTAL ABS25-32.768KHZ-T-Abracon with +- 180 ppm (-40°C to +85°C) this consums ~ 2 nA and I need to keep the watch several days. But I need to acuracy.
I already saw the "AN4949" but I don't like of this type of compensation. because I need more accuracy. My OSCILATOR typicaly stay about +-3ppm and if I measure the RTC_CLKOUT period signal about ~ 30seconds. I can compensate the "MK64FN1M0VLL12 internal RTC" through of CIR and TCR register having a feedback. see the figure 1:
If I configure the CIR register with 29, varying the TCR I compensate the Crystal erro about 1pp per TCR. see the figure 2:
Yesterday, I implement the algorithm with your suggestion:
"If you do absolutely need to do it via DMA you can generate a 1Hz RTC clock output signal and connect it to a GPIO pin DMA trigger."
It achived the target see the figure 3
The RTC_CLKOUT is not connected anywhere internally and so I don't know of another technique.
Retrieving data ...