<?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>change device name through spi</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100191/change-device-name-through-spi</link><description>hi 
 Working with Linux operating system I faced the problem not knowing how can the nrf52840 device name be changed via the SPI protocol and what frame format should be used? 
 I would appreciate if you help me with step by step guidance. 
 Many tha</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Jun 2023 08:18:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100191/change-device-name-through-spi" /><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/432214?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 08:18:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c53d459-52ea-415e-8cb3-049223eb4819</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;In short, I merged two examples of SPI and Template.&lt;br /&gt;After making the necessary changes, I replaced the &amp;quot;m_rx_buf&amp;quot; instead of device name in the &amp;quot;gap_params_init&amp;quot; advertising configuration.&lt;br /&gt;But the reason that the custom board did not send/receive data, I am not sure about this problem, maybe it is the simultaneous connection of the J-link programmer and the back up battery. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/431766?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 12:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffb7753d-9369-4f34-af19-9b837dee82a4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Nasim,&lt;/p&gt;
&lt;p&gt;I am glad to hear! If it is not too much of a problem, I am curious to know what the problem turned out to be. It would also help knowing these common pit falls, to be able to help other users quicker in the future.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/431648?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 05:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d2f1773-1d00-47cb-9816-81dd64766067</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;Hello Edvin&lt;/p&gt;
&lt;p&gt;I succeeded to get the data from the slave on the custom board.&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Nasim&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/431171?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 08:37:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e122f87-d540-461c-9b7c-7a916aa82d8f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That is not a Nordic nRF52840 DK.&lt;/p&gt;
&lt;p&gt;So when testing on the DK, did you modify the solder bridges like described in my previous reply?&lt;/p&gt;
&lt;p&gt;And do you connect MOSI -&amp;gt; MOSI and MISO -&amp;gt; MISO in your SPI connection? And CS/SS -&amp;gt; CS/SS and CLK -&amp;gt; CLK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/431001?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 11:55:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6df6a075-fdd7-4795-b2a6-ad200190bde7</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;These examples were tested with changed pins on both the DK and the custom board and both have the same problem.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The photo below is taken of the SPI pins (&lt;span&gt;cs:P0.24,&lt;/span&gt;&lt;span&gt;CLK:P0.15,&lt;/span&gt;&lt;span&gt;mosi:P0.17,&lt;/span&gt;&lt;span&gt;miso:P0.22)&amp;nbsp;&lt;/span&gt;on the DK :&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1686811908733v2.jpeg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430997?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 11:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:916fe86d-11d5-4266-bb1f-4b550d6022fa</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is this actually running on a custom board, or on the DK?&lt;/p&gt;
&lt;p&gt;If it is on the DK, the reason it doesn&amp;#39;t work is that the pins P0.17 and P0.22 are not routed out to the GPIO headers by default. If you look on the back of the DK, it shows you some of the pins and their use. e.g. pin P0.13-P0.16 are used for the LEDs (but they are routed out, so that is OK, as long as the application are not trying to control those GPIOs by toggling LEDs at the same time as you are trying to use them as SPI pins).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, P0.17 and P0.22 are used as QSPI pins for the external flash chip on the DK, so these are not connected to the GPIO headers. You can see on the back of the DK what solder bridges you would have to cut and solder in order to do so. For these specifically, you would need to:&lt;/p&gt;
&lt;p&gt;P0.17: cut SB17, solder SB23&lt;/p&gt;
&lt;p&gt;P0.22: cut SB15, solder SB25&lt;/p&gt;
&lt;p&gt;Alternatively, test with different GPIOs, if you want to do it on the DK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430993?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 11:40:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2109134f-b1ad-4307-a033-a40433adf3b1</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;I have no problem with the default pins on the DK boards and data is sent / received correctly. The problem is when the pins numbers change to:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;cs:P0.24(AD20)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CLK:P0.15(AD10)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;mosi:P0.17(AD12)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;miso:P0.22(AD18)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;in sdk_config.h&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Sorry, I am a beginner. I tried to send a photo on this page, but I failed to send it.&lt;/p&gt;
&lt;p&gt;I can get &amp;quot;&amp;lt;info&amp;gt; app: Transfer completed. Received: &amp;yuml;&amp;yuml;&amp;yuml;&amp;yuml;&amp;yuml;&amp;yuml;&amp;yuml; &amp;quot; from slave and &amp;quot; &amp;lt;info&amp;gt; app: Transfer completed &amp;quot;from master with spi usb to uart by terminal&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430950?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 10:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a56258-4fbe-4066-967b-340ab44c77e2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If you take the unmodified spi&amp;amp;spis samples on two nRF DK boards (if you are not sure whether they are unmodified or not, download and unzip the &lt;a href="https://www.nordicsemi.com/Products/Development-software/nRF5-SDK/Download#infotabs"&gt;SDK&lt;/a&gt; again).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then let me know what pins you connected between the DKs. If possible, take a photo, and upload it here. Can you also show me the logs that you are seeing on both devices?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430718?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 11:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1034268a-9792-4822-a113-129cc5142dff</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;In the target application, Linux and NRF will behave as master and slave depending on the type of request, but to test the performance of a part of the application, currently Linux is used as Master and NRF as Slave.&lt;br /&gt;When I change the pins defined in the example (spi&amp;amp;spis) to custom board pins, data is not sent/received.&lt;br /&gt;I uploaded the samples (spi&amp;amp;spis) on two NRF DK boards by changing the pins I mentioned earlier, but still no data is being exchanged.&lt;br /&gt; I also repeated this with the NRF DK board as a slave and the STM 32 as a master, but I could not send/receive data.&lt;/p&gt;
&lt;p&gt;Master DK and Slave DK are connected by wire without any element between them&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know w&lt;span&gt;hat is the SPI speed but &amp;nbsp;I didn&amp;#39;t change the speed in the SPI example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;spis_config.mode = NRF_SPIS_MODE added to SPIS example in main.c and tested 0-3 but the problem still persists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430637?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 07:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:729857f7-8ddb-4526-9c65-419d1f008797</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So your linux machine is running an SPI master? How did you connect the pins? What is the SPI speed that the SPI master is using?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please test all the SPI modes,&amp;nbsp;NRF_SPIS_MODE_0 to&amp;nbsp;NRF_SPIS_MODE_3.&lt;/p&gt;
&lt;p&gt;You can set it like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    spis_config.csn_pin               = APP_SPIS_CS_PIN;
    spis_config.miso_pin              = APP_SPIS_MISO_PIN;
    spis_config.mosi_pin              = APP_SPIS_MOSI_PIN;
    spis_config.sck_pin               = APP_SPIS_SCK_PIN;
    spis_config.mode                  = NRF_SPIS_MODE_0

    APP_ERROR_CHECK(nrf_drv_spis_init(&amp;amp;spis, &amp;amp;spis_config, spis_event_handler));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, can you please try to capture a logic trace of the SPI wires?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430624?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 07:18:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22175a2c-09ba-45ef-8179-df41a3feadad</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;nRF5_SDK_15.2.0_9412b96\examples\peripheral\spis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430621?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 07:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f22d989-92fc-4e79-83a9-57f8af3d31f1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What example have you been testing?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430448?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2023 11:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c91f3f9b-8ab9-4c7f-b532-0a081de0a678</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;Hi Edvin&lt;br /&gt;Thank you for your guidance&lt;br /&gt;I use the nRF5 SDK.&lt;/p&gt;
&lt;p&gt;I got the&amp;nbsp;SPI&amp;nbsp;communication with the DK board, but considering that I want to set it on the custom board, when I change the pins on the &amp;quot;sdk_config.h&amp;quot;&amp;nbsp; to the&lt;br /&gt; cs:P0.24(AD20)&lt;br /&gt;CLK:P0.15(AD10)&lt;br /&gt;mosi:P0.17(AD12)&lt;br /&gt;miso:P0.22(AD18)&lt;br /&gt;,the data won&amp;#39;t be sent and received, and the spi won&amp;#39;t work properly.&amp;nbsp; What parts of the SPI example need to be changed to set the SPI pins ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/430182?ContentTypeID=1</link><pubDate>Fri, 09 Jun 2023 10:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6824e38b-8a53-4433-9d0d-1f08e75b1cd0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, let me split your request into 2 parts:&lt;/p&gt;
&lt;p&gt;1: How do I change the advertising name during runtime?&lt;/p&gt;
&lt;p&gt;2: How do I set up SPI?&lt;/p&gt;
&lt;p&gt;3:&amp;nbsp; (Bonus) How does SPI work on my custom board with Linux OS using SPI?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;First of all, what SDK are you using for the nRF? Do you use the nRF5 SDK, or do you use nRF Connect SDK (NCS)?&lt;/p&gt;
&lt;p&gt;1: Depending on the SDK that you are using, you should look at how the advertising name is usually set up. Look in the file that defines the bt_le_adv_start() in adv.c (if you are using NCS), or&amp;nbsp;ble_advertising_init() in ble_advertising.c (if you are using the nRF5 SDK). Then look for a function that is used to update the advertising data. In NCS it would be called&amp;nbsp;bt_le_adv_update_data(), while in the nRF5 SDK it would be&amp;nbsp;ble_advertising_advdata_update().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2: Depends on the SDK again. In the nRF5 SDK, please look at the SDK\examples\peripheral\spi (or spis, if you are the SPI slave). In NCS, I can recommend this tutorial:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lesson 6 shows you how to set up I2C, but the method to use SPI is quite similar.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3: I don&amp;#39;t know. You would need to ask this in some sort of Linux forum, or find someone who can help you with whatever is present on your core board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/429556?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2023 12:49:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17c62bb9-1a9b-451e-820f-27ba76078670</guid><dc:creator>NRM</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;&lt;span&gt;Yes nrf52840 connected to a core board with linux&amp;nbsp;operation system using SPI . How can I merge advertise and SPI(master and slave) communications examples into one code so that the string that nrf receives as a slave will sit instead of the device name ?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;#define DEVICE_NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;Nordic&amp;quot;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;On the other hand, the main issue is what should be the spi frame format for Linux?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change device name through spi</title><link>https://devzone.nordicsemi.com/thread/428353?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 08:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:967d6a07-df6d-4aae-b616-20017aabc2e9</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am not sure what you are asking. What name do you want to change? Is the nRF52840 connected to your linux computer using SPI?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>