This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Question when starting evaluation nRF5340-PDK

I've been developing using nRF52840 using the nRF5 SDK.   I have also been using FreeRTOS in my projects.

I recently received an nRF5340pdk to evaluate the nRF5340.     I have some questions:

  1. From reading the website, it appears that nRF5 SDK has been replaced by SDK Connect when using the nRF5340.   Is this true?
  2. I see that Zephyr is included in SDK Connect.   Will FreeRTOS be ported to nRF5340?
  3. I downloaded the "Toolchain Manager" and installed (on Windows 10) both nRF Connect SDK v1.4.0 and v1.4.99-dev and tried the sequence under "First steps to build".  Using v1.4.0
    1. I was able to download/compile/run the sample project "Blinky"
    2. I was able to download/compile/run the sample project "Hello World", but when it runs, no output appears in the Debug Terminal.  Is the output going somewhere else, or do I have to enable output to the Debug Terminal?
    3. I was able to download/compile the sample project "peripheral hr", but when I attempt Debug->Go it appears to fail at line 455 of init.c (in z_cstart).
    4. I then tried using the board "nrf5340pdk_nrf5340_cpunet (thinking that perhaps since this demo uses BLE, I needed the "net" version) and it compiled, but won't load (SES says that the CPU is still running).   I tried various things (included power cycling the board), without success.

Can you suggest what I'm doing wrong?

Thanks!

Ed Hepler

Parents
  • Hi Ed,

    What is the HW version on the withe sticker of your PDK? Is it 0.8.0 or 0.9.0?  

    1. nRF5340 is only supported by the nRF Connect SDK.
    2. See the explanation in this post
    3. b. Refer to how-to-use-rtt to add the following to the prj.conf under ncs\zephyr\samples\hello_world as:
       
      CONFIG_SERIAL=y
      CONFIG_USE_SEGGER_RTT=y
      CONFIG_RTT_CONSOLE=y
      CONFIG_UART_CONSOLE=n


      c. Press reset.  and go again. It will stop at main.c line 118 : err = bt_enable(NULL);
      d. The application sample like peripheral hr only can run with nrf5340pdk_nrf5340_cpuapp or  nrf5340pdk_nrf5340_cpuappns. If you want to run the sample with nrf5340pdk_nrf5340_cpunet, please see network-sample
       

    -Amanda H.

  • Hi Amanda,

    Thanks for your response!

    My nRF5340-PDK is version 0.8.0

    I deleted the project build directory for "Hello World" and re-created the project making sure to select nrf5340pdk_nrf5340_cpuappns as the target.   I also edited the prj.conf file to include the statements you provided (and in the link you pointed to).

    However, when compiled, and Debug->Go is clicked, execution halts at line 455 of init.c with no particular error reported.   If I click the Run icon, it halts again at line 80 of fault_s.S              Not sure how to proceed...   

    A few additional questions:

    1. What is the difference between the preview and production versions of nRF5340-(p)DK?  Note that when I first powered on the board, it prompted me that new firmware was available (I assume for the debugger) and I allowed the download to occur.   Is this OK?    Are there physical differences in the board design?

    2. Is there a link (that I have missed) that documents the SoC peripheral drivers/libraries for the nRF5340 under nRF Connect?   In particular, I am using the TWI and SPI transaction managers and I2S drivers in my nRF52840 applications.

    3. Is the online documentation for nrfx v2.4.0 (in the Infocenter) still relevant for nRF Connect / Zephyr (I assume so)?   Assuming so, are the libraries (such as TWI/SPI transaction managers) available under nRF5 SDK usable under SDK Connect/Zephyr?

    4. Is there a link that defines all of the CONFIG_* settings that can be populated in prj.conf?

    5. Is there a chart/link that cross-references which CONFIG_* settings are required for particular device drivers?   For example, if I want to use TWI  (or TWIM) peripherals, which CONFIG_ settings are required/optional?  (Even when using nRF5 SDK and sdk_config.h (with or without the CMSIS wizard) with the nRF52840, it is sometimes trial/error to figure out which settings are needed) 

    6. Even after "rebuilding" a solution, often when I click Debug->Go, the "Project out of date" dialog box appears.   Is there some setting in SES that needs to change when using nRF Connect to avoid this?

    Many thanks!

    Ed Hepler

Reply
  • Hi Amanda,

    Thanks for your response!

    My nRF5340-PDK is version 0.8.0

    I deleted the project build directory for "Hello World" and re-created the project making sure to select nrf5340pdk_nrf5340_cpuappns as the target.   I also edited the prj.conf file to include the statements you provided (and in the link you pointed to).

    However, when compiled, and Debug->Go is clicked, execution halts at line 455 of init.c with no particular error reported.   If I click the Run icon, it halts again at line 80 of fault_s.S              Not sure how to proceed...   

    A few additional questions:

    1. What is the difference between the preview and production versions of nRF5340-(p)DK?  Note that when I first powered on the board, it prompted me that new firmware was available (I assume for the debugger) and I allowed the download to occur.   Is this OK?    Are there physical differences in the board design?

    2. Is there a link (that I have missed) that documents the SoC peripheral drivers/libraries for the nRF5340 under nRF Connect?   In particular, I am using the TWI and SPI transaction managers and I2S drivers in my nRF52840 applications.

    3. Is the online documentation for nrfx v2.4.0 (in the Infocenter) still relevant for nRF Connect / Zephyr (I assume so)?   Assuming so, are the libraries (such as TWI/SPI transaction managers) available under nRF5 SDK usable under SDK Connect/Zephyr?

    4. Is there a link that defines all of the CONFIG_* settings that can be populated in prj.conf?

    5. Is there a chart/link that cross-references which CONFIG_* settings are required for particular device drivers?   For example, if I want to use TWI  (or TWIM) peripherals, which CONFIG_ settings are required/optional?  (Even when using nRF5 SDK and sdk_config.h (with or without the CMSIS wizard) with the nRF52840, it is sometimes trial/error to figure out which settings are needed) 

    6. Even after "rebuilding" a solution, often when I click Debug->Go, the "Project out of date" dialog box appears.   Is there some setting in SES that needs to change when using nRF Connect to avoid this?

    Many thanks!

    Ed Hepler

Children
  • Hi Ed,

    Sorry for the late reply.

    CktDesigner said:
    However, when compiled, and Debug->Go is clicked, execution halts at line 455 of init.c with no particular error reported. 

    After this step, press "Restart" ( ) in the debug section, then "Go".  

    CktDesigner said:
    1. What is the difference between the preview and production versions of nRF5340-(p)DK?

     The hardware version is different. There are differences (like more peripherals, different number of MPU regions, different size of flash regions in SPU) are between hardware version. 

     

    CktDesigner said:
    2. Is there a link (that I have missed) that documents the SoC peripheral drivers/libraries for the nRF5340 under nRF Connect?   In particular, I am using the TWI and SPI transaction managers and I2S drivers in my nRF52840 applications.

     I don't find the document like that either, but I will suggest the internal. This case https://devzone.nordicsemi.com/f/nordic-q-a/58966/is-there-any-sample-for-spi-based-on-nrf5340 shows how to use SPI on nRF5340.

    CktDesigner said:
    3. Is the online documentation for nrfx v2.4.0 (in the Infocenter) still relevant for nRF Connect / Zephyr (I assume so)?   Assuming so, are the libraries (such as TWI/SPI transaction managers) available under nRF5 SDK usable under SDK Connect/Zephyr?

     Check here: http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index-nrf.html#

    CktDesigner said:
    4. Is there a link that defines all of the CONFIG_* settings that can be populated in prj.conf?

    See this doc http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html

    CktDesigner said:
    5. Is there a chart/link that cross-references which CONFIG_* settings are required for particular device drivers?   For example, if I want to use TWI  (or TWIM) peripherals, which CONFIG_ settings are required/optional?

     You can take a look at this tutorial https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-4-0  

    CktDesigner said:
    6. Even after "rebuilding" a solution, often when I click Debug->Go, the "Project out of date" dialog box appears.   Is there some setting in SES that needs to change when using nRF Connect to avoid this?

     If you already rebuild the solution, you could ignore it and not build again. 

    CktDesigner said:
    So there seems to be an issue running some of these sample programs on the 0.8.0 version of the nRF5340-PDK.

    Do you flash the Bluetooth: HCI RPMsg sample to the network core and bluetooth/peripheral_hr sample to the application core?

    Do you get the log from the terminal tool? See How to connect with PuTTY for the required settings.

    -Amanda H. 

Related