<?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>SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108018/spi-example-overlay-file-has-4-problems</link><description>Hi, 
 I test async SPI example with NCS v2.3.0 and nRF52-DK. 
 https://github.com/too1/ncs-spi-master-slave-example 
 the nrf52dk_nrf52832.overlay show 4 problems. 
 
 
 I test the pins with showPins() function taken from this ticket, 
 
 the pins map</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Feb 2024 03:09:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108018/spi-example-overlay-file-has-4-problems" /><item><title>RE: SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/thread/467666?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 03:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:738a4075-168b-4c47-9e50-63187ddc6fdb</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hmolesworth"&gt;hmolesworth&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Thanks for your showPins() function.&lt;/p&gt;
&lt;p&gt;The P0.12 and P0.13 are used for SPIS, so the names are swapped because their name are based on SPIM.&lt;/p&gt;
&lt;p&gt;SPIM:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707187908175v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;SPIS:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707188000208v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;VS code also show the correct pin usages.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707188217283v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707188321928v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The overlay file problem messages seems can be ignored if the project build is successfully, although I do not know what is the root cause for overlay file problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/thread/467625?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 16:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a3a115-76d9-493f-82e4-9bb6fa7720e0</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;&lt;em&gt;SP-TWI1 SDA&lt;/em&gt; means both &lt;em&gt;SPI1 MOSI&lt;/em&gt; and &lt;em&gt;TWI1 SDA&lt;/em&gt; as the two peripherals SPI1 and TWI1 are the same hardware which can be used in either mode but not both modes together, ditto SP-TWI SCL. This test shows when they are not (eg on an nRF52811)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Table 20: Peripherals sharing an ID on nRF53832
 *  ==============================================
 *  Instance
 *  ID  3 (0x40003000) SPIM SPIS SPI TWIM TWIS TWI
 *  ID  4 (0x40004000) SPIM SPIS SPI TWIM TWIS TWI
 *  ID 35 (0x40023000) SPIM SPIS SPI
 */
STATIC_ASSERT ((uint32_t)NRF_TWIM0 == (uint32_t)NRF_SPI0, &amp;quot;Error: NRF_TWIM0 differs from NRF_SPI0&amp;quot;);
STATIC_ASSERT ((uint32_t)NRF_TWIM1 == (uint32_t)NRF_SPI1, &amp;quot;Error: NRF_TWIM1 differs from NRF_SPI1&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Extend description
    if (NRF_TWIM1-&amp;gt;PSEL.SCL  == PinId) return &amp;quot;SPI1 SCK or TWI1 SCL&amp;quot;;
    if (NRF_TWIM1-&amp;gt;PSEL.SDA  == PinId) return &amp;quot;SPI1 MOSI or TWI1 SDA&amp;quot;;
    // or just put this one first before the TWIM1 test
    if (NRF_SPI1-&amp;gt;PSEL.SCK  == PinId) return &amp;quot;SPI1 SCK&amp;quot;;
    if (NRF_SPI1-&amp;gt;PSEL.MOSI == PinId) return &amp;quot;SPI1 MOSI&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However pins P0.12 and P0.13 do look as though they are swapped.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if (NRF_SPI2-&amp;gt;PSEL.SCK  == PinId) return &amp;quot;SPI2 SCK&amp;quot;;
    if (NRF_SPI2-&amp;gt;PSEL.MOSI == PinId) return &amp;quot;SPI2 MOSI&amp;quot;;
    if (NRF_SPI2-&amp;gt;PSEL.MISO == PinId) return &amp;quot;SPI2 MISO&amp;quot;;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/thread/467595?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 14:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28e04ba5-40f0-45a6-890c-53ffe18b5d3d</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not see any errors or anything in the build log that should cause issues, so it should be fine.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/thread/467493?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 02:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8129b14b-9e8f-410d-b21d-88025c912420</guid><dc:creator>Felix Shih</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/marte.m"&gt;Marte Myrvold&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I changed&amp;nbsp;spi_transceive_async() to&amp;nbsp;spi_transceive_signal() in main.c to avoid the warning, the other code is the same.&lt;/p&gt;
&lt;p&gt;The build log is as the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; *  Executing task: nRF Connect: Build [pristine]: ncs-spi-master-slave-example-master/build (active) 

Building ncs-spi-master-slave-example-master
west build --build-dir c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master --pristine --board nrf52dk_nrf52832 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/ncs_example_test/coprocessor;c:/ncs_example_test/light_bulb;c:/ncs_example_test/lock -DCONF_FILE=c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/prj.conf -DDTC_OVERLAY_FILE=c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/nrf52dk_nrf52832.overlay

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master
-- Found Python3: C:/ncs/toolchains/v2.3.0/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter 
-- Cache files will be written to: C:/ncs/v2.3.0/zephyr/.cache
-- Zephyr version: 3.2.99 (C:/ncs/v2.3.0/zephyr)
-- Found west (found suitable version &amp;quot;0.14.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52dk_nrf52832
-- Found host-tools: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/v2.3.0/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) 
-- Found BOARD.dts: C:/ncs/v2.3.0/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Found devicetree overlay: c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/nrf52dk_nrf52832.overlay
-- Generated zephyr.dts: C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build/zephyr/dts.cmake

warning: Experimental symbol SPI_SLAVE is enabled.

Parsing C:/ncs/v2.3.0/zephyr/Kconfig
Loaded configuration &amp;#39;C:/ncs/v2.3.0/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig&amp;#39;
Merged configuration &amp;#39;c:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/prj.conf&amp;#39;
Configuration saved to &amp;#39;C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Felix/Desktop/ncs-spi-master-slave-example-master/build
-- west build: building application
[1/175] Generating include/generated/version.h
-- Zephyr version: 3.2.99 (C:/ncs/v2.3.0/zephyr), build: v3.2.99-ncs2
[165/175] Linking C executable zephyr\zephyr_pre0.elf

[169/175] Linking C executable zephyr\zephyr_pre1.elf

[175/175] Linking C executable zephyr\zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       37496 B       512 KB      7.15%
             RAM:        9536 B        64 KB     14.55%
        IDT_LIST:          0 GB         2 KB      0.00%
 *  Terminal will be reused by tasks, press any key to close it. 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI example overlay file has 4 problems</title><link>https://devzone.nordicsemi.com/thread/467368?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 12:51:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:999d6c98-09f0-47b2-9e0e-dbc7512a098f</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you share the complete build log? It should be in the &amp;#39;Terminal&amp;#39; tab in the panel:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706878272211v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Please make sure to do a pristine build so you will get the complete build log.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>