How to Configure 32.768 kHz Clock for MAX30001 with nRF52840 in Zephyr?

I have designed a PCB using the nRF52840 microcontroller and the MAX30001g ECG sensor. The sensor requires a 32.768 kHz clock signal via its FCLK pin, as shown in the attached schematic.

Here is what I have done so far:

  • Connected a 32.768 kHz crystal oscillator to the nRF52840, as seen in the diagram.
  • Configured relevant pins for the sensor.

Here is my prj.conf file:

CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_SPI=y
CONFIG_SENSOR=y

# #debugging
# CONFIG_CORTEX_M_DEBUG_MONITOR_HOOK=y
# CONFIG_SEGGER_DEBUGMON=y

#mention this if you want to program in external board
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n #at_configuration
#or
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
#or
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
#or
# CONFIG_BOARD_ENABLE_DCDC=n

Despite these configurations, the sensor does not seem to be receiving the required clock signal. I also reviewed the MAX30001g datasheet, which specifies the need for this clock input.

Questions:

  1. What additional configurations are needed in the prj.conf file to enable the 32.768 kHz clock output on the required pin?
  2. How can I verify that the nRF52840 is generating the clock signal correctly?

Any guidance would be greatly appreciated!

Attachments:



Parents
  • Hello Manoj,
    The nRF52840 doesn't generate a 32.768kHz signal, the XL1 and XL2 are pins to handle the crystal that is connected. In what way are you telling the nRF52840 to start the external LFXO/32.768kHz source? It is not running unless it is configured to start and run by the nRF52840. You can verify the operation of the crystal by connecting an oscilloscope to the XL1 orXL2 pins and see the oscillation once the crystal is enabled by the nRF52840. 
    The one pin from the crystal would also be unlikely to work as a single driver for the input on the MAX3000 device, are you sure the schematic setup with R9 and feeding to the FCLK pin is as recommended by Analog Devices?
    Best regards
    Asbjørn
Reply
  • Hello Manoj,
    The nRF52840 doesn't generate a 32.768kHz signal, the XL1 and XL2 are pins to handle the crystal that is connected. In what way are you telling the nRF52840 to start the external LFXO/32.768kHz source? It is not running unless it is configured to start and run by the nRF52840. You can verify the operation of the crystal by connecting an oscilloscope to the XL1 orXL2 pins and see the oscillation once the crystal is enabled by the nRF52840. 
    The one pin from the crystal would also be unlikely to work as a single driver for the input on the MAX3000 device, are you sure the schematic setup with R9 and feeding to the FCLK pin is as recommended by Analog Devices?
    Best regards
    Asbjørn
Children
No Data
Related