<?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 to use &amp;quot;nRF LED Matrix&amp;quot; sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85485/how-to-use-nrf-led-matrix-sample-and-library-from-zephyr-with-nrf-connect-sdk-1-9-1-and-ses-for-use-in-an-app-on-micro-bit-v2</link><description>Kind folks, 
 I have used the nRF Connect app on my MacBook Pro to (carefully!) install the new 1.9.1 SDK and the Nordic version of the SEGGER Embedded Studio. Using this environment I can build, load and run various sample apps from the SDK on an nRF52840</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Mar 2022 07:55:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85485/how-to-use-nrf-led-matrix-sample-and-library-from-zephyr-with-nrf-connect-sdk-1-9-1-and-ses-for-use-in-an-app-on-micro-bit-v2" /><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/359509?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 07:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f54e1d6-2db5-4e7a-89e6-d9974919b5ee</guid><dc:creator>Ali Aljaani</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The display driver(CONFIG_DISPLAY)&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/display/index.html"&gt;https://docs.zephyrproject.org/latest/reference/display/index.html&lt;/a&gt; has support for the Micro:bit v2 (CONFIG_MICROBIT_DISPLAY). Try out this sample&amp;nbsp;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x835/__key/communityserver-discussions-components-files/4/8228.build.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/357900?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 10:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a30bf1c-15bf-46c1-8e29-6364f0592a05</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Yes, this looks correct, however, note that the bbc_microbit_v2 board files include most of what you need to use the MicroBit v2 functionality except for the pwm_led0. &lt;br /&gt;&lt;br /&gt;The nrf_dm uses the pwm_led in led_notifcation() found under&amp;nbsp;nrf\samples\bluetooth\nrf_dm\src\peer.c. When building it will complain about this LED missing, which is used to indicate the distance. You will need to configure this for your use on the MicroBit e.g. led_matrix.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/357808?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 05:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2f6e70c-1c10-4645-8023-fa37e75898bf</guid><dc:creator>Mike Wirth</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many thanks. Your suggestion is right on target. &amp;nbsp;I&amp;#39;ve started tp go through the DTS videos. &amp;nbsp;Seem clear enough, but when I try to apply them, I still run into problems. &amp;nbsp;What I&amp;#39;m trying to do is a mashup of the Nordic nrf_dm sample and the&amp;nbsp;&lt;/span&gt;Zephyr nrf-led-matrix sample:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Starting with the nrf_dm sample targeted to the nRF52833 DK, I can remove the dependence on single LEDs.&lt;/li&gt;
&lt;li&gt;Then I can change the target to bbc_microbit_v2 (which also uses the nRF52833 SOC).&lt;/li&gt;
&lt;li&gt;At this point, I start adding code snippets from main.c in the nrf_led_matrix that use that display device.&lt;/li&gt;
&lt;li&gt;I tried adding a dts overlay file (and changing where the alias already included in the solution that didn&amp;#39;t point anywhere), but didn&amp;#39;t get the details right. &amp;nbsp;Seem to have gotten tangled up in aliases for device &amp;quot;labels&amp;quot;.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&amp;#39;s what I put in the overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;led_matrix: led_matrix {
		compatible = &amp;quot;nordic,nrf-led-matrix&amp;quot;;
		status = &amp;quot;okay&amp;quot;;
		label = &amp;quot;LED_MATRIX&amp;quot;;
		width = &amp;lt;5&amp;gt;;
		height = &amp;lt;5&amp;gt;;
		pixel-mapping = [00 01 02 03 04
				 10 11 12 13 14
				 20 21 22 23 24
				 30 31 32 33 34
				 40 41 42 43 44];
		row-gpios = &amp;lt;&amp;amp;gpio0 21 GPIO_ACTIVE_HIGH&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 22 GPIO_ACTIVE_HIGH&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 15 GPIO_ACTIVE_HIGH&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 24 GPIO_ACTIVE_HIGH&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 19 GPIO_ACTIVE_HIGH&amp;gt;;
		col-gpios = &amp;lt;&amp;amp;gpio0 28 GPIO_ACTIVE_LOW&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_LOW&amp;gt;,
			    &amp;lt;&amp;amp;gpio1  5 GPIO_ACTIVE_LOW&amp;gt;,
			    &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_LOW&amp;gt;;
		refresh-frequency = &amp;lt;50&amp;gt;;
		timer = &amp;lt;&amp;amp;timer4&amp;gt;;
		pwm = &amp;lt;&amp;amp;pwm0&amp;gt;;
		pixel-group-size = &amp;lt;4&amp;gt;;
	};

       // pwm0: pwm0 {
		//compatible = &amp;quot;nordic,pwm0&amp;quot;;
		//status = &amp;quot;okay&amp;quot;;
		//label = &amp;quot;PWMO&amp;quot;;
        //}

        pwm-led0: pwm0-led0 {
		compatible = &amp;quot;nordic,pwm0&amp;quot;;
		status = &amp;quot;disabled&amp;quot;;
		label = &amp;quot;PWMO&amp;quot;;
        }

pwm0: pwm@4001c000 {
			compatible = &amp;quot;nordic,nrf-pwm&amp;quot;;
			// reg = &amp;lt; 0x4001c000 0x1000 &amp;gt;;
			// interrupts = &amp;lt; 0x1c 0x1 &amp;gt;;
			status = &amp;quot;okay&amp;quot;;
			label = &amp;quot;PWM_0&amp;quot;;
			//#pwm-cells = &amp;lt; 0x1 &amp;gt;;
			//phandle = &amp;lt; 0x6 &amp;gt;;
                        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Am I headed in the right general direction? &amp;nbsp;Suggestions on the details? &amp;nbsp;I&amp;#39;m headed off to look at more dts videos and docs, especially if there are any dts-related tools that help you sort out labels, devices, status, etc.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/357664?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 13:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d05d0ac-3ca9-4954-904c-8c9d40d42656</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Yes, you seem to have encountered a Devicetree error, indicating that you have configured something incorrectly. I would &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/guides/dts/index.html#dt-guide"&gt;recommend going through the Devicetree Guide&lt;/a&gt;, and have a look at this &lt;a href="https://youtu.be/sWaxQyIgEBY"&gt;YouTube video from the Zephyr Community on the Device Model&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Can you share your project in a .zip file?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/357023?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 07:00:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0802c6e-e848-44b7-a258-b09151ece00b</guid><dc:creator>Mike Wirth</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;OK, did a bit more investigation tonight. &amp;nbsp;Yes, indeed, my problem is related to dts and Kconfig files. &amp;nbsp;The net effect is that the following project (highlighted in yellow) is included in the zephyr sample&amp;nbsp;project, nrf_led_marix, but not in my nRF sample project:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nrf_5F00_led_5F00_matrix-project-navigator.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;One curiosity here is that the output file for the project is named &amp;quot;&lt;/span&gt;libdrivers__display.a&amp;quot;, not the same as the c file with an o or a extension.&lt;/p&gt;
&lt;p&gt;As verification that this is the solution for the undefined symbol &amp;nbsp;&amp;quot;__device_dts_ord_10&amp;quot; during linking, if you look at the binary inside the libdrivers__display.a, the first bit of it contains a string with the requisite symbol:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/binary-output.png" /&gt;&lt;/p&gt;
&lt;p&gt;In any case, I tried to manually add this project to the solution for my nRF sample solution. &amp;nbsp;(Not an SES expert.) The proper question is probably how to modify my nRF sample so that, with BBC_microbit_v2 as board, the nRF project wizard will include the nrf_led_matrix project automatically when generating the full solution.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/356755?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 07:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee6739e-1ca5-4d40-8f51-40702e4a4c66</guid><dc:creator>Mike Wirth</dc:creator><description>&lt;p&gt;A bit of Google searching on the undefined reference in my prior reply leads to the following in the &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__device__model.html#ga9a65996ce21f43acb7db061e23b48ec7"&gt;Zephyr docs&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;DEVICE_DT_GET
...
If no such device was allocated, this will fail at linker time. If you get 
an error that looks like undefined reference to __device_dts_ord_&amp;lt;N&amp;gt;, that 
is what happened. Check to make sure your device driver is being compiled, 
usually by enabling the Kconfig options it requires.
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This refers to Kconfig settings, which are part of the build files generated by the code generation wizard (I presume). &amp;nbsp;How do I fix this? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/356741?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 05:40:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abe18f32-6580-4d56-8c1f-afa72c5b88e6</guid><dc:creator>Mike Wirth</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many thanks. Yes, the sample did build, compile, and load onto my Micro:Bit V2 and execute correctly (at least with lots of flashing LED patterns :-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;critical issue for me was that I was being too restrictive&amp;nbsp;in following the instructions for specifying a project in the &amp;quot;&lt;span&gt;File &amp;rarr; Open nRF Connect SDK Project&amp;quot; wizard. &amp;nbsp;I was&amp;nbsp;only using the triangle selector to look for available project, thus not finding &amp;quot;nrf_led_matrix&amp;quot;. &amp;nbsp;I didn&amp;#39;t realize that the additional projects in the zephyr repo were available as Custom&amp;quot; projects and could be accessed via the normal&amp;nbsp;&amp;nbsp;...&amp;nbsp;file browser.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Suggestion&lt;/strong&gt;: Perhaps the documentation in the &amp;quot;Toolchain Manager | First steps | Building with&amp;nbsp;&lt;/span&gt;SEGGER Embedded Studio | 3. | Projects&amp;quot; could be clarified to include two facts.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The projects in the Zephyr repo are accessible as &amp;quot;custom&amp;quot; projects using the file finder.&lt;/li&gt;
&lt;li&gt;To be considered a custom project, the project must conform to the rules proscribed in the Zephyr docs for project structure (or whatever the defining documentation is).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Remaining Problem&lt;/strong&gt;: Having said all of this, I&amp;#39;m still left with a problem. &amp;nbsp;Prior to receiving your reply, I went ahead and took code snippets from the Zephyr nrf_led_sample and incorporated them into one of your working samples. &amp;nbsp;All went well until some calls to the display.c/h library which led to the following error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;1&amp;gt; Linking ‘zephyr_pre0.elf’
1&amp;gt; /opt/nordic/ncs/v1.9.1/toolchain/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: app/libapp.a(main.c.obj): in function `main&amp;#39;:
1&amp;gt; /opt/nordic/ncs/v1.9.1/nrf/samples/bluetooth/nrf_dm_microbit/src/main.c:473: undefined reference to `__device_dts_ord_10&amp;#39;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But this is triggered by code which works in&amp;nbsp;the running nrf_led_matrix sample. &amp;nbsp;I strongly suspect that the dts files for the bbc_microbit_v2 device are different in the nRF SDK than in the lower-level Zephyr repo. &amp;nbsp;Will check this out ASAP. &amp;nbsp;Or something is different in the two code generating environments.&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use "nRF LED Matrix" sample and library from Zephyr with nRF Connect SDK 1.9.1 and SES for use in an app on Micro:Bit V2?</title><link>https://devzone.nordicsemi.com/thread/356516?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 09:35:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d63bc7-6cf1-4275-88a4-747923d4458f</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I opened the nRF LED Matrix sample from&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;zephyr\samples\boards\nrf\nrf_led_matrix&lt;/span&gt; to use with&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;zephyr\boards\arm\bbc_microbit_v2&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1646645074263v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And building the sample seems to work as intended as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1646645676746v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have the Microbit available at the moment, but assume it will work as expected.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>