<?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>How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50325/how-do-i-make-a-bsp-file-for-nrf52832-breakout</link><description>Hi Everyone! 
 I really need some help. So I&amp;#39;m new to Nordic semiconductors and Segger Embedded Studio IDE. I purchased myself an nRF52832 breakout from sparksfun and nRF52832 DK and I have downloaded Segger Embedded Studio IDE for the programming purpose</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Jul 2019 05:20:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50325/how-do-i-make-a-bsp-file-for-nrf52832-breakout" /><item><title>RE: How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/thread/201390?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 05:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce44847d-ebf9-4151-b7e0-ecfc4b4fd73f</guid><dc:creator>christine_dev</dc:creator><description>&lt;p&gt;Thank You very much for your help!&lt;/p&gt;
&lt;p&gt;I really like your products! A lot to learn though! But you get a lot of experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/thread/201277?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 13:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10ee60f0-ea30-4c62-ac2a-190f0a917263</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="christine_dev"]is it necessary for me to create a new BSP&amp;nbsp; for the nrf52832 breakout board from Sparkfun (which is coded via the nRF52 DK since it doesn&amp;#39;t have a built in programmer ) to communicate with the GPIO pins I&amp;#39;ll be using to assign external LEDS(# 3 Leds) and a Button?[/quote]
&lt;p&gt;No, it is not necessary. If you want to do it, you can. Then you just take an existing board file (e.g. pca10040.h) and adapt it to your needs, and add it to boards.h.&lt;/p&gt;
[quote user="christine_dev"]Cus I have only experience assigning the LEDS and Buttons via GPIO by PIN and PORT numbers at the beginning of the main.c file for MSP430 .[/quote]
&lt;p&gt;Then I suggest you continue to do it like that with the nRF5 SDK as well, by simply not using the BSP. The BSP is esnetially just a mapping of pins to button and LED numbers, with some additional functionality on top. Since you don&amp;#39;t want or need it, you can skip it.&lt;/p&gt;
[quote user="christine_dev"]1. Integration of LEDS and BUTTONS (Additionally assigned to the GPIO) to the&amp;nbsp; nrf52832 breakout board from Sparkfun[/quote]
&lt;p&gt;For LED&amp;#39;s, you can simply configure the spesific GPIO pins as outputs, and write to them using&amp;nbsp;nrf_gpio_cfg_output() and&amp;nbsp;nrf_gpio_pin_set()/nrf_gpio_pin_clear(). For buttons, you can do something similar, but you probably want it interrupt-driven. Then you can look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/pin_change_int_example.html?cp=5_1_4_6_18"&gt;pin change interrupt example&lt;/a&gt;, or possibly also the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_button.html?cp=5_1_3_7"&gt;button handling library &lt;/a&gt;(if you want debouncing handled for you).&lt;/p&gt;
[quote user="christine_dev"]2. Integration of the accelerometer LIS331HH via SPI (I have my reasons to choose SPI even though it can support I2C) with&amp;nbsp;the&amp;nbsp; nrf52832 breakout board from Sparkfun[/quote]
&lt;p&gt;Then you should refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30#concept_j35_hv2_wr"&gt;SPIM documentation in the PS&lt;/a&gt;, and the SPIM driver &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/hardware_driver_spi_master.html?cp=5_1_2_0_13"&gt;documentation&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/spi_master_example.html?cp=5_1_4_6_37"&gt;example&lt;/a&gt; in the SDK. This will show you how to operate the SPIM master so that you can interface with the SPI slave device (which happens to be a&amp;nbsp;LIS331HH).&lt;/p&gt;
[quote user="christine_dev"]3. Accessing interrupts of the accelerometer for my algo.. how do I interface that&amp;nbsp;[/quote]
&lt;p&gt;You will probably want to use a separate GPIO pin for receiving the interrupts and have that trigger an interrupt. The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/pin_change_int_example.html?cp=5_1_4_6_18"&gt;pin change interrupt example&lt;/a&gt;&amp;nbsp;demonstrates this.&lt;/p&gt;
[quote user="christine_dev"]4. Transfer&amp;nbsp; of data From the&amp;nbsp;nrf52832 breakout board from Sparkfun to a raspberrypi via BLE.[/quote]
&lt;p&gt;Please refer to the BLE examples. You can, for instance, start with the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_nus_eval.html?cp=5_1_4_2_2_24"&gt;NUS peripheral example&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/thread/201084?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 00:30:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0056625e-b811-4d23-a358-f40cd294121f</guid><dc:creator>christine_dev</dc:creator><description>&lt;p&gt;Is there anyone who can help me with this!!&lt;/p&gt;
&lt;p&gt;I want to learn this..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/thread/201062?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2019 17:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eef820ea-9c1a-4ece-bcb5-7b2989bc4db5</guid><dc:creator>christine_dev</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thank you for your response!&lt;/p&gt;
&lt;p&gt;So like you said I can neglect about the BSP part, is it necessary for me to create a new BSP&amp;nbsp; for the nrf52832 breakout board from Sparkfun (which is coded via the nRF52 DK since it doesn&amp;#39;t have a built in programmer ) to communicate with the GPIO pins I&amp;#39;ll be using to assign external LEDS(# 3 Leds) and a Button? Cus I have only experience assigning the LEDS and Buttons via GPIO by PIN and PORT numbers at the beginning of the main.c file for MSP430 . So is there any similar method to assign pins to the&amp;nbsp;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;nrf52832 breakout board from Sparkfun?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;This was what I was meaning in the second quote of your answer.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;and If I were to do the following tasks for my applications which exact example reference from the SDK will be useful for me to catch up fast. Can you please direct me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;1. Integration of LEDS and BUTTONS (Additionally assigned to the GPIO) to the&amp;nbsp; nrf52832 breakout board from Sparkfun&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;2. Integration of the accelerometer LIS331HH via SPI (I have my reasons to choose SPI even though it can support I2C) with&amp;nbsp;the&amp;nbsp; nrf52832 breakout board from Sparkfun&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;3. Accessing interrupts of the accelerometer for my algo.. how do I interface that&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;4. Transfer&amp;nbsp; of data From the&amp;nbsp;nrf52832 breakout board from Sparkfun to a raspberrypi via BLE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;I really like this board I want to catch up faster.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;ll be great if you answer this too&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank You!&lt;/p&gt;
&lt;p&gt;Please Help&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I make a BSP file for nRF52832 breakout?</title><link>https://devzone.nordicsemi.com/thread/200979?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2019 13:16:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee978b99-163a-4078-97e9-433442909e1f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]How do I understand these. Is there any tutorial for this to understand?[/quote]
&lt;p&gt;The SDK includes the BSP library since it makes it easier to support a lot of different boards with the same example applications. The main part is the board files, which specifies which pins are used for buttons and LED&amp;#39;s on the specific board. It also includes more advanced functionality, such as blinking LED&amp;#39;s in specific patterns to&amp;nbsp;signal different states. There is no need for using the BSP, so you can simply remove it from the example application that you are using. If the BSP confuses you, I suggest you simply do not use it (it is usually as simple as searching for anything BSP related in the example you are using and just removing it).&lt;/p&gt;
&lt;p&gt;However, if you want to use the BSP then you can look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_bsp.html?cp=5_1_3_6"&gt;BSP documentation&lt;/a&gt;, and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/sdk_for_custom_boards.html?cp=5_1_1_5_2#custom_board_support"&gt;Adding support for a custom board&lt;/a&gt;.&lt;/p&gt;
[quote user=""]..and I also realized there is s BSP file which is relevant for the DK, can someone tell me a way to intergrate the accelerometer.. do I need to create a separate BSP file if I were to program with the break out(of course the breakout doesn&amp;#39;t have a programmer and I can use the nRF52 DK programmer)?[/quote]
&lt;p&gt;The BSP is independent of the accelerometer. You just need to know which pins you have connected to the accelerometer and configure the TWI (I2C) or SPI driver accordingly (depending on which interface you want to use).&lt;/p&gt;
[quote user=""]how do I get it stated with SPI communication with the accelerometer? How do I build the configurations?[/quote]
&lt;p&gt;You need to use the API&amp;#39;s of the nRF5 SDK &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/hardware_driver_twi.html?cp=5_1_2_0_17"&gt;TWI&lt;/a&gt; or &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/hardware_driver_spi_master.html?cp=5_1_2_0_13"&gt;SPI&lt;/a&gt; driver to implement your own&amp;nbsp;LIS331HH driver based on its datasheet.&lt;/p&gt;
[quote user=""]and Once I program I want to see the acceleration on a display like serial monitor on Arduino.. are there any software to see this..?[/quote]
&lt;p&gt;I suggest you use the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_nrf_log.html?cp=5_1_3_26"&gt;logger module&lt;/a&gt;, which is used extensively in most SDK examples.&lt;/p&gt;
[quote user=""]I have an algorithm on how my application should work the techniques of getting the values from the accelerometer and decision making ect.. where should I write the algorithm files algo.c and algo.h .. should they be under main.c?[/quote]
&lt;p&gt;That is all up to you, and how you prefer to organize your code. However, I suggest you get the basics working first. That means:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Familiarize yourself with the chip and SDK&lt;/li&gt;
&lt;li&gt;Implement SPI communication with the sensor, and test that it works. You can refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/spi_master_example.html?cp=5_1_4_6_37"&gt;SPI Master Example&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Test basic SPI communication.&lt;/li&gt;
&lt;li&gt;Implement a driver for the sensor, or integrate and existing driver if you have or can find one.&lt;/li&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;li&gt;Then you can move on to implementing your algorithm etc.&lt;/li&gt;
&lt;/ol&gt;
[quote user=""]P.S : I went through your 7 videos on You Tube and those are the only start up tutorials available and those are the only availbale tutorials for this whole thing&amp;nbsp; and I don&amp;#39;t know exactly how to use the documentation API&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Flib_button.html&amp;amp;cp=5_1_3_7"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt; provided for this board.[/quote]
&lt;p&gt;I think the best way to learn is by learning by doing, so I suggest you test and modify examples. Then you will understand the documentation better, and it will be easier to move forward. There are also more text tutorials here on DevZone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>