#121 Test LSE crystal circuit for best practice

닫힘
Michael Schloh von Bennewitz4 년 전을 오픈 · 1개의 코멘트

Test LSE crystal circuit for best practice

Problem environment

Crystals in radio applications play an increasingly important role at run time.

Steps to reproduce

  1. Refer to the layout
  2. Use a frequency counter
  3. Measure crystal circuits

Expected result

The output of all crystals is as expected, and the circuit design follows best practices.

Actual result

Crystal outputs is unknown pending finding a suitable measurement tool.

Resources

https://www.murata.com/en-us/products/timingdevice/crystalu/basic/
https://ww1.microchip.com/downloads/en/AppNotes/AN2648-Selecting_Testing-32KHz-Crystal-Osc-for-AVR-MCUs-00002648B.pdf

Instructions

A pin with GCLK_IO[x] functionality can be used to route GCLKx clock. In this case, we will use GCLK3 to output clock as PA17(GCLK_IO[3]) is available for probing in the design through R14(I2C_SCL).

Enable clock output by configuring GCLKx as below to enable clock output(CONF_CLOCK_GCLK_3_OUTPUT_ENABLE) for the specific GCLK. These changes are done in conf_clocks.h.

# define CONF_CLOCK_GCLK_3_ENABLE               true
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY       false
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE         SYSTEM_CLOCK_SOURCE_XOSC32K
# define CONF_CLOCK_GCLK_3_PRESCALER            1
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE        true

Next, I/O PA17 which has GCLK_IO[3] as one of the PINMUX needs to be configured with Pinmux function H. The following code snippet could be added in the board_init.c

struct system_pinmux_config pinmux_config;
system_pinmux_get_config_defaults(&pinmux_config);

pinmux_config.mux_position= PINMUX_PA17H_GCLK_IO3;
pinmux_config.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;

system_pinmux_pin_set_config(PIN_PA17,&pinmux_config);

The above code changes would enable GCLK3 with XOSC32K as clock source with output enabled. The pin PA17(GCLK_IO[3]) is enabled with PINMUX function H. With these changes, the device should be able to output XOSC32K clock on PA17.

Severity level

This is low priority because project requirements do not mandate calibrated radio transception.

# Test LSE crystal circuit for best practice ## Problem environment Crystals in radio applications play an increasingly important role at run time. ## Steps to reproduce 1. Refer to the layout 1. Use a frequency counter 1. Measure crystal circuits ## Expected result The output of all crystals is as expected, and the circuit design follows best practices. ## Actual result Crystal outputs is unknown pending finding a suitable measurement tool. ## Resources https://www.murata.com/en-us/products/timingdevice/crystalu/basic/ https://ww1.microchip.com/downloads/en/AppNotes/AN2648-Selecting_Testing-32KHz-Crystal-Osc-for-AVR-MCUs-00002648B.pdf ## Instructions ``` A pin with GCLK_IO[x] functionality can be used to route GCLKx clock. In this case, we will use GCLK3 to output clock as PA17(GCLK_IO[3]) is available for probing in the design through R14(I2C_SCL). Enable clock output by configuring GCLKx as below to enable clock output(CONF_CLOCK_GCLK_3_OUTPUT_ENABLE) for the specific GCLK. These changes are done in conf_clocks.h. # define CONF_CLOCK_GCLK_3_ENABLE true # define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false # define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K # define CONF_CLOCK_GCLK_3_PRESCALER 1 # define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE true Next, I/O PA17 which has GCLK_IO[3] as one of the PINMUX needs to be configured with Pinmux function H. The following code snippet could be added in the board_init.c struct system_pinmux_config pinmux_config; system_pinmux_get_config_defaults(&pinmux_config); pinmux_config.mux_position= PINMUX_PA17H_GCLK_IO3; pinmux_config.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT; system_pinmux_pin_set_config(PIN_PA17,&pinmux_config); The above code changes would enable GCLK3 with XOSC32K as clock source with output enabled. The pin PA17(GCLK_IO[3]) is enabled with PINMUX function H. With these changes, the device should be able to output XOSC32K clock on PA17. ``` ## Severity level This is **low priority** because project requirements do not mandate calibrated radio transception.
Michael Schloh von Bennewitz added the
enhancement
label 4 년 전
Michael Schloh von Bennewitz added the
question
label 4 년 전
Michael Schloh von Bennewitz Postproject catchall 4 년 전 마일스톤을 추가하였습니다.
Michael Schloh von Bennewitz changed title from Test crystal circuits for best practice to Test LSE crystal circuit for best practice 4 년 전
Michael Schloh von Bennewitz 코멘트됨, 4 년 전
소유자

It was determined that the optimal capacitor load is between 15pF and 20pF, as shown by the C18 and C19 values of 18pF.

It was determined that the optimal capacitor load is between 15pF and 20pF, as shown by the C18 and C19 values of 18pF.
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 1명
마감일

마감일이 설정되지 않았습니다.

의존성

이 이슈는 어떠한 의존성도 가지지 않습니다.

불러오는 중...
취소
저장
아직 콘텐츠가 없습니다.