Difference between revisions of "Devzone posts"
m (→Posts To Follow - not yet sorted) |
(2021-11-24 reply to Nordic Devzone post.) |
||
Line 156: | Line 156: | ||
<!-- comment --> | <!-- comment --> | ||
+ | |||
+ | <!-- | ||
+ | |||
+ | Read Differential adc and print the value serially using uart | ||
+ | 2 hours ago | ||
+ | Nagaraj JP | ||
+ | Offline | ||
+ | Nagaraj JP | ||
+ | 0 pts. | ||
+ | |||
+ | Hi all iam trying to read the differential analog voltage between AIN0 and AIN1 which is pin0.02 and pin0.03 and print the voltage which will be in micro volts from 400 micorvolt, and since the examples in sdk uses log_flush i could not get the data or not acess any data from that, i need to acess the data and print the data using uart, can anybody help me out in this, thankyou. | ||
+ | |||
+ | |||
+ | |||
+ | Reply to post on 2021-11-24: | ||
+ | |||
+ | Hello Nagaraj JP, | ||
+ | |||
+ | Not sure if I can assist you, but a few details about your starting point in terms of software libraries and targeted hardware will be useful for the community here to know. Are you working with Nordic Semi's nRF Connect SDK, such as found at https://github.com/nrfconnect/sdk-nrf/tags? This was my starting point a few months back. I am using Nordic's sdk-nrf release version 1.6.1. | ||
+ | |||
+ | If yes to this question you are most likely then working with a Zephyr RTOS based app. I've seen some posts here, however, in which developers are working with a non-Zephyr code base or project. | ||
+ | |||
+ | If your application is Nordic SDK plus Zephyr based, then you may be able to get your targeted board's UART functioning quickly via the "hello world" sample app in downloaded SDK. For myself there were several steps to download and configure the various tools and SDK software pieces, but in the end I have a `west` workspace (where `west` is, you may already know, a Python based project manager at the command line). In that `west` workspace the `west` utility has eased the git cloning of Nordic's SDK, an associated fork of the Zephyr project, and some nice sample apps both from Nordic and from Zephyr. | ||
+ | |||
+ | In about a day's time I was able to enable any of three on-chip UARTs in my development board's microcontroller. The "hello world" sample in [west_workspace]/zephyr/samples/hello_world contains almost no code, and its prj.conf file is effectively empty. But as the sample app builds part of the build toolchain goes out and reads a DTS (device tree source) board file for my particular targeted board. Capturing and reviewing the build messages, I could then study that board.dts file, and see how the UART is assigned to pins, given a default BAUD rate, and enabled in the context of Zephyr RTOS. Those things allowed me to correctly configure my terminal emulator, and later to move between UART instances and change BAUD rate settings as needed. | ||
+ | |||
+ | The minimal source file from "hello_world" provided me an include statement which I have used many times since in development versions of code: | ||
+ | |||
+ | `#include <sys/printk.h>` | ||
+ | |||
+ | In Zephyr based apps (Zephyr 2.6.0 in my case) this include permits me to call `printk()` family functions. Printk() seems to behave just like `printf()`. | ||
+ | |||
+ | If I have shared things you already know my apologies. If you are just getting started in a Zephyr based project, you will likely want to study some about Device Tree Source, and the .dts and .overlay files you will and can use in Zephyr RTOS based projects. | ||
+ | |||
+ | Once you can build and see correct "hello world" output, you can start to add your own custom routines and code to that project. To pull the sample app out of Nordic's larger SDK will require some additional project configuration steps. Those lay outside the scope of your question, and are better answered by a couple of good tutorials and likely some further interaction with the forum community. | ||
+ | |||
+ | Hope this helps. | ||
+ | |||
+ | - Ted | ||
+ | |||
+ | |||
+ | --> |
Revision as of 18:42, 24 November 2021
Keywords: Nordic Segger python script :: create_nordic_project.py :: create Nordic project dot py
This page a starting point for references (links) to Nordic Devzone posts and additional notes on their respective issues. This page also contains posts from Jared Wolff Community forum, an excellent technical resource for design matters IoT related, and also Zephyr RTOS related.
On this page indentation of URLs highlights when one post refers or links to another.
Contents
^ nRF Radio Related
2021-11-09 TUE Jared Wolff Community post: MQTT, MVNOs and minimal data use strategies and options for edge devices:
2021-10-23 SAT
- https://devzone.nordicsemi.com/f/nordic-q-a/80988/thingy-91-agps-sample-tracks-satellites-but-does-not-get-fix Thingy91 sample tracks but does not fix on satellites
Posts To Follow - not yet sorted
2021-11-22
- https://devzone.nordicsemi.com/f/nordic-q-a/81986/littlefs-on-large-qspi-nor
- https://github.com/zephyrproject-rtos/zephyr/issues/40453
2021-11-19
2021-11-18
2021-11-11
Something of an answer to the first and newer post, explanation of nRF ring buffer and queue libraries:
2021-11-09
2021-11-04
Excerpt `./modules/hal/cmsis/CMSIS/DSP/Include/arm_math.h:3330:arm_status arm_rfft_fast_init_f32 (`
2021-11-03
- https://devzone.nordicsemi.com/f/nordic-q-a/81349/fota-issue-when-moving-from-different-ncs-versions
How to import non-Segger projects into Segger:
TO DO : follow steps outlined in this post:
Post by Erez, bringing in existing nRF SDK project to Segger:
Two I2C, SPI and ADC APIs available in nRF9160 based projects:
Recent post regarding how to add driver to a minimal Zephyr project (not yet answered as of 2021-09-26):
Posts which mentions 'offsets.c.obj does not exist' error:
Board overlay file base names must match board called out in `west build ...` invocation:
Electrical and hardware related:
Sprintf C formatting:
How to integrate Zephyr drivers into custom Zephyr app:
^ To Set cmake Options In SES
As of 2021-09-24, using Segger version xxx Nordic's version, this Segger IDE offers an extra menu item to open, build, flash and debug nRF SDK sample apps. The initial dialog box which appears for this option is titled "nRF Connect Options". Just left of the title there is a Nordic colored icon showing two links of chain, white on blue.
There are five input boxes, a mix of text inputs and drop down menus, and two sets of radio buttons. The free form text input box titled "Extra CMake Build Options" is a key place to express custom configuration settings to `cmake`. To use, for example, Zephyr's latest stable arm cross compiling toolchain in place of Nordic's close but not quite as recent chosen release of GNU ARM cross compiler toolchain, the following `cmake` option needs be entered here:
-DZEPHYR_TOOLCHAIN_VARIANT=zephyr
The default value for 'ZEPHYR_TOOLCHAIN_VARIANT' with Nordic's SDK v1.6.1 is 'gnuarmemb'. It is not sufficient to set a variable by this name in the shell environment of Linux systems, nor is it sufficient to set a Segger global or project macro by this name equal to the string "zephyr". This change in toolchain name or branding must be passed to `cmake` on its command line. In Segger, we build with a button press, so the command line option is only accessible to us from certain limited place or places. This text input box is our place to express needed custom command line options to `cmake` when working within SES.
^ create_nordic_project.py
ted@localhost:~/projects/zephyr-based/z4-sandbox-kionix-work/nrf/samples/nrf9160/at_client$ python3 /opt/ses-nordic/arm_segger_embedded_studio_v560_linux_x64_nordic/html/create_nordic_project.py Usage: create_nordic_project.py [-h] [--cmake-executable cmakeExecutable] [--cmake-option cmakeOption] [--python-executable pythonExecutable] [--ninja-executable ninjaExecutable] [--dtc-executable dtcExecutable] zephyrBaseDir toolchainDir studioDir buildDir boardDir boardName sourceDir Arguments: zephyrBaseDir Zephyr base directory toolchainDir GCC toolchain directory studioDir Embedded Studio directory buildDir Build directory boardDir Board directory boardName Board name sourceDir Source directory Optional arguments: --help Show this help message and exit --ncs-toolchain-version versionNCS Toolchain version to use --cmake-executable cmakeExecutable CMake executable to use --cmake-option cmakeOption Add additional CMake option --python-executable pythonExecutable Python executable to use --ninja-executable ninjaExecutable Ninja executable to use --dtc-executable dtcExecutable DTC executable to use --cmake-rerunRerun CMake in build folder ted@localhost:~/projects/zephyr-based/z4-sandbox-kionix-work/nrf/samples/nrf9160/at_client$