I want to trigger the DAC module through of RTC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I want to trigger the DAC module through of RTC

2,093 Views
felipevilaca
Contributor II

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. 

Labels (1)
0 Kudos
Reply
9 Replies

1,855 Views
felipevilaca
Contributor II

Hi Mark

But I don't want to use the pin, do you know another form?

Felipe

0 Kudos
Reply

1,855 Views
mjbcswitzerland
Specialist V

Felipe

The RTC_CLKOUT is not connected anywhere internally and so I don't know of another technique.

Regards

Mark

0 Kudos
Reply

1,855 Views
felipevilaca
Contributor II

ok Mark,

Thank you

Felipe Vilaça

0 Kudos
Reply

1,855 Views
felipevilaca
Contributor II

figure 1figure 1.png

Figure 2

figure 2.png

Figure 3

figure 3.png

0 Kudos
Reply

1,855 Views
felipevilaca
Contributor II

Hi Mark

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


But I don't want to use the pin, do you know another form?

0 Kudos
Reply

1,855 Views
felipevilaca
Contributor II

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.

Thanks.

0 Kudos
Reply

1,855 Views
mjbcswitzerland
Specialist V

Hi Felipe

If you don't need to use the RTC why not use a PIT of a FlexTimer? There are various DMAMUX tiggers from these.

Regards

Mark

0 Kudos
Reply

1,855 Views
felipevilaca
Contributor II

Hi Mark

But I don't want to use the pin, do you know another form?

 

Felipe

0 Kudos
Reply

1,855 Views
mjbcswitzerland
Specialist V

Hi Felipe

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.

Regards

Mark


uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)
Kinetis: http://www.utasker.com/kinetis.html

0 Kudos
Reply