<?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>ESB &amp;quot;Hiccup&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86224/esb-hiccup</link><description>I am currently working on a project in which I want to transmit audio wirelessly from one nRF chip to another. Currently I am using the nRF Dongle to act as the transmitter and a nRF-DK board as the receiver. I have finally gotten them to talk to each</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Apr 2022 08:30:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86224/esb-hiccup" /><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/364862?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 08:30:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:714307bd-3439-4ad7-8927-442ed0e16046</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the slow response, I have been out of office for the last couple of weeks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to check if the noise is caused by the ADC itself you could try to enable oversampling, and see if the noise is reduced?&lt;/p&gt;
&lt;p&gt;Theoretically every doubling of the oversampling (corresponding to increasing the oversampling setting by 1) should reduce the ADC noise by half a LSB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can change the oversampling setting through the&amp;nbsp;NRFX_SAADC_CONFIG_OVERSAMPLE parameter in sdk_config.h. Try a value of 4 for instance, and you should see a reduction of noise of about 2 LSB compared to an oversample setting of 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/362735?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 05:45:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1c7d73f-67ec-48a7-90f0-b766d4bbdb89</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;So the noise is not being injected at the input, as this is also happening with a function generated wave going through the ADC. I can post the ADC config here however, to see if there is something I can change in that.&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;void saadc_init(void)
{
    ret_code_t err_code;
    nrf_saadc_channel_config_t channel_config =
        NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);

    err_code = nrf_drv_saadc_init(NULL, saadc_callback);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_config);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);

}

void saadc_sampling_event_init(void)
{
    ret_code_t err_code;

    err_code = nrf_drv_ppi_init();
    APP_ERROR_CHECK(err_code);

    nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    timer_cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;
    err_code = nrf_drv_timer_init(&amp;amp;m_timer, &amp;amp;timer_cfg, timer_handler);
    APP_ERROR_CHECK(err_code);

    /* setup m_timer for compare event every 20us */
    uint32_t ticks = nrf_drv_timer_us_to_ticks(&amp;amp;m_timer, 40);
    nrf_drv_timer_extended_compare(&amp;amp;m_timer,
                                   NRF_TIMER_CC_CHANNEL0,
                                   ticks,
                                   NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK,
                                   false);
    nrf_drv_timer_enable(&amp;amp;m_timer);

    uint32_t timer_compare_event_addr = nrf_drv_timer_compare_event_address_get(&amp;amp;m_timer,
                                                                                NRF_TIMER_CC_CHANNEL0);
    uint32_t saadc_sample_task_addr   = nrf_drv_saadc_sample_task_get();

    /* setup ppi channel so that timer compare event is triggering sample task in SAADC */
    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;m_ppi_channel);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_ppi_channel_assign(m_ppi_channel,
                                          timer_compare_event_addr,
                                          saadc_sample_task_addr);
    APP_ERROR_CHECK(err_code);
}

void saadc_sampling_event_enable(void)
{
    ret_code_t err_code = nrf_drv_ppi_channel_enable(m_ppi_channel);

    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/362569?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 11:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c533ff-d396-4949-8f1d-301ee2930ba0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I assume you have tested that this noise has nothing to do with the radio transmission, and is actually present on the sampled signal before it is transmitted over the air?&lt;/p&gt;
&lt;p&gt;Have you tried to measure the analog signal with an oscilloscope to see if the noise is present on the input, or if it is somehow added by the sampling process itself?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are various external and internal factors that could affect noise on the input. Since this is more of a hardware question I would recommend opening a new ticket, explain the problem, and include the schematic design of your board so we can check if it looks good.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The complete ADC configuration could also be helpful. One way to check if the noise is caused by the ADC itself is to enable oversampling on the ADC, and see if the noise is reduced.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/362467?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 00:37:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f836d4-9c3e-4ed8-9e48-ce4face95ea5</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;I ended up fixing the speed issue (it was slowed down due to logging, so taking all unnecessary code out drastically improved the output waveform), but now we are faced with noise on the output. While I can hear the tone that is being transmitted, there is underlying noise that seems to get even worse when I connect ground to the ADC of the transmitter side (ideally no sound at all). I currently have the ADC resolution set to 14 bit and I am removing the bottom 4 bits in order to combat ADC noise. Is there anything else that you think could be causing the problem or that I should look into?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/361775?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 09:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42c49a47-08aa-4367-9e95-2d2106e30071</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It sounds odd that more than 3Hz would be a problem, if you are sampling at 1000Hz.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you checked on the receiving end that you are getting all the samples?&amp;nbsp;&lt;br /&gt;If you count the samples over time you can check if you receive the expected 1000 samples pr second.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you doing any buffering on the receiving side to handle any inconsistency in timing or minor delays that could happen over the wireless link?&lt;/p&gt;
&lt;p&gt;Also, is the DAC set up to play a 1000 Hz samplerate signal properly?&amp;nbsp;&lt;br /&gt;If the output appears digitized it could just be that the appropriate filtering is not applied, to remove any frequency components above 500 Hz (half the sampling frequency, as per the Nyquist theorem).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/361621?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 19:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bc0a0cd-07d4-4ead-8608-8eee5c301b8e</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;I actually got the transmission to work properly! I am inputting a full swing sine wave (1.65 V DC offset with a 1.65 V amplitude) on the transmitter side and receiving it on the other end (again sending the data through SPI to an external DAC). The new problem I am experiencing is not the repeated interruptions, but the speed of the output wave. Once the input wave goes past around 3 Hz, it appears very digitized on the output. Right now my ADC is sampling every millisecond. If you have any suggestions that would be appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/361465?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 10:26:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4d68863-fff1-402f-ae71-635f63f16be4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The project files alone doesn&amp;#39;t help me much, I would also need the&amp;nbsp;source files (main.c for instance).&amp;nbsp;Could you include this as well?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/361123?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 04:08:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:047718c7-dcd7-4a57-b507-93fef3e74724</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;That is very appreciated thank you so much!&lt;br /&gt;&lt;br /&gt;I am using version 17.1.0 of the SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the zipped project file:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4174.ses.zip"&gt;devzone.nordicsemi.com/.../4174.ses.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/360932?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 07:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba4e169c-0349-4887-80e3-08fcb9795d09</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any chance you could send me your code so I can have a look at it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you do please just zip the project folder, including project and source files (you might want to remove temporary build files though).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then I can take a look at it here and try to figure out why logging isn&amp;#39;t working, and also if I can spot any other issues that could affect reliability.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to share your code in a public case just let me know, and I will make the case private.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would also need to know which SDK version you are using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/360630?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 00:28:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ddfbd3f-6cfd-42ba-ab20-41eedbbaa7a4</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;I have not been able to get logging functioning on the RX side. Even when I have enabled logging in the config file for both UART as well as RTT. Is there something else I need to enable?&lt;/p&gt;
&lt;p&gt;I will try the counter approach and update with any findings.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/360231?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 10:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e060d1d8-b147-4e8a-8b81-8de5f6257685</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Getting logging working through USB on the nRF52840 dongle is possible, but it is not straight forward unfortunately, and it is not natively supported in the SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jimmy Wong wrote a blog about this a while ago:&amp;nbsp;&lt;br /&gt;&lt;a href="https://jimmywongiot.com/2019/10/25/how-to-use-the-nrf52840-dongle-pca10059-as-development-board/"&gt;https://jimmywongiot.com/2019/10/25/how-to-use-the-nrf52840-dongle-pca10059-as-development-board/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could try following that blog, but be aware that the software examples he uses are quite old at this point (made for v15 of the SDK).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It would be easier if you have a J-Link programmer or an nRF52840DK available, but this requires additional hardware that you might not have access to.&lt;/p&gt;
&lt;p&gt;A third option is to output UART logging on one of the available pins on the dongle, and connect it to some kind of serial to USB converter, but in this case you need to ensure that the voltages are compatible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What about logging on the RX side?&amp;nbsp;&lt;br /&gt;Have you not been able to get this working either?&lt;br /&gt;For the DK&amp;#39;s there are several options for handling logging, such as RTT or UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding the sample sine wave, could you try to send a simple counter value instead?&lt;br /&gt;This should look like a sawtooth if you analyze it like an audio sample, and might be a more intuitive way to figure out what is happening with the signal.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/360078?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 16:06:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e24bc890-845c-4697-a80e-2dfd11d8f74a</guid><dc:creator>gSook</dc:creator><description>&lt;p&gt;Thank you for your quick response!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried to initialize the logger, but for some reason, I cannot seem to get it working on this project (only in other project files). I have tried adding a sample counter to the payload, but since I cannot print it out to the log, I cannot see the sample number in real time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the transmitter, is it possible to use the log even though it is just the nRF Dongle? I figured I would only be able to use it on the DK board for the reception side.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the reception side, currently the SPI interrupt priority is at 0, and the ESB is at default, so I will go ahead and change that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB "Hiccup"</title><link>https://devzone.nordicsemi.com/thread/359966?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 10:17:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da1ec410-2c77-4aae-bc48-2440f8493bf6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As a general rule I would suggest using longer packets, and a higher number of retransmits, to ensure more efficient and reliable communication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Still, if you are only sending a packet every 50ms, and experiencing&amp;nbsp;regular repeated interruptions, then it points to a more critical issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you logging the ESB callbacks on the TX side to see if you are receiving TX failed interrupts or not?&lt;/p&gt;
&lt;p&gt;Do you have any interrupts in the system running at the highest priority, other than the ESB library?&lt;br /&gt;The ESB library is not designed to allow other interrupt at priority 0, and unfortunately this is the default priority if you don&amp;#39;t change it to something else.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to add a sequence counter to the ESB payload?&amp;nbsp;&lt;br /&gt;This could be as simple as an 8-bit counter that you increment for every packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then it is very easy to spot reception issues on the RX side, such as dropped or repeated packets.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>