nRF5340 Internal RC Oscillator Question for DTM USB Configuration

Hi,

I used both SDK v2.3.0 and v2.4.0, I was able to get DTM example working over USB CDC ACM with nrf5340 DK PCA10095. I switched to my custom board which has no 32KHz XTAL between P0.00/XL1-P0.01/XL2. I changed both direct_test_mode\prj.conf and direct_test_mode\child_image\remote_shell\prj.conf to use internal RC oscillator to include:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y

My issue is right after I programmed the combined application and network image (merged_domains.hex) with nRF Connect Programmer, I was able to see the USB VCOM (when nRF Connect Programmer trace has "10:34:02.245 Getting serialport options from persistent store D0C417815ECA4DEC.pc-nrfconnect-programmer") for 7 seconds then disappeared.

I browsed on DevZone and saw a few questions about internal RC oscillator but I am not sure what is the root cause in my case. Please advise.

Regards

Parents
  • Hello,

    For boards that don't include the 32K XTAL, we generally recommend selecting the LFRC source. It is not as accurate as LFSYNTH, but it gives you lower sleep currents since it does not rely on the HFCLK. You can use our online power profiler to compare the difference between LRFC and LFXO in terms of power consumption.

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y

    Here you are selecting both LFRC and LFXO, but it is only possible to select one. It is also important that you select the same clock source for all images in your project.

    It should be sufficient to apply CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y for each build

    Best regards,

    Vidar

  • Hi Vidar,

    Thank you for the suggestion. With just CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y alone, I am not able to see USB VCOM port from Windows device manager at all. With just CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y alone, Windows shows USB VCOM for about 7 seconds as before. I attach direct_test_mode/prj.conf here:

    # Configure assertions
    CONFIG_ASSERT=y
    CONFIG_ASSERT_NO_COND_INFO=y
    CONFIG_ASSERT_NO_MSG_INFO=y
    
    CONFIG_HW_STACK_PROTECTION=y
    
    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    
    # Use necessary peripherals
    CONFIG_NRFX_TIMER0=y
    CONFIG_NRFX_TIMER1=y
    CONFIG_NRFX_TIMER2=y
    
    CONFIG_FEM_AL_LIB=y
    
    CONFIG_CLOCK_CONTROL=y
    CONFIG_CLOCK_CONTROL_NRF=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    

  • I attach \direct_test_mode\child_image\remote_shell\prj.conf here

    CONFIG_STDOUT_CONSOLE=y
    
    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_RING_BUFFER=y
    
    CONFIG_MBOX=y
    CONFIG_IPC_SERVICE=y
    CONFIG_IPC_SERVICE_BACKEND_RPMSG=y
    
    CONFIG_NRFX_UARTE0=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=4096
    
    # Config logger
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    
    CONFIG_REMOTE_SHELL_TX_RING_BUFFER_SIZE=1024
    
    CONFIG_BOARD_ENABLE_CPUNET=y
    
    CONFIG_CLOCK_CONTROL=y
    CONFIG_CLOCK_CONTROL_NRF=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    

Reply
  • I attach \direct_test_mode\child_image\remote_shell\prj.conf here

    CONFIG_STDOUT_CONSOLE=y
    
    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_RING_BUFFER=y
    
    CONFIG_MBOX=y
    CONFIG_IPC_SERVICE=y
    CONFIG_IPC_SERVICE_BACKEND_RPMSG=y
    
    CONFIG_NRFX_UARTE0=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=4096
    
    # Config logger
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    
    CONFIG_REMOTE_SHELL_TX_RING_BUFFER_SIZE=1024
    
    CONFIG_BOARD_ENABLE_CPUNET=y
    
    CONFIG_CLOCK_CONTROL=y
    CONFIG_CLOCK_CONTROL_NRF=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    

Children
No Data
Related