<?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>nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71204/nrf5280-re-config-tracedata-pin-as-general-gpio-for-pulse-generation</link><description>hello Nordic 
 
 i am using nrf52840, sdk 16.0, working base on the peripheral app_ble_blinky example 
 
 i wish to use the p0_11 pin for pulse generation (not pwm), but when i try to config that pin as nrf_drv_gpiote_out_init(), i get err_code = 8 (NRF_ERROR_INVALID_STATE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Feb 2021 13:05:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71204/nrf5280-re-config-tracedata-pin-as-general-gpio-for-pulse-generation" /><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/293555?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 13:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb44c227-a8b2-47bf-9702-e22e663c615a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
&lt;p&gt;The GPIOTE module must be initialized first with nrf_drv_gpiote_init() before you can assign the pin with nrfx_gpiote_out_init(). Have you done that?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/293358?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 13:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5ccfee4-4cfd-4958-91e1-c662bbc0b751</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Vidar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;unfortunately my problems did not finish with this pin&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i had in my code the &amp;quot;button_init()&amp;quot; function left from the &amp;#39;app_ble_blinky&amp;#39; example, when i comment it then for some reason when trying to config that pin (p0_11) i get an error &amp;#39;NRFX_ERROR_INVALID_STATE&amp;#39; here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfx_err_t nrfx_gpiote_out_init(nrfx_gpiote_pin_t                pin,
                                nrfx_gpiote_out_config_t const * p_config)
{
    NRFX_ASSERT(pin &amp;lt; NUMBER_OF_PINS);
    NRFX_ASSERT(m_cb.state == NRFX_DRV_STATE_INITIALIZED);
    NRFX_ASSERT(p_config);

    nrfx_err_t err_code = NRFX_SUCCESS;

    if (pin_in_use(pin))
    {
        err_code = NRFX_ERROR_INVALID_STATE;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;my pin configuration looks like that:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; // init pin task for ppi use:
    nrf_drv_gpiote_out_config_t pin_toggle_config = GPIOTE_CONFIG_OUT_TASK_TOGGLE(false);
    err_code = nrf_drv_gpiote_out_init(HYDRATION_FREQ_OUTPUT_PIN, &amp;amp;pin_toggle_config);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;any idea what i am doing wrong ?&lt;/p&gt;
&lt;p&gt;in the &amp;quot;custom_board.h&amp;quot; file i commented all the build in defines with that pin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read from you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292822?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 07:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca7babb-da85-440d-9f53-06ffe4b7e776</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s perfectly ok to change board file as well. I don&amp;#39;t see any problem with it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292815?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 07:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a14ef791-2235-4132-839d-44891761a603</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Vidar&lt;/p&gt;
&lt;p&gt;well i actually solved it differently eventually, changed the boards.h file like so:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;elif defined (BOARD_D52DK1)
  #include &amp;quot;d52_starterkit.h&amp;quot;
#elif defined (BOARD_ARDUINO_PRIMO)
  #include &amp;quot;arduino_primo.h&amp;quot;
#elif defined (CUSTOM_BOARD_INC)
  #include STRINGIFY(CUSTOM_BOARD_INC.h)
#elif defined(REDENT_NOVA_BOARD)
  #include &amp;quot;bl652_sa_01.h&amp;quot;
#elif defined(AUDIO_STICKER_BOARD)
  #include &amp;quot;audio_sticker.h&amp;quot;
#else
#error &amp;quot;Board is not defined&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;if you think it might cause some problems please inform&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292811?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 07:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:764278bf-6cfb-42cb-a727-870750394465</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
&lt;p&gt;You can just change the LEDBUTTON_BUTTON assigment in main.c to a different button.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292765?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 19:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0a24e38-e285-42c3-a511-ba5864544678</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Vidar&lt;/p&gt;
&lt;p&gt;the problem is that if i change setting in the pca10056.h file then it will be changed for all other projects using that board, same if i add another custom board since i allready have one&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#elif defined(BOARD_CUSTOM)
  #include &amp;quot;bl652_sa_01.h&amp;quot;
  #include &amp;quot;audio_sticker.h&amp;quot;
#else
#error &amp;quot;Board is not defined&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;i have 2 includes there&lt;/p&gt;
&lt;p&gt;is there a way to corelate a specific board.h for each project ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read from you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292604?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 07:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b3d3e7-61c9-4ce0-8a8e-8c004ecd12d9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
&lt;p&gt;Yes, this error will be returned regardles of whether you are in debug mode or not. To fix this, you either need to change the pin assignment for button 1 to a different pin, or select another GPIO for your output.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/priyeshn"&gt;PriyeshN&lt;/a&gt;, please post your question in a new thread. The problem you are describing appears to be unrelated to the problem OP had.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292543?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 16:01:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd809054-76f6-4cf6-942f-9ccd324a8a01</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi Vidar&lt;/p&gt;
&lt;p&gt;so if i understand you correct the error i am getting has nothing to do with debug mode and will actually accrue also on running ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292524?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 15:07:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c33e17cc-4434-4ab8-ab00-6b7363c2c4bb</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not using default board configuration and have my own custom board configuration. I&amp;#39;m also initializing the pin using&amp;nbsp;&lt;em&gt;&lt;strong&gt;nrf_gpio_cfg_output()&lt;/strong&gt;&lt;/em&gt; as I&amp;#39;m not using events on that line. and this function does not return anything.&lt;/p&gt;
&lt;p&gt;For further elaboration, I&amp;#39;m not getting any error while initializing the pin. Things go weird when I set the line to HIGH and if TRACE is not used, I don&amp;#39;t see any reason for my code to jump to unknown location in memory and stuck there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any thoughts you can share which can help me solve this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292482?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:134474cb-9dd4-482f-b5dd-14c3d0d7cd7a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;nrf_drv_gpiote_out_init() will return the invalid state error if you try to initialize a pin that has already been assigned, and P0.11 will be assigned as BUTTON_1/BSP_BUTTON_0 if you are using the default board configuration (See &amp;quot;&lt;span&gt;&lt;a title="Using the SDK with other boards" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/sdk_for_custom_boards.html?cp=7_1_1_5"&gt;Using the SDK with other boards&amp;quot;&lt;/a&gt;&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5280 re-config TRACEDATA pin as general gpio for pulse generation</title><link>https://devzone.nordicsemi.com/thread/292454?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 11:41:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bc86c9e-dfad-423e-82e5-7bc27a48aad5</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;I&amp;#39;m also looking an answer for this. I&amp;#39;m currently using custom board with JLink as my debugger and I&amp;#39;m setting P0.11 line for enabling a voltage booster. As soon as I enable, I see the debugging stalls, RTT prints are stopped and code reaches some undefined location.&lt;/p&gt;
&lt;p&gt;Is there a way I can turn off TRACEDATA functionality so that I can use the line as plain GPIO. If yes, will that impact my debugging and RTT logging?&lt;/p&gt;
&lt;p&gt;Setup - nrf52840, JLink, SDK v17 (latest), SES IDE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>