Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nRFConnect #1

Open
Ozark-iot opened this issue Sep 12, 2022 · 8 comments
Open

nRFConnect #1

Ozark-iot opened this issue Sep 12, 2022 · 8 comments

Comments

@Ozark-iot
Copy link

Almost all zephyr projects are opened through nRF Connect now. Withoiut trying to be difficult would it be relatively simple for you to create a repository with any of the example code whereby it could be opened with nRF Connect ?

I've tried to get things to compile and headers are missing.

In addition would it not be more simple to change a board overlay to include the following ?:
`&spi0 {
status = "okay";
sck-pin = <2>;
mosi-pin = <20>;
miso-pin = <3>;
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;

dw3000@0 {
	compatible = "decawave,dw3000";
	label = "DW3000";
	spi-max-frequency = <1000000>;
	reg = <0>;
	reset-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
	irq-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
	wakeup-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
	//spi-pol-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
	//spi-pha-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
};

};`

Thank you...

@br101
Copy link
Owner

br101 commented Oct 13, 2022

I don't understand your issue. All these examples are running in nRF Connect (version 2.0.0)

@Ozark-iot
Copy link
Author

Hmmm, so you are using Visual Studio.

I'm using SDK V1.9.1, (Segger) none of the examples compile without me placing an overlay nRF52840dk.nRF52840.overlay in the root directory of the project.

As follows:
/* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic */

&uart1 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
status = "disabled";
};

&i2c1 {
status = "disabled";
compatible = "nordic,nrf-twim";
sda-pin = <29>;
scl-pin = <45>;
clock-frequency = <I2C_BITRATE_STANDARD>;
si7055@40 {
compatible = "silabs,si7055";
reg = <0x40>;
label = "si7055";
};
};

&spi0 {
status = "okay";
sck-pin = <47>;
miso-pin = <46>;
mosi-pin = <45>;
cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;

dw3000@0 {
	compatible        = "decawave,dw3000";
	label             = "DW3000";
	spi-max-frequency = <1000000>;
	reg               = <0>;
	wakeup-gpios      = <&gpio1 11 GPIO_ACTIVE_HIGH>;
	irq-gpios         = <&gpio1 10 GPIO_ACTIVE_HIGH>;
	reset-gpios       = <&gpio1  9 GPIO_ACTIVE_LOW>;
	spi-pol-gpios     = <&gpio1  2 GPIO_ACTIVE_LOW>;
	spi-pha-gpios     = <&gpio1  1 GPIO_ACTIVE_LOW>;
};

};

arduino_i2c: &i2c0 {
compatible = "nordic,nrf-twi";
status = "disabled";
sda-pin = <26>;
scl-pin = <27>;
};

@br101
Copy link
Owner

br101 commented Oct 13, 2022

Yes I am using Visual Studio Code, no idea about Segger...
So you are using the DWS3000 shield on the nRF52840DK?
Maybe it works if you activate the shield SHIELD_QORVO_DWS3000, it is already defined in the driver.

@Ozark-iot
Copy link
Author

Maybe it works if you activate the shield SHIELD_QORVO_DWS3000, it is already defined in the driver.

Can you show me how ?
Please

@Ozark-iot
Copy link
Author

I have a better question to ask.
Have you tested DS ranging using examples
ex_05a_ds_twr_init and ex_05a_ds_twr_resp ?

I have managed to get it to compile and run, but I never receive the final message, I'm guessing that it is delay settings.
If you have modified the delays and made it work I would be very grateful if you would share the values please.

@br101
Copy link
Owner

br101 commented Oct 13, 2022

If you use Cmake only you can add set(SHIELD qorvo_dws3000) to CMakeLists.txt
Otherwise you add the shield when you define your board. Not sure how that works with Segger SDK

@br101
Copy link
Owner

br101 commented Oct 13, 2022

No, i haven't. So does the basic stuff work now?

@Ozark-iot
Copy link
Author

No nothing that requires RX of a TX functions. After many hours of scrathing my head I made ex_06a_ss_twr_initiator and ex_06a_ss_twr_responder to work.

I had to change the delays in iniator
`/* Receive response timeout. See NOTE 5 below. */
// jc
//#define RESP_RX_TIMEOUT_UUS 400
#define RESP_RX_TIMEOUT_UUS 1300

`
and in shared_defines.h

`/* UWB microsecond (uus) to device time unit (dtu, around 15.65 ps) conversion factor.

  • 1 uus = 512 / 499.2 µs and 1 µs = 499.2 * 128 dtu. */
    //jc
    //#define UUS_TO_DWT_TIME 63898
    //#define UUS_TO_DWT_TIME 147456
    #define UUS_TO_DWT_TIME 113050
    `
    But I'm completely guessing with the DS example 5 ranging example, all the material on the qorvo forum seems based on DW1000 and very contradictory.

It would be nice to get it working :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants