1

I am trying to find any document on connecting External Crystal in AVR32DA28 and the XTAL32K2 and XTAL32K1 pins only supports 32 khz external crystal and any other value of crystal can be connected on EXTCLK pin but i can not figure out the way to connect the crystal on single pin. I know it might be a simple connection but i am new in this Embedded system so it will be really appreciable if someone can help me. The value i want to connect is 16MHZ Crystal.

Rev
  • 5,827
  • 4
  • 27
  • 51

1 Answers1

0

Judging from the data sheet, you can't connect a crystal to that device.

11.3.3.2.2 External Clock (EXTCLK)
The EXTCLK is taken directly from the pin. This GPIO pin is automatically configured for the EXTCLK if any peripheral requests this clock. The maximum input frequency for the EXTCLK is 24 MHz. This clock source has a start-up time of two cycles when first requested.

You need a dedicated crystal oscillator, which will provide an output that you can connect to EXTCLK.

Rev
  • 5,827
  • 4
  • 27
  • 51
  • Value Name Description 0x0 OSCHF Internal high-frequency oscillator -- 0x1 OSC32K 32.768 kHz internal oscillator -- 0x2 XOSC32K 32.768 kHz external crystal oscillator -- 0x3 EXTCLK External clock --> At first i have to select this bit to unable the external clock setting is this correct. – Rj Choudhary Sep 30 '22 at 12:59
  • sorry to say but what do you mean by dedicated crystal oscillator. – Rj Choudhary Sep 30 '22 at 13:02
  • 1
    Yes, you have to configure the MCLKCTRLA register to 0x03 EXTCLK. "crystals" require additional circuitry to make them oscillate. Many controllers provide such a circuit internally, requiring two external capacitors and the crystal only. This controller does not have such a oscillator circuit and thus requires a "real" external clock signal (square wave). You can buy "Crystal oscillators" that contain the whole oscillator circuit including the crystal, which provide a "clock out" pin that can be fed into EXTCLK for example. – Rev Sep 30 '22 at 18:27
  • I have another question can you please help me to make a pwm with two signals one with inverted and another with non inverted, i tried a lot to achieve this but somehow it is getting more and more complex for me compare to atmega series. – Rj Choudhary Oct 16 '22 at 09:35
  • 1
    @RjChoudhary Please vote and accept this answer if it is resolved and ask a new question about the PWM because its not related to this one. – Rev Oct 16 '22 at 11:13
  • could you give me some references for clock generator that will help me to find more specific ones. – Rj Choudhary Oct 26 '22 at 07:02
  • 1
    Something like LFSPXO018038. That is a 16MHz 3.3V oscillator. You can also find oscillators DIP-8 packages. But the example should get you started. Standalone CRYSTALS normally have two pins, where oscillators have at least 3 or 4 pins: Vcc, GND, OUT and sometimes ENABLE. – Rev Oct 26 '22 at 07:31