<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to start Zephyr bootloader (MCUBOOT) without XTAL 32768Hz?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84119/how-to-start-zephyr-bootloader-mcuboot-without-xtal-32768hz</link><description>I have nrf52840 pcb without xTAL. 
 In this ticket ticket I have discused about start Zephyr project without XTAL onboard. 
 But now I faced with other issue to start mcuboot without XTAL 
 When XTAL is not installed on nrf52840 board - then after reset</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jan 2022 13:33:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84119/how-to-start-zephyr-bootloader-mcuboot-without-xtal-32768hz" /><item><title>RE: How to start Zephyr bootloader (MCUBOOT) without XTAL 32768Hz?</title><link>https://devzone.nordicsemi.com/thread/349991?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 13:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61100795-8167-4b5b-90db-7dfb5940017f</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Thanks you a lot!!!!&lt;/p&gt;
&lt;p&gt;You save me!!!&lt;/p&gt;
&lt;p&gt;CONFIG_BOARD_ENABLE_DCDC=n&lt;br /&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y&lt;br /&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n&lt;br /&gt;CONFIG_MULTITHREADING=y&lt;/p&gt;
&lt;p&gt;I included this in&amp;nbsp;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;bootloader\mcuboot\boot\zephyr\prf.conf&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and now it works!!!&lt;/p&gt;
&lt;p&gt;There is one more issue. I use PPI for ADC and GPIO pending. When I connect and then disconnect - nrf52840 not advertise until reset the SoC.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        IRQ_CONNECT(DT_IRQN(DT_NODELABEL(adc)),
		    DT_IRQ(DT_NODELABEL(adc), priority),
		    nrfx_saadc_irq_handler, NULL, 0);

        adc_configure();
        ppi_init();
        timer_init();

        IRQ_CONNECT(DT_IRQN(DT_NODELABEL(gpiote)),
		    DT_IRQ(DT_NODELABEL(gpiote), priority),
		    nrfx_isr, nrfx_gpiote_irq_handler, 0);
		    
        nrfx_gpiote_init(NRFX_GPIOTE_DEFAULT_CONFIG_IRQ_PRIORITY);

    nrf_gpio_cfg_output(DO_OUTPUT_0); 
    nrf_gpio_cfg_output(DO_OUTPUT_1);
    nrf_gpio_cfg_output(DO_OUTPUT_2); 
    nrf_gpio_cfg_output(DO_OUTPUT_3);
    nrf_gpio_cfg_output(DO_OUTPUT_4); 
    nrf_gpio_cfg_output(DO_OUTPUT_5);
    nrf_gpio_cfg_output(DO_OUTPUT_6); 
    nrf_gpio_cfg_output(DO_OUTPUT_7);
    nrf_gpio_cfg_output(LED_PIN_G); 

    nrf_gpio_cfg_input(DI_INPUT_0, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_1, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_2, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_3, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_4, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_5, NRF_GPIO_PIN_PULLUP);  
    nrf_gpio_cfg_input(DI_INPUT_6, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_7, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_8, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_9, NRF_GPIO_PIN_PULLUP); 
    nrf_gpio_cfg_input(DI_INPUT_10, NRF_GPIO_PIN_PULLUP); 									

    nrfx_gpiote_in_config_t cfg_wdt = NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
    cfg_wdt.pull = NRF_GPIO_PIN_PULLDOWN;
    nrfx_gpiote_in_init(TIM_WAKE, &amp;amp;cfg_wdt, evt_handler1);
    nrfx_gpiote_in_event_enable(TIM_WAKE, true);

    nrfx_gpiote_in_config_t inConfig = NRFX_GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);		
    inConfig.pull = NRF_GPIO_PIN_PULLUP;					

    nrfx_gpiote_in_config_t rtcConfig = NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);		
    rtcConfig.pull  = NRF_GPIO_PIN_PULLUP;			

    nrfx_gpiote_in_init(RTC_PIN,     &amp;amp;rtcConfig,  evt_handler2);

    nrfx_gpiote_in_event_enable(RTC_PIN,     true);
    
    
    
    &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;P.S. Do I have to create a new ticket?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to start Zephyr bootloader (MCUBOOT) without XTAL 32768Hz?</title><link>https://devzone.nordicsemi.com/thread/349889?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 08:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515cc992-f299-4c82-af1a-f73633819958</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This driver requires the use of multithreading, which enables certain kernel APIs. Could you try adding this to the mcuboot configuration?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MULTITHREADING=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>