<?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>ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82424/ant-hrm-interrupt-and-sdcard</link><description>Dear Members, I want to log my ANT+ HRM into SDcard, I tried with flag, but it never goes to main loop, I&amp;#39;m using nRF52840 Code ANT HRM interrupt : 
 
 
 on the main loop : 
 
 
 I&amp;#39;m using softdevice S340, how can I send a flag in softdevice, than the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Dec 2021 16:23:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82424/ant-hrm-interrupt-and-sdcard" /><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/343995?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 16:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fcf98c1-d4de-4c5a-93b3-7b316cffc103</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you put a breakpoint and single-step the code, the softdevice will likely assert once you continue execution.&lt;/p&gt;
&lt;p&gt;If you want to put breakpoints, you can look into &lt;a href="https://github.com/NordicPlayground/j-link-monitoring-mode-debugging"&gt;J-Link Monitor mode debugging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Looks like the note regarding ANT and flash writes is still valid, yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/342452?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 04:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63d87a46-3d14-4ae3-9f3d-6eca7d1baff8</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Can it be like this ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h1 class="name" id="mcetoc_1fmcv108d0"&gt;&lt;span style="font-size:75%;"&gt;SDK 17.1.0: is the &amp;quot;Need to close the ANT channel to make it safe to write to flash&amp;quot; warning still valid?&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81707/sdk-17-1-0-is-the-need-to-close-the-ant-channel-to-make-it-safe-to-write-to-flash-warning-still-valid/339086#339086"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/81707/sdk-17-1-0-is-the-need-to-close-the-ant-channel-to-make-it-safe-to-write-to-flash-warning-still-valid/339086#339086&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/342444?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 01:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:366b9760-90d0-45f9-afba-516c2ccfc452</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Hi Jorgen, thanks for the reply,&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what I&amp;#39;ve done for debugging ANT, 340 softdevice and nRF52840 :&lt;/p&gt;
&lt;p&gt;1.I put breakpoint at SDCARD_Flag=1 at&amp;nbsp; void page0_data_log function, ant_hrm_page0.c&lt;br /&gt;2.Run to cursor after SDCARD_flag=1;&lt;br /&gt;3.it goes to NRF_BREAKPOINT_COND: , Line 100 app_error_weak.c &lt;br /&gt;4.then it runs to line 104 &lt;br /&gt;&amp;nbsp;NRF_LOG_WARNING(&amp;quot;System reset&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_SystemReset();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;it never returns to main() loop..&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;How can I rectify this ? How can I halt interrupt for a while from ANT sensor, write to SDcard then turn the interrupt back on ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/342213?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 03:19:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4da40a4-2b9f-4872-9694-5ce03d56c23e</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Some screenshots :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2021_2D00_12_2D00_07-11_5F00_05_5F00_42_2D00_SDCard-Flag-_3D00_-1-V2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2021_2D00_12_2D00_07-11_5F00_04_5F00_29_2D00_SDCard-Flag-_3D00_-1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it stuck and made error somewhere here :&lt;/p&gt;
&lt;p&gt;E:\nRF5_SDK_17.0.2_d674dde\components\softdevice\common\nrf_sdh_ant.c Line 135 Stuck here...&lt;br /&gt;&amp;nbsp;for (nrf_section_iter_init(&amp;amp;iter, &amp;amp;sdh_ant_observers);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_section_iter_get(&amp;amp;iter) != NULL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_section_iter_next(&amp;amp;iter))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_sdh_ant_evt_observer_t * p_observer;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_sdh_ant_evt_handler_t&amp;nbsp;&amp;nbsp;&amp;nbsp; handler;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_observer = (nrf_sdh_ant_evt_observer_t *) nrf_section_iter_get(&amp;amp;iter);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler&amp;nbsp;&amp;nbsp;&amp;nbsp; = p_observer-&amp;gt;handler;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler(&amp;amp;ant_evt, p_observer-&amp;gt;p_context);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Debug screen :&lt;/p&gt;
&lt;p&gt;&lt;a title="Debug screen video" href="https://youtu.be/7JnfqF3uDEc" rel="noopener noreferrer" target="_blank"&gt;Debug screen video&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/342208?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 01:23:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27d024a3-6cd3-4dc8-acc3-2a551d34fe69</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Hi Jorgen, thanks for the reply&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s how the flag defined, in main : &lt;/p&gt;
&lt;p&gt;extern volatile uint8_t SDCARD_Flag; //SDCARD interrupt flag 1 Dec 21 Rixtronix LAB&lt;/p&gt;
&lt;p&gt;in ant_hrm_page_0_decode file :&lt;/p&gt;
&lt;p&gt;volatile uint8_t SDCARD_Flag; //SDCARD interrupt flag 6 Dec 21 Rixtronix LAB&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t put breakpoints yet,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not stuck, it keeps running on ant_hrm_page_0_decode(), never returns to main loop...and the Flag is updated,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any clues&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANT HRM interrupt and sdcard ?</title><link>https://devzone.nordicsemi.com/thread/342074?ContentTypeID=1</link><pubDate>Mon, 06 Dec 2021 13:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31c351cf-4024-45f9-b479-13836fe61020</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How is the flag defined?&lt;/p&gt;
&lt;p&gt;Have you verified if&amp;nbsp;ant_hrm_page_0_decode() is called and the flag being set (for instance through debugging/breakpoints)?&lt;/p&gt;
&lt;p&gt;Is your application stuck in some interrupt, preventing it from going back to the main-loop?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>