Date   

Support for Adafruit Feather #nrf52840 Sense #nrf52840

Leo
 

Hello Zephyr team!

I have a question about board support and I also need your help building an example project.

1) Does Zephyr support the board below? How would I go about using its sensors?
https://www.adafruit.com/product/4516

2) Is this the right place to ask questions about NordicSemi's downstream of Zephyr's repository? If not, please point me to the right place!
The issue that I am having is that one example project that builds for nrf52840dk_nrf52840, does not build for adafruit_feather_nrf52840.

Example project: ncs/nrf/samples/esb/ptx
Zephyr version: 2.4.99
ZEPHYR_TOOLCHAIN_VARIANT is gnuarmemb
west build -b adafruit_feather_nrf52840 C:/embedded/ncs/nrf/samples/esb/ptx
Not sure which of the errors would better help identifying the issue, but here's the first one:
**************
    In file included from C:/embedded/ncs/zephyr/include/arch/arm/aarch32/arch.h:20,
                     from C:/embedded/ncs/zephyr/include/arch/cpu.h:19,
                     from C:/embedded/ncs/zephyr/include/kernel_includes.h:38,
                     from C:/embedded/ncs/zephyr/include/kernel.h:17,
                     from C:/embedded/ncs/zephyr/include/init.h:11,
                     from C:/embedded/ncs/zephyr/include/device.h:22,
                     from C:/embedded/ncs/zephyr/include/drivers/clock_control.h:26,
                     from C:/embedded/ncs/nrf/samples/esb/ptx/src/main.c:6:
    C:/embedded/ncs/nrf/samples/esb/ptx/src/main.c: In function 'leds_init':
    C:/embedded/ncs/zephyr/include/devicetree.h:202:32: error: 'DT_N_ALIAS_led2_P_gpios_IDX_0_VAL_pin' undeclared (first use in this function); did you mean 'DT_N_S_leds_S_led_0_P_gpios_IDX_0_VAL_pin'?
      202 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)
          |                                ^~~~~~~~~~~
    ...
    ...
    ...
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\embedded\build'
**************

The repository in question is https://github.com/nrfconnect/sdk-nrf/ which is the only one that has the esb/ptx example.
How do I build that specific example for this board?

Thanks for your help!
Best,
Leo


Re: device_get_binding() returns NULL on all but one vl53l0x

Erwan Gouriou
 

Hi Matthias,

Indeed this dynamic behavior is not implemented.
As you can see in vl53lx driver, vl53l0x_init make use of DT_INST_FOO(0, bar) macros.
Which means only the information from instance 0 are used.

This being said, enabling dynamic support should not be that complicated.
A lot of zephyr drivers support instantiation and could be used as example.

Here are the steps:
- Add a config struct to the driver init to store all the instance init data from device tree
- rework the vl53l0x_init function to be instance agnostic by using this config struct
- Instantiate the driver DEVICE_AND_API_INIT thanks to DT_INST_FOREACH_STATUS_OKAY(FOO) macro

DT_INST_FOREACH_STATUS_OKAY(FOO) will loop through all dt enabled instances of your sensor
and call FOO(i) for each instance.
You'll find doc and examples of use of this macro throughout the tree. 

Best regards
Erwan






 

On Wed, 2 Dec 2020 at 14:56, Matthias Wenzel <mw@...> wrote:
Hi,

I am using six vl53l0x (a laser time-of-flight sensor) on two I2C busses (three each), and device_get_binding() returns NULL on all but one.

The vl53l0x is special in that regard that it cannot be pin-strapped to a device-address, instead it always comes up as address 0x29, and has a SW command to assign it a new address. So when using multiple vl53l0x on one I2C bus the mechanism is to keep all-but-one in reset, assign a new address, and release the next from reset. This mechanism seems to work fine with this loop getting called with 0..5:

void vl53l0x_init_addr(int n)
{
    const struct device *i2c1 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005400)));
    const struct device *i2c2 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005800)));

    switch (n)
    {
        case 0:
            xshut_release(PORTPIN_TOF_C_XSHUT);
            vl53l0x_hop_to_addr(i2c1, 0x31);
            vl53l0x[2].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_c)));
            break;
        case 1:
            xshut_release(PORTPIN_TOF_B_XSHUT);
            vl53l0x_hop_to_addr(i2c1, 0x30);
            vl53l0x[1].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_b)));
            break;
        case 2:
            xshut_release(PORTPIN_TOF_A_XSHUT);
            vl53l0x[0].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_a)));
            break;
        case 3:
            xshut_release(PORTPIN_TOF_F_XSHUT);
            vl53l0x_hop_to_addr(i2c2, 0x31);
            vl53l0x[5].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_f)));
            break;
        case 4:
            xshut_release(PORTPIN_TOF_E_XSHUT);
            vl53l0x_hop_to_addr(i2c2, 0x30);
            vl53l0x[4].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_e)));
            break;
        case 5:
            xshut_release(PORTPIN_TOF_D_XSHUT);
            vl53l0x[3].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_d)));
            break;
    }
}

However when testing lateron, only vl53l0x[0].vl53l0x has an address, the other five are 0. Note that vl53l0x[0].vl53l0x gets actually set in the third call to the above function.

    for (int i = 0; i < N_VL53L0X; i++)
    {
        printf("DEV[%d] = %p\r\n", i, vl53l0x[i].vl53l0x);
    }
Prints:
DEV[0] = 0x20020f04
DEV[1] = 0x0
DEV[2] = 0x0
DEV[3] = 0x0
DEV[4] = 0x0
DEV[5] = 0x0

I am using an DT-overlay which is

&i2c1 {
    status = "okay";
    clock-frequency = < 100000 >;
    pinctrl-0 = < &i2c1_scl_pb6 &i2c1_sda_pb9 >;
    vl53l0x_a: tofi2c1@29 {
        compatible = "st,vl53l0x";
        reg = < 0x29 >;
        label = "VL53L0X_A";
    };
    vl53l0x_b: tofi2c1@30 {
        compatible = "st,vl53l0x";
        reg = < 0x30 >;
        label = "VL53L0X_B";
    };
    vl53l0x_c: tofi2c1@31 {
        compatible = "st,vl53l0x";
        reg = < 0x31 >;
        label = "VL53L0X_C";
    };
};
&i2c2 {
    status = "okay";
    clock-frequency = < 100000 >;
    pinctrl-0 = < &i2c2_scl_pf1 &i2c2_sda_pf0 >;
    vl53l0x_d: tofi2c2@29 {
        compatible = "st,vl53l0x";
        reg = < 0x29 >;
        label = "VL53L0X_D";
    };
    vl53l0x_e: tofi2c2@30 {
        compatible = "st,vl53l0x";
        reg = < 0x30 >;
        label = "VL53L0X_E";
    };
    vl53l0x_f: tofi2c2@31 {
        compatible = "st,vl53l0x";
        reg = < 0x31 >;
        label = "VL53L0X_F";
    };
};

Is this "dynamic" behaviour unsupported in current DT and/or the zephyr vl53l0x driver implementation, or am I missing some detail on how to implement this properly?
I am on an nucleo-144 STM32F767ZI eval board.

Thanks & best regards,

matthias






contiki-ng RPL-border router in zephyr #nrf52840

Nikos Karamolegkos
 

Hello, I am investigating if the implementation of contiki-ng RPL border router can be useful in zephyr. I am trying to set up the echo client example of zephyr using the overlay-802154.conf file in order to ping6 from nrf52840-dk running zephyr to a cc2538 module running the contiki-ng RPL border router. I have the same configuration in both OS (channel, panid, band, etc) however I have not positive results yet. Has anybody tried something similar? I am testing is for fun to achieve OS diversity.

Thank you,


Zephyr SDK 0.12.0-beta-3 available for testing

Kumar Gala
 

Hi,

Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.12.0-beta-3

Please download and try things out and report any issues. Please report issues here:

https://github.com/zephyrproject-rtos/sdk-ng/issues

Known issues (these are on the Zephyr side):

* some xtensa platforms may need updating w/regards to Zephyr & Xtensa HAL
[ https://github.com/zephyrproject-rtos/zephyr/pull/23142 ]

* known issue with arm64 and linking C++ & newlib:
[ https://github.com/zephyrproject-rtos/zephyr/issues/28650 ]

Changes since the last release (beta-2):

• Fixed bug with ARM libgcc builds & CMSE
• Built newlib optimized

Current plan is to release SDK 0.12.0 towards the middle of next week.

- k


How to implements SPI slave event handler on zephyr #spi

mfinmuch@...
 

Recently I am trying to use nrf52840 to implement SPI slave on zephyr
In Nordic's SPIS example, it will go to spis_event_handler when an interrupt occurs
In spis_event_handler, judge whether the transmission has been completed, as follow
if (event.evt_type == NRF_DRV_SPIS_XFER_DONE)
I want to implement this interrupt function on zephyr
But at present zephyr SPIS I have not seen an example of event handler
Only simple spi_write and spi_read can be used to write/read
And in \zephyr\drivers\spi\spi_nrfx_spi.c, I saw a function that does the same thing as the spis_event_handler of the Nordic example
as follows

How to add this event_handler in the main function in the sample?


device_get_binding() returns NULL on all but one vl53l0x

Matthias Wenzel
 

Hi,

I am using six vl53l0x (a laser time-of-flight sensor) on two I2C busses (three each), and device_get_binding() returns NULL on all but one.

The vl53l0x is special in that regard that it cannot be pin-strapped to a device-address, instead it always comes up as address 0x29, and has a SW command to assign it a new address. So when using multiple vl53l0x on one I2C bus the mechanism is to keep all-but-one in reset, assign a new address, and release the next from reset. This mechanism seems to work fine with this loop getting called with 0..5:

void vl53l0x_init_addr(int n)
{
const struct device *i2c1 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005400)));
const struct device *i2c2 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005800)));

switch (n)
{
case 0:
xshut_release(PORTPIN_TOF_C_XSHUT);
vl53l0x_hop_to_addr(i2c1, 0x31);
vl53l0x[2].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_c)));
break;
case 1:
xshut_release(PORTPIN_TOF_B_XSHUT);
vl53l0x_hop_to_addr(i2c1, 0x30);
vl53l0x[1].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_b)));
break;
case 2:
xshut_release(PORTPIN_TOF_A_XSHUT);
vl53l0x[0].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_a)));
break;
case 3:
xshut_release(PORTPIN_TOF_F_XSHUT);
vl53l0x_hop_to_addr(i2c2, 0x31);
vl53l0x[5].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_f)));
break;
case 4:
xshut_release(PORTPIN_TOF_E_XSHUT);
vl53l0x_hop_to_addr(i2c2, 0x30);
vl53l0x[4].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_e)));
break;
case 5:
xshut_release(PORTPIN_TOF_D_XSHUT);
vl53l0x[3].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_d)));
break;
}
}

However when testing lateron, only vl53l0x[0].vl53l0x has an address, the other five are 0. Note that vl53l0x[0].vl53l0x gets actually set in the third call to the above function.

for (int i = 0; i < N_VL53L0X; i++)
{
printf("DEV[%d] = %p\r\n", i, vl53l0x[i].vl53l0x);
}
Prints:
DEV[0] = 0x20020f04
DEV[1] = 0x0
DEV[2] = 0x0
DEV[3] = 0x0
DEV[4] = 0x0
DEV[5] = 0x0

I am using an DT-overlay which is

&i2c1 {
status = "okay";
clock-frequency = < 100000 >;
pinctrl-0 = < &i2c1_scl_pb6 &i2c1_sda_pb9 >;
vl53l0x_a: tofi2c1@29 {
compatible = "st,vl53l0x";
reg = < 0x29 >;
label = "VL53L0X_A";
};
vl53l0x_b: tofi2c1@30 {
compatible = "st,vl53l0x";
reg = < 0x30 >;
label = "VL53L0X_B";
};
vl53l0x_c: tofi2c1@31 {
compatible = "st,vl53l0x";
reg = < 0x31 >;
label = "VL53L0X_C";
};
};
&i2c2 {
status = "okay";
clock-frequency = < 100000 >;
pinctrl-0 = < &i2c2_scl_pf1 &i2c2_sda_pf0 >;
vl53l0x_d: tofi2c2@29 {
compatible = "st,vl53l0x";
reg = < 0x29 >;
label = "VL53L0X_D";
};
vl53l0x_e: tofi2c2@30 {
compatible = "st,vl53l0x";
reg = < 0x30 >;
label = "VL53L0X_E";
};
vl53l0x_f: tofi2c2@31 {
compatible = "st,vl53l0x";
reg = < 0x31 >;
label = "VL53L0X_F";
};
};

Is this "dynamic" behaviour unsupported in current DT and/or the zephyr vl53l0x driver implementation, or am I missing some detail on how to implement this properly?
I am on an nucleo-144 STM32F767ZI eval board.

Thanks & best regards,

matthias


device_get_binding() returns NULL on all but one vl53l0x

Matthias Wenzel
 

Hi,

I am using six vl53l0x (a laser time-of-flight sensor) on two I2C busses (three each), and device_get_binding() returns NULL on all but one.

The vl53l0x is special in that regard that it cannot be pin-strapped to a device-address, instead it always comes up as address 0x29, and has a SW command to assign it a new address. So when using multiple vl53l0x on one I2C bus the mechanism is to keep all-but-one in reset, assign a new address, and release the next from reset. This mechanism seems to work fine with this loop getting called with 0..5:

void vl53l0x_init_addr(int n)
{
const struct device *i2c1 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005400)));
const struct device *i2c2 = device_get_binding(DT_LABEL(DT_PATH(soc, i2c_40005800)));

switch (n)
{
case 0:
xshut_release(PORTPIN_TOF_C_XSHUT);
vl53l0x_hop_to_addr(i2c1, 0x31);
vl53l0x[2].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_c)));
break;
case 1:
xshut_release(PORTPIN_TOF_B_XSHUT);
vl53l0x_hop_to_addr(i2c1, 0x30);
vl53l0x[1].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_b)));
break;
case 2:
xshut_release(PORTPIN_TOF_A_XSHUT);
vl53l0x[0].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_a)));
break;
case 3:
xshut_release(PORTPIN_TOF_F_XSHUT);
vl53l0x_hop_to_addr(i2c2, 0x31);
vl53l0x[5].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_f)));
break;
case 4:
xshut_release(PORTPIN_TOF_E_XSHUT);
vl53l0x_hop_to_addr(i2c2, 0x30);
vl53l0x[4].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_e)));
break;
case 5:
xshut_release(PORTPIN_TOF_D_XSHUT);
vl53l0x[3].vl53l0x = device_get_binding(DT_LABEL(DT_NODELABEL(vl53l0x_d)));
break;
}
}

However when testing lateron, only vl53l0x[0].vl53l0x has an address, the other five are 0. Note that vl53l0x[0].vl53l0x gets actually set in the third call to the above function.

for (int i = 0; i < N_VL53L0X; i++)
{
printf("DEV[%d] = %p\r\n", i, vl53l0x[i].vl53l0x);
}
Prints:
DEV[0] = 0x20020f04
DEV[1] = 0x0
DEV[2] = 0x0
DEV[3] = 0x0
DEV[4] = 0x0
DEV[5] = 0x0

I am using an DT-overlay which is

&i2c1 {
status = "okay";
clock-frequency = < 100000 >;
pinctrl-0 = < &i2c1_scl_pb6 &i2c1_sda_pb9 >;
vl53l0x_a: tofi2c1@29 {
compatible = "st,vl53l0x";
reg = < 0x29 >;
label = "VL53L0X_A";
};
vl53l0x_b: tofi2c1@30 {
compatible = "st,vl53l0x";
reg = < 0x30 >;
label = "VL53L0X_B";
};
vl53l0x_c: tofi2c1@31 {
compatible = "st,vl53l0x";
reg = < 0x31 >;
label = "VL53L0X_C";
};
};
&i2c2 {
status = "okay";
clock-frequency = < 100000 >;
pinctrl-0 = < &i2c2_scl_pf1 &i2c2_sda_pf0 >;
vl53l0x_d: tofi2c2@29 {
compatible = "st,vl53l0x";
reg = < 0x29 >;
label = "VL53L0X_D";
};
vl53l0x_e: tofi2c2@30 {
compatible = "st,vl53l0x";
reg = < 0x30 >;
label = "VL53L0X_E";
};
vl53l0x_f: tofi2c2@31 {
compatible = "st,vl53l0x";
reg = < 0x31 >;
label = "VL53L0X_F";
};
};

Is this "dynamic" behaviour unsupported in current DT and/or the zephyr vl53l0x driver implementation, or am I missing some detail on how to implement this properly?
I am on an nucleo-144 STM32F767ZI eval board.

Thanks & best regards,

matthias


Re: Switch between network interfaces during runtime (Offloaded modem/Ethernet) #driver #networking #stm32 #ethernet #modem

Jukka Rissanen
 

Hi John,

do you need both interfaces be up all the time? If you do not, then simplest way is to take the other interface down.

The stack selects the network interface according to destination IP address. If you do not have specific routes set, then default network interface is selected.
The default interface select function can be found in subsys/net/ip/net_if.c:net_if_get_default(), it is not very smart and as you noticed it selects offline interface over the ethernet one. Some more intelligence could be created there. Patches are welcome if you want to investigate this further.

Cheers,
Jukka



On Wed, 2020-11-25 at 06:06 -0800, johnnyboy_theUnixSlayer@... wrote:
Hi Zephyr Users,

I wonder how I can make my app switch between which network interface it use during runtime. My idea is to automate the if-selection depending on which of the ifs that has a internet connection.

I have begun simply with using http_get sample and it works fine when I'm using the ifs one at the time. But when I compile in both of them Zephyr wants to use one of the ifs over the other. The setup I'm using is the STM32H747i_disco dev. kit with its built in ethernet-if (aka not offloaded) and Sparkfuns Ublox Sara R4 shield (which is offloaded).

Zephyr always chooses R4 in this sample even though I have set CONFIG_NET_DEFAULT_IF_ETHERNET in prj.conf. Zephyr sets up both my ifs and runs a DCHP request for the ethernet-if. When the sample is done with its HTTP
request (which it does over R4) I can send net cmds like DNS-requests and ping servers with the ethernet-if. Which leads me to believe that the ethernet-if is ready to use by the sample somehow.

So how can I make the sample tell Zephyr to use the ethernet-if instead of the R4?

Further more I'm a bit preplexed because to my untrained eye it seems that Zephyr don't support to use offloaded and non offloaded ifs at the same time from a BSD-socket perspective. When zsock_getaddrinfo() runs it first checks if
CONFIG_NET_SOCKETS_OFFLOAD is enabled and the does the DNS request on the offloaded-if, and thus wont use the internal DNS resolver (which comes after the offloaded check in the code).

Thank you in advance//
John Johnson


Re: API meeting: agenda

Carles Cufi
 

A late addition to the agenda today:

- usbh: add experimental support
- PR https://github.com/zephyrproject-rtos/zephyr/pull/30361

Carles

-----Original Message-----
From: Cufi, Carles
Sent: 01 December 2020 15:12
To: devel@lists.zephyrproject.org; users@lists.zephyrproject.org
Subject: API meeting: agenda

Hi all,

Agenda for today.

- device: refactor declare/define macros to support device definition and
reference from devicetree nodes
- PR https://github.com/zephyrproject-rtos/zephyr/pull/30196

- Add API context page
- PR https://github.com/zephyrproject-rtos/zephyr/issues/21061


If you have additional items please let me know.


Teams link: https://teams.microsoft.com/l/meetup-
join/19%3ameeting_NWU2MjZlYWEtZDcwMi00MWQzLTgwMjEtNDdkYjQwMjBjMmFj%40threa
d.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-
b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-
5e334e88f6d8%22%7d

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-
Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-
8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


API meeting: agenda

Carles Cufi
 


Network forum agenda

Jukka Rissanen
 


Porting GRBL to Zephyr

Lukasz Iwaszkiewicz
 

Hi all

I was wondering how to port some of the existing CNC suites to
Zephyr and I need your opinion on this. My idea was to take only (or
at least) g-code and stepper motor implementation from a project like
grbl, g2core (https://github.com/synthetos/g2) or Smoothieware
(https://github.com/Smoothieware/Smoothieware) and combine it with all
the goodies Zephyr has to offer, like USB support, disk access (SD
cards), FatFs, board abstraction and so on.

All of the projects mentioned above use a hardware timer (so far as my
analysis goes) which in it's ISR (whether when the timer overflows or
output compare event happens) performs some simple decisions which
motors to step and generates step pulses for those. This approach lets
them synchronize all the motors and achieve greater accuracy.

And so my main question arises : how to accomplish this in Zephyr. To
my knowledge there is no user space hardware timer API other than for
generating PWM. I have seen some PR's that aimed at implementing this
(I cannot find them now), but couldn't this be done using existing
APIs somehow? PS. We are talking about frequencies like at least 30kHz
but preferably higher and the number of motors is at least 3.

Iwasz.


Make smaller binary (disable .debug_info etc)

Martin Kozusky
 
Edited

Hi,
I am trying to figure out how to make the binary for nrf52dk_nrf52832 smaller, so I tried to look at zepyr.map with AMap and I am seeing so much .debug_info, .debug_line etc stuff in .map file.
I started playing with  hello_world and added
CONFIG_DEBUG=n
CONFIG_DEBUG_INFO=n
into prj.conf (nothing else there). But .debug_info etc. lines are still there, the only change is in size of modules (and the final binary, but I think debug data are not still completely removed)

ie. - with DEBUG=y, the biggest one is .debug_info for zephyr/kernel/libkernel.a module called from sched.c.obj) - 23 360B, with DEBUG=n, the size of module is 22 641 B
Why are .debug_info etc still included even with CONFIG_DEBUG=n ?

Is it possible to disable debug info completely? Or is it always removed when converting .elf into .bin ? If yes, can I get .map file, which will tell me exactly what is just in .bin file?

Thanks,
Martin


Switch between network interfaces during runtime (Offloaded modem/Ethernet) #driver #networking #stm32 #ethernet #modem

John Johnson
 

Hi Zephyr Users,

I wonder how I can make my app switch between which network interface it use during runtime. My idea is to automate the if-selection depending on which of the ifs that has a internet connection.

I have begun simply with using http_get sample and it works fine when I'm using the ifs one at the time. But when I compile in both of them Zephyr wants to use one of the ifs over the other. The setup I'm using is the STM32H747i_disco dev. kit with its built in ethernet-if (aka not offloaded) and Sparkfuns Ublox Sara R4 shield (which is offloaded).

Zephyr always chooses R4 in this sample even though I have set CONFIG_NET_DEFAULT_IF_ETHERNET in prj.conf. Zephyr sets up both my ifs and runs a DCHP request for the ethernet-if. When the sample is done with its HTTP
request (which it does over R4) I can send net cmds like DNS-requests and ping servers with the ethernet-if. Which leads me to believe that the ethernet-if is ready to use by the sample somehow.

So how can I make the sample tell Zephyr to use the ethernet-if instead of the R4?

Further more I'm a bit preplexed because to my untrained eye it seems that Zephyr don't support to use offloaded and non offloaded ifs at the same time from a BSD-socket perspective. When zsock_getaddrinfo() runs it first checks if
CONFIG_NET_SOCKETS_OFFLOAD is enabled and the does the DNS request on the offloaded-if, and thus wont use the internal DNS resolver (which comes after the offloaded check in the code).

Thank you in advance//
John Johnson


Re: Debugging Zephyr using no able to stop at specific source line after init.c #debugging

ngbk1993@...
 

I have tried to set a break point at where the zephyr start to halt at the fatal error function, and I'm able to trace where exactly the exception happened. It ends up to the ns16550 driver in my board, require the option CONFIG_UART_ACCESS_WORD_ONLY

https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_NS16550_ACCESS_WORD_ONLY.html


Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

Nikolaus Huber
 

Yes, that is what I though, the layout of the board is a bit strange. 

Thank you very much for your input! The idea of having a dedicated sensor thread has also occurred to me. We are using the Thunderboards for teaching a university course in embedded systems programming. I think this might actually be a nice example to introduce the idea of threads and mutual exclusion. 

Thank you again for your help!
/Nick

On 23 Nov 2020, at 16:38, Lawrence King <lawrence.king@...> wrote:

I just looked at the wiring for the Thunderboard Sense 2. It is crazy….
 
Normally all of the I2C  devices on a board are wired to a single I2C Bus. But the designers of the Thunderboard decided to connect to three different I2C busses, even though the chip only has two controllers. Hence you have ended up in the strange situation where you need to multiplex a single controller across at least 2 sets of pins. To be honest I have never seen this before, but it is what it is…
 
Sensor                Pins
Pressure             PC4-5
Gas                      PB6-7
Hall                     PB8-9
Light                   PC4-5
Humidity            PC4-5
 
I would start out by ignoring the hall sensor, then routing I2C_1 to PC4-5, and I2C_2 to PB6-7 and get all of your software running. Then go back and think about hacking the driver so you can flip I2C_2 between PB6-7 and PB8-9. Of course if you also have external I2C sensors on other pins life is even more difficult.
 
A better solution than hacking the driver I would be starting a sensor task that processes a work que. The work queue would contain requests for I2C read/write from the multiplexed sensors. The sensor task would get a request, reconfigure the mux (if necessary), complete the request and return the result, then work on the next request. Effectively the serial processing nature of the sensor task becomes your mutex, without the bother of trying to modify the Zephyr kernel. Since the hall and gas sensors are pretty slow, the overhead of the sensor task will be negligible.
 
Lawrence King
Principal Developer
+1(416)627-7302
 
From: Nikolaus Huber <nikolaus.huber@...> 
Sent: Monday, November 23, 2020 10:02 AM
To: Lawrence King <lawrence.king@...>
Cc: Adam Podogrocki <a.podogrocki@...>; Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c
 
Dear Lawrence, 
 
Thank you for your reply! Indeed, after rereading the data sheet I also realised my confusion. The problem with the rerouting however persists. The chip allows to reroute the SDA and SLC signal from either I2C peripheral dynamically during runtime by changing the location bitfields in the respective I2Cn_ROUTELOC0 registers. 
 
This means, that for example on the Thunderboard 2 Sense development board, different sensors are connected to the same I2C peripheral, but through different pins. So I need to change the ROUTELOC0 register every time before issuing a call to Zephyr’s i2c driver. I was just curious if that is something common, that I’m unaware of, and if there would be a general (i.e. Zephyr idiomatic) way of doing that. I have read through the i2c driver implementation for the Gecko chip family now, and it seems, that that is not really taken care of. So I guess one could do this either within the application code, or do it in the respective sensor driver. Ultimately, I guess it would be nice to change the i2c driver implementation to take care of this, since there probably needs to be some form of mutex between rerouting the i2c peripheral, issuing the call, and routing it back to where it was before, and that mutex is per peripheral. 
 
Thank you all very much for your replies! They really helped.
/Nick


On 23 Nov 2020, at 15:42, Lawrence King <lawrence.king@...> wrote:
 
Hi Nikolaus
 
I have yet to see a SOC that allows connecting one internal I2C controller to two sets of external pins at one time. Although theoretically possible it would be an unusual feature, and of very limited use. The usual solution is to have multiple I2C controllers in the SOC, and allow routing of each controller to various pins on the SOC package.
 
I just had a quick read through the Mighty Gecko datasheet. The processor has two I2C controllers, which in Zephyr parlance will be I2C_1 and I2C_2. You need to define both controllers and their physical pins in your device tree overlay. Then your software must open both controllers, and you must communicate with your peripherals through the correct I2C controller.
 
Hope this helps.
 
Lawrence King
Principal Developer
+1(416)627-7302
 
From: users@... <users@...> On Behalf Of Adam Podogrocki
Sent: Monday, November 23, 2020 2:47 AM
To: Nikolaus Huber <nikolaus.huber@...>
Cc: Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c
 
Hi Nikolaus,
 
I assume that your MCU allows alternative SDA/SCL configurations but not simultaneous, i.e. you can decide on which SDA/SCL pair of pins you can have I2C bus, but not on all pairs at the same time.
 
Cheers,
Adam
 
On Sat, 21 Nov 2020 at 00:52, Nikolaus Huber <nikolaus.huber@...> wrote:
Hej,  
 
Thanks for your reply! The specific chip on that board has two I2C peripherals. However, all the sensors I’m interested in are on one (i2c_1). The chip allows routing the same I2C peripheral to multiple pins, i.e. the same SDA and SCL line is available on different pins. Every set of (SDA, SCL) pins still needs to be configured though. For the two pins that are listed in the device tree (the one in the board.dts file just uses those that are connected to one specific sensor), this happens in the init function of the i2c driver. The other pins (which are theoretically also connected to that I2C peripheral) are thus never configured, therefore any sensors connected to them won’t work. I could probably configure those pins manually, but then that solution doesn’t seem very nice (i.e. I would need to adjust the device tree according to which set of sensors I want to reach for each application). So what I’m trying to achieve is, that whenever I do something like i2c_write(i2c_1_dev, …) this actually happens on all pins, that are connected to the i2c_1 peripheral. 
 
 
I’m asking if anyone maybe had a similar situation (it is the first time for me that a microcontroller allows routing the same signal to multiple pins), and how to do this so that it plays nicely with the zephyr API. 
 
Thank’s for your input again!
/Nick



On 21 Nov 2020, at 00:26, Erik Englund <erik.englund@...> wrote:
 
Hi.
 
It´s a bit unclear what you´re asking.
 
Most MCUs require you to define what pins to use for a specific peripheral, in your case i2c_1.
 
If  you have several I2C peripherals(in the MCU) you may connect sensors/other-chips to whatever pins are configurable to that peripheral.
 
Please elaborate what the problem is.
 
 

Med vänlig hälsning
Erik Englund


Innoware Development AB
Hyttvägen 13
73338 SALA

+46(0)707319440
Org.nr. 556790-2977
www.innoware.se
 








När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ 

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy


Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

Lawrence King
 

I just looked at the wiring for the Thunderboard Sense 2. It is crazy….

 

Normally all of the I2C  devices on a board are wired to a single I2C Bus. But the designers of the Thunderboard decided to connect to three different I2C busses, even though the chip only has two controllers. Hence you have ended up in the strange situation where you need to multiplex a single controller across at least 2 sets of pins. To be honest I have never seen this before, but it is what it is…

 

Sensor                Pins

Pressure             PC4-5

Gas                      PB6-7

Hall                     PB8-9

Light                   PC4-5

Humidity            PC4-5

 

I would start out by ignoring the hall sensor, then routing I2C_1 to PC4-5, and I2C_2 to PB6-7 and get all of your software running. Then go back and think about hacking the driver so you can flip I2C_2 between PB6-7 and PB8-9. Of course if you also have external I2C sensors on other pins life is even more difficult.

 

A better solution than hacking the driver I would be starting a sensor task that processes a work que. The work queue would contain requests for I2C read/write from the multiplexed sensors. The sensor task would get a request, reconfigure the mux (if necessary), complete the request and return the result, then work on the next request. Effectively the serial processing nature of the sensor task becomes your mutex, without the bother of trying to modify the Zephyr kernel. Since the hall and gas sensors are pretty slow, the overhead of the sensor task will be negligible.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: Nikolaus Huber <nikolaus.huber@...>
Sent: Monday, November 23, 2020 10:02 AM
To: Lawrence King <lawrence.king@...>
Cc: Adam Podogrocki <a.podogrocki@...>; Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

 

Dear Lawrence,

 

Thank you for your reply! Indeed, after rereading the data sheet I also realised my confusion. The problem with the rerouting however persists. The chip allows to reroute the SDA and SLC signal from either I2C peripheral dynamically during runtime by changing the location bitfields in the respective I2Cn_ROUTELOC0 registers. 

 

This means, that for example on the Thunderboard 2 Sense development board, different sensors are connected to the same I2C peripheral, but through different pins. So I need to change the ROUTELOC0 register every time before issuing a call to Zephyr’s i2c driver. I was just curious if that is something common, that I’m unaware of, and if there would be a general (i.e. Zephyr idiomatic) way of doing that. I have read through the i2c driver implementation for the Gecko chip family now, and it seems, that that is not really taken care of. So I guess one could do this either within the application code, or do it in the respective sensor driver. Ultimately, I guess it would be nice to change the i2c driver implementation to take care of this, since there probably needs to be some form of mutex between rerouting the i2c peripheral, issuing the call, and routing it back to where it was before, and that mutex is per peripheral. 

 

Thank you all very much for your replies! They really helped.

/Nick



On 23 Nov 2020, at 15:42, Lawrence King <lawrence.king@...> wrote:

 

Hi Nikolaus

 

I have yet to see a SOC that allows connecting one internal I2C controller to two sets of external pins at one time. Although theoretically possible it would be an unusual feature, and of very limited use. The usual solution is to have multiple I2C controllers in the SOC, and allow routing of each controller to various pins on the SOC package.

 

I just had a quick read through the Mighty Gecko datasheet. The processor has two I2C controllers, which in Zephyr parlance will be I2C_1 and I2C_2. You need to define both controllers and their physical pins in your device tree overlay. Then your software must open both controllers, and you must communicate with your peripherals through the correct I2C controller.

 

Hope this helps.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Adam Podogrocki
Sent: Monday, November 23, 2020 2:47 AM
To: Nikolaus Huber <nikolaus.huber@...>
Cc: Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

 

Hi Nikolaus,

 

I assume that your MCU allows alternative SDA/SCL configurations but not simultaneous, i.e. you can decide on which SDA/SCL pair of pins you can have I2C bus, but not on all pairs at the same time.

 

Cheers,

Adam

 

On Sat, 21 Nov 2020 at 00:52, Nikolaus Huber <nikolaus.huber@...> wrote:

Hej,  

 

Thanks for your reply! The specific chip on that board has two I2C peripherals. However, all the sensors I’m interested in are on one (i2c_1). The chip allows routing the same I2C peripheral to multiple pins, i.e. the same SDA and SCL line is available on different pins. Every set of (SDA, SCL) pins still needs to be configured though. For the two pins that are listed in the device tree (the one in the board.dts file just uses those that are connected to one specific sensor), this happens in the init function of the i2c driver. The other pins (which are theoretically also connected to that I2C peripheral) are thus never configured, therefore any sensors connected to them won’t work. I could probably configure those pins manually, but then that solution doesn’t seem very nice (i.e. I would need to adjust the device tree according to which set of sensors I want to reach for each application). So what I’m trying to achieve is, that whenever I do something like i2c_write(i2c_1_dev, …) this actually happens on all pins, that are connected to the i2c_1 peripheral. 

 

 

I’m asking if anyone maybe had a similar situation (it is the first time for me that a microcontroller allows routing the same signal to multiple pins), and how to do this so that it plays nicely with the zephyr API. 

 

Thank’s for your input again!

/Nick




On 21 Nov 2020, at 00:26, Erik Englund <erik.englund@...> wrote:

 

Hi.

 

It´s a bit unclear what you´re asking.

 

Most MCUs require you to define what pins to use for a specific peripheral, in your case i2c_1.

 

If  you have several I2C peripherals(in the MCU) you may connect sensors/other-chips to whatever pins are configurable to that peripheral.

 

Please elaborate what the problem is.

 

 


Med vänlig hälsning

Erik Englund


Innoware Development AB
Hyttvägen 13
73338 SALA

+46(0)707319440
Org.nr. 556790-2977
www.innoware.se

 









När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ 

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy

 


Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

Nikolaus Huber
 

Dear Lawrence,

Thank you for your reply! Indeed, after rereading the data sheet I also realised my confusion. The problem with the rerouting however persists. The chip allows to reroute the SDA and SLC signal from either I2C peripheral dynamically during runtime by changing the location bitfields in the respective I2Cn_ROUTELOC0 registers. 

This means, that for example on the Thunderboard 2 Sense development board, different sensors are connected to the same I2C peripheral, but through different pins. So I need to change the ROUTELOC0 register every time before issuing a call to Zephyr’s i2c driver. I was just curious if that is something common, that I’m unaware of, and if there would be a general (i.e. Zephyr idiomatic) way of doing that. I have read through the i2c driver implementation for the Gecko chip family now, and it seems, that that is not really taken care of. So I guess one could do this either within the application code, or do it in the respective sensor driver. Ultimately, I guess it would be nice to change the i2c driver implementation to take care of this, since there probably needs to be some form of mutex between rerouting the i2c peripheral, issuing the call, and routing it back to where it was before, and that mutex is per peripheral. 

Thank you all very much for your replies! They really helped.
/Nick

On 23 Nov 2020, at 15:42, Lawrence King <lawrence.king@...> wrote:

Hi Nikolaus
 
I have yet to see a SOC that allows connecting one internal I2C controller to two sets of external pins at one time. Although theoretically possible it would be an unusual feature, and of very limited use. The usual solution is to have multiple I2C controllers in the SOC, and allow routing of each controller to various pins on the SOC package.
 
I just had a quick read through the Mighty Gecko datasheet. The processor has two I2C controllers, which in Zephyr parlance will be I2C_1 and I2C_2. You need to define both controllers and their physical pins in your device tree overlay. Then your software must open both controllers, and you must communicate with your peripherals through the correct I2C controller.
 
Hope this helps.
 
Lawrence King
Principal Developer
+1(416)627-7302
 
From: users@... <users@...> On Behalf Of Adam Podogrocki
Sent: Monday, November 23, 2020 2:47 AM
To: Nikolaus Huber <nikolaus.huber@...>
Cc: Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c
 
Hi Nikolaus,
 
I assume that your MCU allows alternative SDA/SCL configurations but not simultaneous, i.e. you can decide on which SDA/SCL pair of pins you can have I2C bus, but not on all pairs at the same time.
 
Cheers,
Adam
 
On Sat, 21 Nov 2020 at 00:52, Nikolaus Huber <nikolaus.huber@...> wrote:
Hej,  
 
Thanks for your reply! The specific chip on that board has two I2C peripherals. However, all the sensors I’m interested in are on one (i2c_1). The chip allows routing the same I2C peripheral to multiple pins, i.e. the same SDA and SCL line is available on different pins. Every set of (SDA, SCL) pins still needs to be configured though. For the two pins that are listed in the device tree (the one in the board.dts file just uses those that are connected to one specific sensor), this happens in the init function of the i2c driver. The other pins (which are theoretically also connected to that I2C peripheral) are thus never configured, therefore any sensors connected to them won’t work. I could probably configure those pins manually, but then that solution doesn’t seem very nice (i.e. I would need to adjust the device tree according to which set of sensors I want to reach for each application). So what I’m trying to achieve is, that whenever I do something like i2c_write(i2c_1_dev, …) this actually happens on all pins, that are connected to the i2c_1 peripheral. 
 
 
I’m asking if anyone maybe had a similar situation (it is the first time for me that a microcontroller allows routing the same signal to multiple pins), and how to do this so that it plays nicely with the zephyr API. 
 
Thank’s for your input again!
/Nick


On 21 Nov 2020, at 00:26, Erik Englund <erik.englund@...> wrote:
 
Hi.
 
It´s a bit unclear what you´re asking.
 
Most MCUs require you to define what pins to use for a specific peripheral, in your case i2c_1.
 
If  you have several I2C peripherals(in the MCU) you may connect sensors/other-chips to whatever pins are configurable to that peripheral.
 
Please elaborate what the problem is.
 
 

Med vänlig hälsning
Erik Englund


Innoware Development AB
Hyttvägen 13
73338 SALA

+46(0)707319440
Org.nr. 556790-2977
www.innoware.se
 








När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ 

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy


Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

Lawrence King
 

Hi Nikolaus

 

I have yet to see a SOC that allows connecting one internal I2C controller to two sets of external pins at one time. Although theoretically possible it would be an unusual feature, and of very limited use. The usual solution is to have multiple I2C controllers in the SOC, and allow routing of each controller to various pins on the SOC package.

 

I just had a quick read through the Mighty Gecko datasheet. The processor has two I2C controllers, which in Zephyr parlance will be I2C_1 and I2C_2. You need to define both controllers and their physical pins in your device tree overlay. Then your software must open both controllers, and you must communicate with your peripherals through the correct I2C controller.

 

Hope this helps.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Adam Podogrocki
Sent: Monday, November 23, 2020 2:47 AM
To: Nikolaus Huber <nikolaus.huber@...>
Cc: Erik Englund <erik.englund@...>; users@...
Subject: Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

 

Hi Nikolaus,

 

I assume that your MCU allows alternative SDA/SCL configurations but not simultaneous, i.e. you can decide on which SDA/SCL pair of pins you can have I2C bus, but not on all pairs at the same time.

 

Cheers,

Adam

 

On Sat, 21 Nov 2020 at 00:52, Nikolaus Huber <nikolaus.huber@...> wrote:

Hej, 

 

Thanks for your reply! The specific chip on that board has two I2C peripherals. However, all the sensors I’m interested in are on one (i2c_1). The chip allows routing the same I2C peripheral to multiple pins, i.e. the same SDA and SCL line is available on different pins. Every set of (SDA, SCL) pins still needs to be configured though. For the two pins that are listed in the device tree (the one in the board.dts file just uses those that are connected to one specific sensor), this happens in the init function of the i2c driver. The other pins (which are theoretically also connected to that I2C peripheral) are thus never configured, therefore any sensors connected to them won’t work. I could probably configure those pins manually, but then that solution doesn’t seem very nice (i.e. I would need to adjust the device tree according to which set of sensors I want to reach for each application). So what I’m trying to achieve is, that whenever I do something like i2c_write(i2c_1_dev, …) this actually happens on all pins, that are connected to the i2c_1 peripheral. 

 

 

I’m asking if anyone maybe had a similar situation (it is the first time for me that a microcontroller allows routing the same signal to multiple pins), and how to do this so that it plays nicely with the zephyr API. 

 

Thank’s for your input again!

/Nick



On 21 Nov 2020, at 00:26, Erik Englund <erik.englund@...> wrote:

 

Hi.

 

It´s a bit unclear what you´re asking.

 

Most MCUs require you to define what pins to use for a specific peripheral, in your case i2c_1.

 

If  you have several I2C peripherals(in the MCU) you may connect sensors/other-chips to whatever pins are configurable to that peripheral.

 

Please elaborate what the problem is.

 

 


Med vänlig hälsning

Erik Englund


Innoware Development AB
Hyttvägen 13
73338 SALA

+46(0)707319440
Org.nr. 556790-2977
www.innoware.se

 









När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy


Re: Private: Re: [Zephyr-users] Same I2C bus on different pins #driver #i2c

Adam Podogrocki
 

Hi Nikolaus,

I assume that your MCU allows alternative SDA/SCL configurations but not simultaneous, i.e. you can decide on which SDA/SCL pair of pins you can have I2C bus, but not on all pairs at the same time.

Cheers,
Adam


On Sat, 21 Nov 2020 at 00:52, Nikolaus Huber <nikolaus.huber@...> wrote:
Hej, 

Thanks for your reply! The specific chip on that board has two I2C peripherals. However, all the sensors I’m interested in are on one (i2c_1). The chip allows routing the same I2C peripheral to multiple pins, i.e. the same SDA and SCL line is available on different pins. Every set of (SDA, SCL) pins still needs to be configured though. For the two pins that are listed in the device tree (the one in the board.dts file just uses those that are connected to one specific sensor), this happens in the init function of the i2c driver. The other pins (which are theoretically also connected to that I2C peripheral) are thus never configured, therefore any sensors connected to them won’t work. I could probably configure those pins manually, but then that solution doesn’t seem very nice (i.e. I would need to adjust the device tree according to which set of sensors I want to reach for each application). So what I’m trying to achieve is, that whenever I do something like i2c_write(i2c_1_dev, …) this actually happens on all pins, that are connected to the i2c_1 peripheral. 
 

I’m asking if anyone maybe had a similar situation (it is the first time for me that a microcontroller allows routing the same signal to multiple pins), and how to do this so that it plays nicely with the zephyr API. 

Thank’s for your input again!
/Nick

On 21 Nov 2020, at 00:26, Erik Englund <erik.englund@...> wrote:

Hi.

It´s a bit unclear what you´re asking.

Most MCUs require you to define what pins to use for a specific peripheral, in your case i2c_1.

If  you have several I2C peripherals(in the MCU) you may connect sensors/other-chips to whatever pins are configurable to that peripheral.

Please elaborate what the problem is.



Med vänlig hälsning
Erik Englund

Innoware Development AB
Hyttvägen 13
73338 SALA

+46(0)707319440
Org.nr. 556790-2977
www.innoware.se









När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy

341 - 360 of 2694