<?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>Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18024/events-triggered-in-slave-while-not-paired</link><description>Hi Nordic, I come from this question: devzone.nordicsemi.com/.../ 
 So, my doubt is: what events are triggered in a slave channel while it is not communicating to a master? 
 I am having problems triggering EVENT_CHANNEL_CLOSED (the function sd_ant_channel_closed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Dec 2016 16:16:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18024/events-triggered-in-slave-while-not-paired" /><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69483?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 16:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb9ecd6b-c6d0-47a2-a7f6-ed16e7811658</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi Petter! Thanks a lot for your answer! During the weekend I did some hard debugging and I found out that the problem totally goes away if instead of using the data type ACKOWLEDGE, I use BROADCAST(and change EVENT_TX_COMPLETED and FAILED for EVENT_TX and RX). I am totally considering the possibility of using BROADCAST data type and do the ACK via software, which is not that hard.&lt;/p&gt;
&lt;p&gt;I will take a look to your solution and tell you if it works or not. Thanks again for the trouble! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69482?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 15:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce5a8a1c-51f4-44c8-bd8c-e5ecb5631ce5</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/angel_5F00_mod.rar"&gt;Here&lt;/a&gt; is your complete project, with my modifications. If LED3 and LED4 lit up, try to recompile the project with your toolchain, and check if LED3 and LED4 still are lit. If they are, we should look into your debug config.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69481?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 15:51:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e84ab6c-4a4c-4dc7-b5c8-580e56742014</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Now I&amp;#39;m actually suspecting it has something to do with your debug config, but I&amp;#39;m not sure. I revisited your project, and I noticed that after I get the EVENT_TRANSFER_TX_FAILED event, the device is reset. This is because sd_ant_acknowledge_message_tx() in ant_message_send() returns an error. I commented out ant_message_send() from the EVENT_TRANSFER_TX_FAILED case. Instead I&amp;#39;m setting LED3, and I&amp;#39;m setting LED4 if the EVENT_RX_SEARCH_TIMEOUT is received.&lt;/p&gt;
&lt;p&gt;Could you try to flash &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/s210_5F00_nrf51422_5F00_5.0.0_5F00_softdevice.hex"&gt;this&lt;/a&gt; SoftDevice and &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1667.nrf51422_5F00_xxac.hex"&gt;this&lt;/a&gt; application hex? Does LED3 and LED4 lit up?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69484?ContentTypeID=1</link><pubDate>Sun, 04 Dec 2016 10:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d92eb196-9e10-41d5-a449-36cd7ac73a6d</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Here is my package versioning: &lt;a href="http://imgur.com/bEZZSfS"&gt;http://imgur.com/bEZZSfS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is exactly the one you meant.. As a solution, do you think that it would help if I went from windows Keil to linux, gcc? Or maybe IAR? I guess that debugging in gcc is not as direct and easy as with Keil, but if it removes the problem....&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69480?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 11:38:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fa10cd0-f968-4e38-8036-b684de6ac46b</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Yep, I am running that, arm5_no_packs. I will check those numbers later, dont have acces now to the system.&lt;/p&gt;
&lt;p&gt;No no, they return 0x00000, NRF_SUCCESS. The thing is that if I change the timeout time, to, say, 2,5 seconds for search_timeout_set and 2,5 seconds to low_priority_rx_search_timeout_set, the time that the microprocessor lasts in reset itself is 5 seconds, that is exactly when the event RX_SEARCH_TIMEOUT should have been triggered. If I change these numbers to, say. 10 seconds, the time until it goes to reset again is 10 seconds.... So weird that it only happens in my machine...&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69479?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 11:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b276b540-e0af-4b48-b488-8de05744bee6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Are you running arm5_no_packs? If not use the project in \examples\ant\ant_broadcast\broadcast_tx\pca10028\arm5_no_packs If you open Select Software Packs, what are selected, it should be ARM::CMSIS 4.5.0 and nRF_DeviceFamilyPack 8.2.0. If not open Pack Installer and click the green arrows to check for update.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why your memory settings are reset, but you are setting them correctly. In my project MicroLIB is also checked, but that shouldn&amp;#39;t matter.&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t quite understand your last edit, are sd_ant_channel_rx_search_timeout_set() or sd_ant_channel_low_priority_rx_search_timeout_set() returning any error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69478?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2016 16:40:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:317ec931-3769-4340-80ac-e752bce18aef</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;I reinstalled the whole toolchain again and tried with that zip you told me: nRF51_SDK_10.0.0_dc26b5e.zip&lt;/p&gt;
&lt;p&gt;But still, the behaviour is the same :(. I&amp;#39;ll write the steps I do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reinstall Keil. I uninstall everything and remove all the files.&lt;/li&gt;
&lt;li&gt;I run the example inside the folder examples/ant/ant_broadcast/broadcast_tx&lt;/li&gt;
&lt;li&gt;Keil starts updating automatically, and downloads everything from his server, even the nordic components. This steps worries me, maybe the files keil downloads are not the correct ones? I didn&amp;#39;t have to run nRF5x_MDK_8_2_0_Keil4.msi to get everything to compile.&lt;/li&gt;
&lt;li&gt;Start compiling and debugging. Everything is the same as before, no EVENTS.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It&amp;#39;s frustrating being stuck because of this :(&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;Finally I get some difference in my toolchain now. What I did: I reinstalled Keil, Installed nRF5x_MDK_8_2_0_Keil4.msi and then let Keil update itself.&lt;/p&gt;
&lt;p&gt;To test if this changes something, I tried to upload my code this time but I am getting the typical Error: Flash Download failed - &amp;quot;Cortex-M0&amp;quot; . Softdevice and Application are overlapping apparently. I have this settings: &lt;a href="http://imgur.com/a/aH9pX"&gt;http://imgur.com/a/aH9pX&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;EDIT2: Just changed this parameters to IROM1: 0xD000 0x33000, IRAM1: 0x20000900 0x7700 and managed to upload. Now, I just realised that I actually am in a kind of reset loop. When the event EVENT_RX_SEARCH_TIMEOUT, because when I change the values of  &lt;strong&gt;sd_ant_channel_rx_search_timeout_set&lt;/strong&gt; and &lt;strong&gt;sd_ant_channel_low_priority_rx_search_timeout_set&lt;/strong&gt;, the time to go to reset changes as well. Any idea?&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69477?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2016 12:13:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cd65376-8701-4aa2-b6c8-68dfd6e36d5f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Ok. Good.&lt;/p&gt;
&lt;p&gt;Strange. It seems that you are using packs? Can you try to download the zip from &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v10.x.x/"&gt;here&lt;/a&gt; instead, and see if that  changes anything?&lt;/p&gt;
&lt;p&gt;Yes, I&amp;#39;m testing with your broadcast_tx, and they trigger.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69476?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 17:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21c8dd41-7ea5-4cee-bd75-24324373bcb0</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi again Petter!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I check with the debugging tool, putting one breakpoint, only one. When I reach that breakpoint, I remove it and put it somewhere else, and reset the system to check again.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To make sure I am not in a restart loop, after (and only after) starting my program I put a breakpoint in the beginning of the main(), making sure I don&amp;#39;t go through that place again.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If I put a breakpoint there I always reach it, err_code = 0x000000.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I can&amp;#39;t find app_error_fault_handler(). I put it in line 160 of arm_startup_nrf51.s
(HardFault_Handler&lt;br /&gt;
PROC
EXPORT  HardFault_Handler         [WEAK]
B       .)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I am using nrf51 DK. Laser markings: N51422QFACA11517AP (hopefully, maybe one changes, too small)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I think I have a corrupt toolchain. After yesterday&amp;#39;s trial of complete reinstallation it is giving some weird problems. Can you please tell me what version of everything you are using? And how to make a completely clean reinstallation of the whole toolchain. I tried to remove everything but keil was not completely uninstalled.&lt;/p&gt;
&lt;p&gt;PS: So, just to make sure, you are running the example I gave you under the name broadcast_tx (SLAVE in my case) and are getting these events to trigger? :(&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69475?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 13:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:891a10cb-29d6-4708-a8ca-d00a52067ad0</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes :) I don&amp;#39;t know why you are not getting them. How are you checking? Debug and breakpoint? Are you sure you are not caught in a restart loop for some reason? If you put a breakpoint on line 489 in main.c are you hitting it? If you put a breakpoint in app_error_fault_handler() do you hit it? What hardware are you running on? nRF51 DK? Custom board? What are the complete laser markings on the chip?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69474?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 13:00:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5f12d49-29c2-4c83-8dde-03cc224f74a6</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;You are really getting EVENT_TRANSFER_TX_FAILED and EVENT_RX_SEARCH_TIMEOUT? I am not getting it when there is no master... This would solve everything for me, any idea about why I am not getting it? I am positive I have changed the toolchain to SDK V10.0, and yesterday I even tried to remove the whole toolchain and reinstalling it again, but the behaviour was the same...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69473?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 12:47:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bed7e12c-a07c-4819-a3e8-845ef3c02b9e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I just tested your project, seems to be working as expected. When no master is present the EVENT_TRANSFER_TX_FAILED event is triggered, and then the EVENT_RX_SEARCH_TIMEOUT event is triggered. As long as there is no master the EVENT_TRANSFER_TX_COMPLETED event will never be received, so sd_ant_channel_close() will never be called, and the EVENT_CHANNEL_CLOSED event will never be received.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69472?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 16:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:215e267e-3636-448f-b743-c5dc5676da37</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi Petter,&lt;/p&gt;
&lt;p&gt;Here you have the project. The main problems occur in the broadcast_tx folder (this is a debugging project, not finished at all).&lt;/p&gt;
&lt;p&gt;I know that the code is right now not intuitive at all, I had to do this weird chain of interrupts and flags to make it work without going to hardfault every time.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/open?id=0B-MOEY_lcpL5QjlKMDBFZWh2am8"&gt;drive.google.com/open&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Events triggered in slave while not paired</title><link>https://devzone.nordicsemi.com/thread/69471?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 11:53:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7ec0565-f0ab-4763-b138-7f89e28d6db5</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Could you edit your question and attach your complete project so I can test it here? Are you using SDK 10 now?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>