Date   

Zephyr API discussion weekly call

Carles Cufi
 

Hi all,

During the API call today we followed-up on the ADC and WDT APIs which are now getting more mature and will hopefully be soon ready for merging.

We still need someone to take ownership of the I2C API at this point. The list of issues to address can be found summarized here:

https://github.com/zephyrproject-rtos/zephyr/issues/4040

If you think you can help out improving the I2C API please let us know.

As always, more information in the umbrella GitHub issue:

https://github.com/zephyrproject-rtos/zephyr/issues/5697

and in the meeting minutes:

https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk

Thanks,

Carles


Re: How to evaluate the "zephyr\samples\bluetooth\mesh"?

vikrant8051 <vikrant8051@...>
 

Hi Aaron,

This may help you,



You could provision your node based on above example using either #meshctl utility from BlueZ 5.49 or Silicon Labs #BluetoothMesh Android App.

Regards,
vikrant

On Tue, Apr 17, 2018, 1:46 PM Aaron Xu <overheat1984@...> wrote:
Hi,

I follow the "Eclipse debugging" instructions, which can be found here:

And I tried some bluetooth samples in zephyr on NORDIC pca10040 board, like Beacon, mesh demo, they are works.

But those message keep printing on my terminal(serial), when I try the "zephyr\samples\bluetooth\mesh"

***** Booting Zephyr OS v1.11.0-710-g09a8810b3 *****
Initializing...
[bt] [INF] hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[bt] [INF] hci_vs_init: HW Variant: nRF52x (0x0002)
[bt] [INF] hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 1.11 Build 99
[bt] [INF] show_dev_info: Identity: ee:ef:34:8d:7f:97 (random)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x05f1
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0xffff
Bluetooth initialized
[bt] [INF] bt_mesh_prov_init: Device UUID: 00000000-0000-0000-0000-00000000dddd
Mesh initialized
adv stack (real size 812):      unused 516      usage 296 / 812 (36 %)
Kernel stacks:
main      (real size 512):      unused 276      usage 236 / 512 (46 %)
idle      (real size 320):      unused 272      usage 48 / 320 (15 %)
interrupt (real size 2048):     unused 1648     usage 400 / 2048 (19 %)
workqueue (real size 2048):     unused 1736     usage 312 / 2048 (15 %)
ecc stack (real size 1324):     unused 448      usage 876 / 1324 (66 %)
prio recv thread stack (real size 748): unused 632      usage 116 / 748 (15 %)
recv thread stack (real size 2348):     unused 2136     usage 212 / 2348 (9 %)
adv stack (real size 812):      unused 472      usage 340 / 812 (41 %)
Kernel stacks:
...
Kernel stacks:
...
 
I can see those printf information in the red, look it works. but what's the next coming information?
What should I do next? flash more then one board?
Please give me some advise or a documentation, I will appreciate it! 

Regards,
Aaron




Re: Core407V STM32F407VET6 Board Definition Help Needed

Yannis Damigos
 

Hi Warren,

in your _defconfig file you set "CONFIG_SOC_STM32F407XX=y".

But, the SOC_STM32F407XX is undefined as it mentioned in your cmake output:

/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4:
warning: attempt to assign the value "y" to the undefined symbol
SOC_STM32F407XX

Could you try with SOC_STM32F407XG?

Yannis

On Sat, Apr 14, 2018 at 5:18 AM Warren Gay <ve3wwg@gmail.com> wrote:

I am in need of help for developing a board description for the Core407V,
with a stm32f407vet6 chip.

https://www.waveshare.com/wiki/Core407V
This board seems similar to the existing olimex_stm32_e407, with the
following immediate differences:

The Core407V has
two LEDs on PA6 and PA7,
two user push buttons on PE4 (k0) and PE3 (k1)
There is also a wakeup button k_up on PA0, which I didn't compare.
I have edited my own board.h file, but having difficulty with the cmake
stuff:

I tried to clone a core407v_stm32f407 board from the olimex_stm32_e407,
but running into problems. The first of which is this:

$ mkdir build && cd build
$ cmake ..
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.3",
minimum required is "3.4")
-- Selected BOARD core407v_stm32f407
Zephyr version: 1.11.99
Parsing Kconfig tree in /home/wwg/zephyr/Kconfig
Using
/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig
as base
Merging /home/wwg/zsrc/blinky/prj.conf
warning: BOARD_CORE407V_STM32F407 (defined at
/home/wwg/zephyr/boards/arm/core407v_stm32f407/Kconfig.board:7) was
assigned the value "y" but got the value "n" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the
value "168" but got the value "336" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the
value "168" but got the value "336" -- check dependencies

/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4:
warning: attempt to assign the value "y" to the undefined symbol
SOC_STM32F407XX
/home/wwg/zsrc/blinky/prj.conf:2: warning: CONSOLE (defined at
/home/wwg/zephyr/drivers/console/Kconfig:10) set more than once. Old value:
"y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:6: warning: UART_CONSOLE (defined at
/home/wwg/zephyr/drivers/console/Kconfig:40) set more than once. Old value:
"y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:7: warning: SERIAL (defined at
/home/wwg/zephyr/drivers/serial/Kconfig:9) set more than once. Old value:
"y", new value: "y".
warning: user value 168 on the int symbol CLOCK_STM32_PLL_N_MULTIPLIER
(defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) ignored due to
being outside the active range ([192, 432]) -- falling back on defaults
-- Generating zephyr/include/generated/generated_dts_board.h
Error: core407v_stm32f407.dts.pre.tmp:257.21-22 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /home/wwg/zephyr/cmake/dts.cmake:83 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/wwg/zephyr/cmake/app/boilerplate.cmake:260 (include)
CMakeLists.txt:3 (include)
-- Configuring incomplete, errors occurred!
The intended clock is 168 MHz, with 8 MHz HSE crystal. The top of the
_defconfig file is:

CONFIG_ARM=y
CONFIG_BOARD_CORE407V_STM32F407=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XX=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
# Enable MPU
CONFIG_STM32_ARM_MPU_ENABLE=y
CONFIG_SERIAL=y
# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# enable pinmux
CONFIG_PINMUX=y
# enable GPIO
CONFIG_GPIO=y
# clock configuration
CONFIG_CLOCK_CONTROL=y
# Clock configuration for Cube Clock control driver
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
# produce 168MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=6
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=168
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
CONFIG_CLOCK_STM32_APB1_PRESCALER=4
CONFIG_CLOCK_STM32_APB2_PRESCALER=2
I used the existing value for the MULTIPLIER. Hints for correcting these
errors would be appreciated.

Warren


Re: Core407V STM32F407VET6 Board Definition Help Needed

Erwan Gouriou
 

Hi Warren,

Looking to the log, it seems that there is an issue in your board definition:
warning: BOARD_CORE407V_STM32F407 (defined at /home/wwg/zephyr/boards/arm/core407v_stm32f407/Kconfig.board:7) was assigned the value "y" but got the value "n" -- check dependencies

This means that somehow, this config flag is re-written, and hence, Kconfig.board, .defconfig and _defconfig won't apply (and then you get wrong values).
I suggest to investigate your board configuration procedure, clean existing previous configuration builds..

Also, you can share your code in github and we'll be able to have a look.

Erwan

On 14 April 2018 at 04:18, Warren Gay <ve3wwg@...> wrote:
I am in need of help for developing a board description for the Core407V, with a stm32f407vet6 chip.

  https://www.waveshare.com/wiki/Core407V

This board seems similar to the existing olimex_stm32_e407, with the following immediate differences:

The Core407V has 
  • two LEDs on PA6 and PA7,
  • two user push buttons on PE4 (k0) and PE3 (k1)
  • There is also a wakeup button k_up on PA0, which I didn't compare.
I have edited my own board.h file, but having difficulty with the cmake stuff:

I tried to clone a core407v_stm32f407 board from the olimex_stm32_e407, but running into problems. The first of which is this:

$ mkdir build && cd build
$ cmake ..
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.3", minimum required is "3.4") 
-- Selected BOARD core407v_stm32f407
Zephyr version: 1.11.99
Parsing Kconfig tree in /home/wwg/zephyr/Kconfig
Using /home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig as base
Merging /home/wwg/zsrc/blinky/prj.conf
warning: BOARD_CORE407V_STM32F407 (defined at /home/wwg/zephyr/boards/arm/core407v_stm32f407/Kconfig.board:7) was assigned the value "y" but got the value "n" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the value "168" but got the value "336" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the value "168" but got the value "336" -- check dependencies
/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4: warning: attempt to assign the value "y" to the undefined symbol SOC_STM32F407XX
/home/wwg/zsrc/blinky/prj.conf:2: warning: CONSOLE (defined at /home/wwg/zephyr/drivers/console/Kconfig:10) set more than once. Old value: "y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:6: warning: UART_CONSOLE (defined at /home/wwg/zephyr/drivers/console/Kconfig:40) set more than once. Old value: "y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:7: warning: SERIAL (defined at /home/wwg/zephyr/drivers/serial/Kconfig:9) set more than once. Old value: "y", new value: "y".
warning: user value 168 on the int symbol CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) ignored due to being outside the active range ([192, 432]) -- falling back on defaults
-- Generating zephyr/include/generated/generated_dts_board.h
Error: core407v_stm32f407.dts.pre.tmp:257.21-22 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /home/wwg/zephyr/cmake/dts.cmake:83 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/wwg/zephyr/cmake/app/boilerplate.cmake:260 (include)
  CMakeLists.txt:3 (include)

-- Configuring incomplete, errors occurred!

The intended clock is 168 MHz, with 8 MHz HSE crystal. The top of the _defconfig file is:

CONFIG_ARM=y
CONFIG_BOARD_CORE407V_STM32F407=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XX=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

# Enable MPU
CONFIG_STM32_ARM_MPU_ENABLE=y

CONFIG_SERIAL=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable pinmux
CONFIG_PINMUX=y

# enable GPIO
CONFIG_GPIO=y

# clock configuration
CONFIG_CLOCK_CONTROL=y

# Clock configuration for Cube Clock control driver
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
# produce 168MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=6
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=168
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
CONFIG_CLOCK_STM32_APB1_PRESCALER=4
CONFIG_CLOCK_STM32_APB2_PRESCALER=2

I used the existing value for the MULTIPLIER. Hints for correcting these errors would be appreciated.

Warren



How to evaluate the "zephyr\samples\bluetooth\mesh"?

Aaron Xu
 

Hi,

I follow the "Eclipse debugging" instructions, which can be found here:

And I tried some bluetooth samples in zephyr on NORDIC pca10040 board, like Beacon, mesh demo, they are works.

But those message keep printing on my terminal(serial), when I try the "zephyr\samples\bluetooth\mesh"

***** Booting Zephyr OS v1.11.0-710-g09a8810b3 *****
Initializing...
[bt] [INF] hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[bt] [INF] hci_vs_init: HW Variant: nRF52x (0x0002)
[bt] [INF] hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 1.11 Build 99
[bt] [INF] show_dev_info: Identity: ee:ef:34:8d:7f:97 (random)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x05f1
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0xffff
Bluetooth initialized
[bt] [INF] bt_mesh_prov_init: Device UUID: 00000000-0000-0000-0000-00000000dddd
Mesh initialized
adv stack (real size 812):      unused 516      usage 296 / 812 (36 %)
Kernel stacks:
main      (real size 512):      unused 276      usage 236 / 512 (46 %)
idle      (real size 320):      unused 272      usage 48 / 320 (15 %)
interrupt (real size 2048):     unused 1648     usage 400 / 2048 (19 %)
workqueue (real size 2048):     unused 1736     usage 312 / 2048 (15 %)
ecc stack (real size 1324):     unused 448      usage 876 / 1324 (66 %)
prio recv thread stack (real size 748): unused 632      usage 116 / 748 (15 %)
recv thread stack (real size 2348):     unused 2136     usage 212 / 2348 (9 %)
adv stack (real size 812):      unused 472      usage 340 / 812 (41 %)
Kernel stacks:
...
Kernel stacks:
...
 
I can see those printf information in the red, look it works. but what's the next coming information?
What should I do next? flash more then one board?
Please give me some advise or a documentation, I will appreciate it! 

Regards,
Aaron




no connection ethernet with a stm32f407 discovery board and a enc28j60 module

clemence
 

Hi,

I tried the samples/net/echo_server.c with quemu and it works.

I try to do the same example with a stm32f407 discovery board and a enc28j60 module but it does not work.

First, I plug my pc and my board on a "D-LINK: DGS-108" switch. I use a a direct cable to plug my pc and my board to the switch (not a crossover cable).

I put a route to my pc with:

sudo ip route add 192.0.2.0 dev enxa44cc8e28bfb
sudo ip addr add 192.0.2.2 dev enxa44cc8e28bfb

Then I execute the code with "cmake -GNinja -DBOARD=stm32f4_disco ..". There is no error.

I flash on the board with "ninja flash". There is no error message display on my console.

When I do a "telnet 192.0.2.1", the connection is not made. I also try to make "ping 192.0.2.1" and it does not work.

Thanks to the net-shell, I get this information (iface) :

Interface 0x20008b60 (Ethernet) [0]
===================================
Link addr : 00:04:A3:2D:30:36
MTU       : 1500
IPv6 unicast addresses (max 3):
        fe80::204:a3ff:fe2d:3036 autoconf preferred infinite
        2001:db8::1 manual preferred infinite
IPv6 multicast addresses (max 2):
        ff02::1
        ff02::1:ff2d:3036
IPv6 prefixes (max 2):
        <none>
IPv6 hop limit           : 64
IPv6 base reachable time : 30000
IPv6 reachable time      : 33652
IPv6 retransmit timer    : 0
IPv4 unicast addresses (max 3):
        192.0.2.1 manual preferred infinite
IPv4 multicast addresses (max 1):
        <none>
IPv4 gateway : 0.0.0.0
IPv4 netmask : 255.255.255.0


Information about the connection (conn)

     Context    Iface         Flags Local               Remote
[ 1] 0x2000057c 0x20008b60    4ST   0.0.0.0:23  0.0.0.0:0
[ 2] 0x200005dc 0x20008b60    6ST   [::]:23     [::]:0

TCP        Context   Src port Dst port   Send-Seq   Send-Ack  MSS
0x200011f4 0x2000057c      23        0 4176526892          0 1460
0x200012d4 0x200005dc      23        0 2871080412          0 1440


Information about the memory (mem)

Fragment length 128 bytes
Network buffer pools:
(CONFIG_NET_BUF_POOL_USAGE to see free #s)
Address         Total   Name
0x20008a6c      14      RX
0x20008a88      14      TX
0x20008b1c      36      RX DATA
0x20008b3c      36      TX DATA


Information about the HTTP

Enable CONFIG_NET_DEBUG_HTTP_CONN and CONFIG_HTTP_SERVER to get HTTP server connection information


What can I do to make it work, please ?

Thanks

Clemence


Re: samples/net/echo_server.c does not work with a stm32f407 discovery board and a enc28j60 module

Jukka Rissanen
 

Hi Clemence,

I do not have that stm32 board to try. But what you are describing
should work. Note that there was some enc28j60 fixes submitted last
week and they are already merged to master, so make sure you are
working with latest upstream.

Have you tried to connect using IPv6? So try "ping 2001:db8::1" from
your host to ping to the device.

Have you tried to ping your host from net-shell in zephyr? So "net ping
192.0.2.2", does that packet go through to your linux host?

Make also sure that your firewall rules do not cause packets to be
dropped. The configuration in your D-Link could also cause some issues
especially if you are in different sub-net according to its
configuration.
For these reasons I have been testing ethernet connectivity with a non-
managed ethernet switch so that all traffic is passing through. For
monitoring the ethernet traffic, I have an old ethernet hub that has
been very useful.


Cheers,
Jukka

On Mon, 2018-04-16 at 10:24 +0200, clemence wrote:
Hi,

I tried the samples/net/echo_server.c with quemu and it works.

I try to do the same example with a stm32f407 discovery board and a
enc28j60 module but it does not work.

First, I plug my pc and my board on a "D-LINK: DGS-108" switch. I use
a
a direct cable to plug my pc and my board to the switch (not a
crossover
cable).

Then, I add some configuration in prj.conf :

CONFIG_PRINTK=y

CONFIG_NETWORKING=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_ARP=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y

CONFIG_NET_DHCPV4=n
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=2
CONFIG_NET_MAX_CONTEXTS=10

CONFIG_TEST_RANDOM_GENERATOR=y

CONFIG_INIT_STACKS=y

CONFIG_SYS_LOG=y
CONFIG_NET_BUF_LOG=n
CONFIG_SYS_LOG_NET_BUF_LEVEL=2
CONFIG_NET_LOG=n
CONFIG_NET_LOG_GLOBAL=y
CONFIG_SYS_LOG_NET_LEVEL=2
CONFIG_SYS_LOG_SHOW_COLOR=y

CONFIG_NET_APP_SETTINGS=y
CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1"

CONFIG_NET_SHELL=y
CONFIG_KERNEL_SHELL=y

CONFIG_TELNET_CONSOLE=y
CONFIG_SYS_LOG_TELNET_CONSOLE_LEVEL=1

#Add to work on teh board stm32f4

# IP Stack Configuration
CONFIG_NET_ARP=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_BUF=y
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
#CONFIG_NET_SOCKETS=y
#CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

# ENC28J60 Ethernet Device
CONFIG_NET_DEFAULT_IF_ETHERNET=y
CONFIG_ETH_ENC28J60=y
CONFIG_ETH_ENC28J60_0=y
CONFIG_ETH_ENC28J60_0_SPI_PORT_NAME="SPI_1"
CONFIG_ETH_ENC28J60_0_MAC3=0x2D
CONFIG_ETH_ENC28J60_0_MAC4=0x30
CONFIG_ETH_ENC28J60_0_MAC5=0x36
CONFIG_ETH_ENC28J60_0_GPIO_PORT_NAME="GPIOA"
CONFIG_ETH_ENC28J60_0_GPIO_PIN=3
CONFIG_ETH_ENC28J60_0_SPI_BUS_FREQ=2000000
CONFIG_ETH_ENC28J60_0_SLAVE=1
CONFIG_ETH_EN28J60_0_FULL_DUPLEX=y
CONFIG_ETH_EN28J60_TIMEOUT=100
#CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS=y
#CONFIG_ETH_ENC28J60_0_SPI_CS_PORT_NAME="GPIOA"
#CONFIG_ETH_ENC28J60_0_SPI_CS_PIN=4

# SPI
CONFIG_SPI=y
CONFIG_SPI_STM32=y
CONFIG_SOC_FAMILY_STM32=y
CONFIG_SPI_STM32_HAS_FIFO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SPI_STM32_INTERRUPT=y
CONFIG_SPI_INIT_PRIORITY=70
CONFIG_SYS_LOG_SPI_LEVEL=2
CONFIG_SPI_CS_GPIO=y
CONFIG_SPI_1=y
CONFIG_SPI_1_NAME="SPI_1"
CONFIG_HAS_DTS_SPI=y
CONFIG_SPI_1_IRQ_PRI=0
#CONFIG_SPI_1_DEFAULT_CFG=0x80
#CONFIG_SPI_1_DEFAULT_BAUD_RATE=500000
#CONFIG_SPI_1_CS_GPIO_PORT="GPIOA"
#CONFIG_SPI_1_CS_GPIO_PIN=4

# Stm32f4discovery
#CONFIG_TELNET_CONSOLE_DEBUG_DEEP=y
#CONFIG_NET_DEBUG_IF=y
#CONFIG_SYS_LOG=y
#CONFIG_NET_LOG=y
#CONFIG_SYS_LOG_NET_LEVEL=4
#CONFIG_SYS_LOG_SHOW_COLOR=y


I add a router and a address on my pc:

sudo ip route add 192.0.2.0 dev enxa44cc8e28bfb

sudo ip addr add 192.0.2.2 dev enxa44cc8e28bfb


Then I execute the code with "cmake -GNinja -DBOARD=stm32f4_disco
..".
There is no error.

I flash on the board with "ninja flash". There is no error message
display on my console.

When I do a "telnet 192.0.2.1", the connection is not made. I also
try
to make "ping 192.0.2.1" and it does not work.

I try to do the same without the switch (plug my pc direcly to the
board) and it does not work.

What can I do to make it work, please ?

Thanks

Clemence




Re: Zephyr API discussion weekly call

Carles Cufi
 

Friendly reminder of the weekly API discussion call which takes place tomorrow.

Details below.

------

The Zephyr API weekly calls take place on Tuesdays. Everybody is welcome to join, and you can find all the relevant details here:

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion

Next week we will be discussing the current ADC and Watchdog API reworks, and we are also looking for an owner to the I2C API rework to join the call and take ownership of it. I have copied people involved in the current I2C PRs, but feel free to forward this to anyone who might be interested.

If you want to contribute on any of the items above please join next week. Additional details regarding the current issues being discussed in the calls can be found in the umbrella GitHub issue:

https://github.com/zephyrproject-rtos/zephyr/issues/5697

and in the meeting minutes:

https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk


samples/net/echo_server.c does not work with a stm32f407 discovery board and a enc28j60 module

clemence
 

Hi,

I tried the samples/net/echo_server.c with quemu and it works.

I try to do the same example with a stm32f407 discovery board and a enc28j60 module but it does not work.

First, I plug my pc and my board on a "D-LINK: DGS-108" switch. I use a a direct cable to plug my pc and my board to the switch (not a crossover cable).

Then, I add some configuration in prj.conf :

CONFIG_PRINTK=y

CONFIG_NETWORKING=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_ARP=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y

CONFIG_NET_DHCPV4=n
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=2
CONFIG_NET_MAX_CONTEXTS=10

CONFIG_TEST_RANDOM_GENERATOR=y

CONFIG_INIT_STACKS=y

CONFIG_SYS_LOG=y
CONFIG_NET_BUF_LOG=n
CONFIG_SYS_LOG_NET_BUF_LEVEL=2
CONFIG_NET_LOG=n
CONFIG_NET_LOG_GLOBAL=y
CONFIG_SYS_LOG_NET_LEVEL=2
CONFIG_SYS_LOG_SHOW_COLOR=y

CONFIG_NET_APP_SETTINGS=y
CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1"

CONFIG_NET_SHELL=y
CONFIG_KERNEL_SHELL=y

CONFIG_TELNET_CONSOLE=y
CONFIG_SYS_LOG_TELNET_CONSOLE_LEVEL=1

#Add to work on teh board stm32f4

# IP Stack Configuration
CONFIG_NET_ARP=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_BUF=y
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
#CONFIG_NET_SOCKETS=y
#CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

# ENC28J60 Ethernet Device
CONFIG_NET_DEFAULT_IF_ETHERNET=y
CONFIG_ETH_ENC28J60=y
CONFIG_ETH_ENC28J60_0=y
CONFIG_ETH_ENC28J60_0_SPI_PORT_NAME="SPI_1"
CONFIG_ETH_ENC28J60_0_MAC3=0x2D
CONFIG_ETH_ENC28J60_0_MAC4=0x30
CONFIG_ETH_ENC28J60_0_MAC5=0x36
CONFIG_ETH_ENC28J60_0_GPIO_PORT_NAME="GPIOA"
CONFIG_ETH_ENC28J60_0_GPIO_PIN=3
CONFIG_ETH_ENC28J60_0_SPI_BUS_FREQ=2000000
CONFIG_ETH_ENC28J60_0_SLAVE=1
CONFIG_ETH_EN28J60_0_FULL_DUPLEX=y
CONFIG_ETH_EN28J60_TIMEOUT=100
#CONFIG_ETH_ENC28J60_0_GPIO_SPI_CS=y
#CONFIG_ETH_ENC28J60_0_SPI_CS_PORT_NAME="GPIOA"
#CONFIG_ETH_ENC28J60_0_SPI_CS_PIN=4

# SPI
CONFIG_SPI=y
CONFIG_SPI_STM32=y
CONFIG_SOC_FAMILY_STM32=y
CONFIG_SPI_STM32_HAS_FIFO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SPI_STM32_INTERRUPT=y
CONFIG_SPI_INIT_PRIORITY=70
CONFIG_SYS_LOG_SPI_LEVEL=2
CONFIG_SPI_CS_GPIO=y
CONFIG_SPI_1=y
CONFIG_SPI_1_NAME="SPI_1"
CONFIG_HAS_DTS_SPI=y
CONFIG_SPI_1_IRQ_PRI=0
#CONFIG_SPI_1_DEFAULT_CFG=0x80
#CONFIG_SPI_1_DEFAULT_BAUD_RATE=500000
#CONFIG_SPI_1_CS_GPIO_PORT="GPIOA"
#CONFIG_SPI_1_CS_GPIO_PIN=4

# Stm32f4discovery
#CONFIG_TELNET_CONSOLE_DEBUG_DEEP=y
#CONFIG_NET_DEBUG_IF=y
#CONFIG_SYS_LOG=y
#CONFIG_NET_LOG=y
#CONFIG_SYS_LOG_NET_LEVEL=4
#CONFIG_SYS_LOG_SHOW_COLOR=y


I add a router and a address on my pc:

sudo ip route add 192.0.2.0 dev enxa44cc8e28bfb

sudo  ip addr add 192.0.2.2 dev enxa44cc8e28bfb


Then I execute the code with "cmake -GNinja -DBOARD=stm32f4_disco ..". There is no error.

I flash on the board with "ninja flash". There is no error message display on my console.

When I do a "telnet 192.0.2.1", the connection is not made. I also try to make "ping 192.0.2.1" and it does not work.

I try to do the same without the switch (plug my pc direcly to the board) and it does not work.

What can I do to make it work, please ?

Thanks

Clemence


Re: [Zephyr-users] Device Firmware Update + Zephyr + #bluetoothmesh

Rodrigo Peixoto
 

That is great Vikrant.

I was thinking they couldn't work together. I will do as you said.

Thank you. 

Best regards,
Rodrigo Peixoto 

Ayna - [Embedded systems design house]


On Sat, 14 Apr 2018 at 02:49 Vikrant More <vikrant8051@...> wrote:


On Sat, Apr 14, 2018, 11:18 AM Vikrant More <vikrant8051@...> wrote:
Hi Rodrigo,

You can start with this,


You have to integrate SMP_Server demo example in your current #BluetoothMesh project.

It will be tedious process, so my advice is to start with simple example.

For example, edit $zephyr/samples/subsys/mgmt/mcumgr/smp_svr so that it will blink LED1 on your board & flash it along with mcuboot as per link I have provided.

Then re-edit same smp_svr, so that it will blink LED2 on your board & now try to upgrade this using #DFU_OTA feature. This will help you lot to understand over all process. 

Regards, 
vikrant

On Sat, Apr 14, 2018, 3:07 AM Rodrigo Peixoto <rodrigopex@...> wrote:

Hi guys,

is it possible to use the Nordic DFU feature in conjunction to Zephyr. I need to upgrade the nodes of a BT mesh network and it would be amazing if I could.

If it isn't, is there any alternative to that?

Thank you. Best regards,

Rodrigo Peixoto. Ayna - [Embedded systems design house]


Re: [Zephyr-users] Device Firmware Update + Zephyr + #bluetoothmesh

vikrant8051 <vikrant8051@...>
 



On Sat, Apr 14, 2018, 11:18 AM Vikrant More <vikrant8051@...> wrote:
Hi Rodrigo,

You can start with this,


You have to integrate SMP_Server demo example in your current #BluetoothMesh project.

It will be tedious process, so my advice is to start with simple example.

For example, edit $zephyr/samples/subsys/mgmt/mcumgr/smp_svr so that it will blink LED1 on your board & flash it along with mcuboot as per link I have provided.

Then re-edit same smp_svr, so that it will blink LED2 on your board & now try to upgrade this using #DFU_OTA feature. This will help you lot to understand over all process. 

Regards, 
vikrant

On Sat, Apr 14, 2018, 3:07 AM Rodrigo Peixoto <rodrigopex@...> wrote:

Hi guys,

is it possible to use the Nordic DFU feature in conjunction to Zephyr. I need to upgrade the nodes of a BT mesh network and it would be amazing if I could.

If it isn't, is there any alternative to that?

Thank you. Best regards,

Rodrigo Peixoto. Ayna - [Embedded systems design house]


Core407V STM32F407VET6 Board Definition Help Needed

ve3wwg@...
 

I am in need of help for developing a board description for the Core407V, with a stm32f407vet6 chip.

  https://www.waveshare.com/wiki/Core407V

This board seems similar to the existing olimex_stm32_e407, with the following immediate differences:

The Core407V has 
  • two LEDs on PA6 and PA7,
  • two user push buttons on PE4 (k0) and PE3 (k1)
  • There is also a wakeup button k_up on PA0, which I didn't compare.
I have edited my own board.h file, but having difficulty with the cmake stuff:

I tried to clone a core407v_stm32f407 board from the olimex_stm32_e407, but running into problems. The first of which is this:

$ mkdir build && cd build
$ cmake ..
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.3", minimum required is "3.4") 
-- Selected BOARD core407v_stm32f407
Zephyr version: 1.11.99
Parsing Kconfig tree in /home/wwg/zephyr/Kconfig
Using /home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig as base
Merging /home/wwg/zsrc/blinky/prj.conf
warning: BOARD_CORE407V_STM32F407 (defined at /home/wwg/zephyr/boards/arm/core407v_stm32f407/Kconfig.board:7) was assigned the value "y" but got the value "n" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the value "168" but got the value "336" -- check dependencies
warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the value "168" but got the value "336" -- check dependencies
/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4: warning: attempt to assign the value "y" to the undefined symbol SOC_STM32F407XX
/home/wwg/zsrc/blinky/prj.conf:2: warning: CONSOLE (defined at /home/wwg/zephyr/drivers/console/Kconfig:10) set more than once. Old value: "y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:6: warning: UART_CONSOLE (defined at /home/wwg/zephyr/drivers/console/Kconfig:40) set more than once. Old value: "y", new value: "y".
/home/wwg/zsrc/blinky/prj.conf:7: warning: SERIAL (defined at /home/wwg/zephyr/drivers/serial/Kconfig:9) set more than once. Old value: "y", new value: "y".
warning: user value 168 on the int symbol CLOCK_STM32_PLL_N_MULTIPLIER (defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217, /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) ignored due to being outside the active range ([192, 432]) -- falling back on defaults
-- Generating zephyr/include/generated/generated_dts_board.h
Error: core407v_stm32f407.dts.pre.tmp:257.21-22 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /home/wwg/zephyr/cmake/dts.cmake:83 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/wwg/zephyr/cmake/app/boilerplate.cmake:260 (include)
  CMakeLists.txt:3 (include)

-- Configuring incomplete, errors occurred!

The intended clock is 168 MHz, with 8 MHz HSE crystal. The top of the _defconfig file is:

CONFIG_ARM=y
CONFIG_BOARD_CORE407V_STM32F407=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XX=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

# Enable MPU
CONFIG_STM32_ARM_MPU_ENABLE=y

CONFIG_SERIAL=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable pinmux
CONFIG_PINMUX=y

# enable GPIO
CONFIG_GPIO=y

# clock configuration
CONFIG_CLOCK_CONTROL=y

# Clock configuration for Cube Clock control driver
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
# produce 168MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=6
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=168
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
CONFIG_CLOCK_STM32_APB1_PRESCALER=4
CONFIG_CLOCK_STM32_APB2_PRESCALER=2

I used the existing value for the MULTIPLIER. Hints for correcting these errors would be appreciated.

Warren


Re: ASSERT failure in USB HID

Brendan OSullivan <bosullivan@...>
 

Greetings!

I've just heard back from Groups.io stating this issue should now be resolved. If there's any further trouble with trying to email involving the older list names / prefixes, please let us know.

Cheers!
Brendan OSullivan

Helpdesk Analyst

On Fri, Apr 13, 2018 at 4:29 PM, Brendan OSullivan <bosullivan@...> wrote:
Greetings!

"Resending my last message since zephyr-devel@...rproject.org doesn't exist anymore, but it's now devel@....org."

This is due to the prefix change as part of the migration. However, subgroup aliases should have been set up to accommodate this change, and the aliases not being configured correctly is something the LF Helpdesk is already aware of. We have reached out to Groups.io for assistance in getting this resolved as quickly as possible.

Cheers!
Brendan OSullivan


Cheers!
Brendan OSullivan

Helpdesk Analyst

On Fri, Apr 13, 2018 at 4:05 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
Resending my last message since zephyr-devel@...ct.org
doesn't exist anymore, but it's now devel@....

I'll repeat my last message here:
Just wanted to add that adding a debugger, I see that in the
USB_EPStartXfer() function in the HAL layer (for me, it's the
stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
by 0 error on this line:

> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;

I haven't delved further than this, however.

- Pushpal

On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
> Hi,
>
> On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@...> wrote:
>> I got hands on a nucleo-f411re and actually encounter the same issue. I also
>> observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
>> last one being the configured HID endpoint), but the enable function is only
>> called for the first two. Does anyone have an idea what the issue is there?
>>
>>
>> On 29.03.2018 20:53, Yannis Damigos wrote:
>>
>> Hi Joe,
>>
>> I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
>> a different error.
>>
>> ***** USAGE FAULT *****
>>   Executing thread ID (thread): 0x20000938
>>   Faulting instruction address:  0x8001e82
>>   Division by zero
>> Fatal fault in essential thread! Spinning...
>
> Just wanted to add that adding a debugger, I see that in the
> USB_EPStartXfer() function in the HAL layer (for me, it's the
> stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
> by 0 error on this line:
>> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
>
> I haven't delved further than this, however.
>
> - Pushpal
>
>> I added developers mailing list to give greater visibility to the problem.
>>
>> Yannis
>>
>> On 03/29/2018 05:27 PM, Johannes Hutter wrote:
>>
>> Hey Yannis,
>>
>> first of all, thanks for the support on the Zephyr Mailing List the last
>> weeks. I don't want to spam the list too much, that's why I'm writing you
>> directly. If you prefer to keep the questions on the mailing list, I am
>> happy to do that.
>>
>>
>> Now my question: The USB HID configuration works perfectly fine (I basically
>> simulate a keyboard). But if I enable ASSERTs my program (and also the USB
>> HID sample) fails during boot with following log:
>>
>>
>> [general] [DBG] HAL_PCD_ResetCallback:
>> [usb/hid] [DBG] hid_status_cb: USB device reset detected
>> [general] [DBG] HAL_PCD_SetupStageCallback:
>> [general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
>> 0, status 0
>> [general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
>> [general] [DBG] usb_handle_request: ** 0 **
>> [usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
>> bmRequestType 0x80 len 64
>> [general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
>> [general] [DBG] usb_dc_ep_write: ep 0x80, len 18
>> [general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
>> ASSERTION FAIL [!_IsInIsr()] @
>> /home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:
>>
>>
>> Would you be so kind and try to run the sample on your boards with ASSERTs
>> enabled? Just to find out whether the problem is on my custom board side or
>> not.
>>
>> Thanks a lot and best regards,
>>
>> Joe
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@... <mailto:johannes@...>
>>
>>
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@...
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> _______________________________________________
>> Zephyr-devel mailing list
>> Zephyr-devel@...ct.org
>> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>>

On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
> Hi,
>
> On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@...> wrote:
>> I got hands on a nucleo-f411re and actually encounter the same issue. I also
>> observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
>> last one being the configured HID endpoint), but the enable function is only
>> called for the first two. Does anyone have an idea what the issue is there?
>>
>>
>> On 29.03.2018 20:53, Yannis Damigos wrote:
>>
>> Hi Joe,
>>
>> I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
>> a different error.
>>
>> ***** USAGE FAULT *****
>>   Executing thread ID (thread): 0x20000938
>>   Faulting instruction address:  0x8001e82
>>   Division by zero
>> Fatal fault in essential thread! Spinning...
>
> Just wanted to add that adding a debugger, I see that in the
> USB_EPStartXfer() function in the HAL layer (for me, it's the
> stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
> by 0 error on this line:
>> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
>
> I haven't delved further than this, however.
>
> - Pushpal
>
>> I added developers mailing list to give greater visibility to the problem.
>>
>> Yannis
>>
>> On 03/29/2018 05:27 PM, Johannes Hutter wrote:
>>
>> Hey Yannis,
>>
>> first of all, thanks for the support on the Zephyr Mailing List the last
>> weeks. I don't want to spam the list too much, that's why I'm writing you
>> directly. If you prefer to keep the questions on the mailing list, I am
>> happy to do that.
>>
>>
>> Now my question: The USB HID configuration works perfectly fine (I basically
>> simulate a keyboard). But if I enable ASSERTs my program (and also the USB
>> HID sample) fails during boot with following log:
>>
>>
>> [general] [DBG] HAL_PCD_ResetCallback:
>> [usb/hid] [DBG] hid_status_cb: USB device reset detected
>> [general] [DBG] HAL_PCD_SetupStageCallback:
>> [general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
>> 0, status 0
>> [general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
>> [general] [DBG] usb_handle_request: ** 0 **
>> [usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
>> bmRequestType 0x80 len 64
>> [general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
>> [general] [DBG] usb_dc_ep_write: ep 0x80, len 18
>> [general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
>> ASSERTION FAIL [!_IsInIsr()] @
>> /home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:
>>
>>
>> Would you be so kind and try to run the sample on your boards with ASSERTs
>> enabled? Just to find out whether the problem is on my custom board side or
>> not.
>>
>> Thanks a lot and best regards,
>>
>> Joe
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@... <mailto:johannes@...>
>>
>>
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@...
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> _______________________________________________
>> Zephyr-devel mailing list
>> Zephyr-devel@...ct.org
>> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>>



Re: ASSERT failure in USB HID

Brendan OSullivan <bosullivan@...>
 

Greetings!

"Resending my last message since zephyr-devel@...rproject.org doesn't exist anymore, but it's now devel@....org."

This is due to the prefix change as part of the migration. However, subgroup aliases should have been set up to accommodate this change, and the aliases not being configured correctly is something the LF Helpdesk is already aware of. We have reached out to Groups.io for assistance in getting this resolved as quickly as possible.

Cheers!
Brendan OSullivan


Cheers!
Brendan OSullivan

Helpdesk Analyst

On Fri, Apr 13, 2018 at 4:05 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
Resending my last message since zephyr-devel@lists.zephyrproject.org
doesn't exist anymore, but it's now devel@....

I'll repeat my last message here:
Just wanted to add that adding a debugger, I see that in the
USB_EPStartXfer() function in the HAL layer (for me, it's the
stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
by 0 error on this line:

> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;

I haven't delved further than this, however.

- Pushpal

On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
> Hi,
>
> On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@...> wrote:
>> I got hands on a nucleo-f411re and actually encounter the same issue. I also
>> observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
>> last one being the configured HID endpoint), but the enable function is only
>> called for the first two. Does anyone have an idea what the issue is there?
>>
>>
>> On 29.03.2018 20:53, Yannis Damigos wrote:
>>
>> Hi Joe,
>>
>> I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
>> a different error.
>>
>> ***** USAGE FAULT *****
>>   Executing thread ID (thread): 0x20000938
>>   Faulting instruction address:  0x8001e82
>>   Division by zero
>> Fatal fault in essential thread! Spinning...
>
> Just wanted to add that adding a debugger, I see that in the
> USB_EPStartXfer() function in the HAL layer (for me, it's the
> stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
> by 0 error on this line:
>> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
>
> I haven't delved further than this, however.
>
> - Pushpal
>
>> I added developers mailing list to give greater visibility to the problem.
>>
>> Yannis
>>
>> On 03/29/2018 05:27 PM, Johannes Hutter wrote:
>>
>> Hey Yannis,
>>
>> first of all, thanks for the support on the Zephyr Mailing List the last
>> weeks. I don't want to spam the list too much, that's why I'm writing you
>> directly. If you prefer to keep the questions on the mailing list, I am
>> happy to do that.
>>
>>
>> Now my question: The USB HID configuration works perfectly fine (I basically
>> simulate a keyboard). But if I enable ASSERTs my program (and also the USB
>> HID sample) fails during boot with following log:
>>
>>
>> [general] [DBG] HAL_PCD_ResetCallback:
>> [usb/hid] [DBG] hid_status_cb: USB device reset detected
>> [general] [DBG] HAL_PCD_SetupStageCallback:
>> [general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
>> 0, status 0
>> [general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
>> [general] [DBG] usb_handle_request: ** 0 **
>> [usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
>> bmRequestType 0x80 len 64
>> [general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
>> [general] [DBG] usb_dc_ep_write: ep 0x80, len 18
>> [general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
>> ASSERTION FAIL [!_IsInIsr()] @
>> /home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:
>>
>>
>> Would you be so kind and try to run the sample on your boards with ASSERTs
>> enabled? Just to find out whether the problem is on my custom board side or
>> not.
>>
>> Thanks a lot and best regards,
>>
>> Joe
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@... <mailto:johannes@...>
>>
>>
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@...
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> _______________________________________________
>> Zephyr-devel mailing list
>> Zephyr-devel@lists.zephyrproject.org
>> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>>

On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@...> wrote:
> Hi,
>
> On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@...> wrote:
>> I got hands on a nucleo-f411re and actually encounter the same issue. I also
>> observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
>> last one being the configured HID endpoint), but the enable function is only
>> called for the first two. Does anyone have an idea what the issue is there?
>>
>>
>> On 29.03.2018 20:53, Yannis Damigos wrote:
>>
>> Hi Joe,
>>
>> I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
>> a different error.
>>
>> ***** USAGE FAULT *****
>>   Executing thread ID (thread): 0x20000938
>>   Faulting instruction address:  0x8001e82
>>   Division by zero
>> Fatal fault in essential thread! Spinning...
>
> Just wanted to add that adding a debugger, I see that in the
> USB_EPStartXfer() function in the HAL layer (for me, it's the
> stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
> by 0 error on this line:
>> USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
>
> I haven't delved further than this, however.
>
> - Pushpal
>
>> I added developers mailing list to give greater visibility to the problem.
>>
>> Yannis
>>
>> On 03/29/2018 05:27 PM, Johannes Hutter wrote:
>>
>> Hey Yannis,
>>
>> first of all, thanks for the support on the Zephyr Mailing List the last
>> weeks. I don't want to spam the list too much, that's why I'm writing you
>> directly. If you prefer to keep the questions on the mailing list, I am
>> happy to do that.
>>
>>
>> Now my question: The USB HID configuration works perfectly fine (I basically
>> simulate a keyboard). But if I enable ASSERTs my program (and also the USB
>> HID sample) fails during boot with following log:
>>
>>
>> [general] [DBG] HAL_PCD_ResetCallback:
>> [usb/hid] [DBG] hid_status_cb: USB device reset detected
>> [general] [DBG] HAL_PCD_SetupStageCallback:
>> [general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
>> 0, status 0
>> [general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
>> [general] [DBG] usb_handle_request: ** 0 **
>> [usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
>> bmRequestType 0x80 len 64
>> [general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
>> [general] [DBG] usb_dc_ep_write: ep 0x80, len 18
>> [general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
>> ASSERTION FAIL [!_IsInIsr()] @
>> /home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:
>>
>>
>> Would you be so kind and try to run the sample on your boards with ASSERTs
>> enabled? Just to find out whether the problem is on my custom board side or
>> not.
>>
>> Thanks a lot and best regards,
>>
>> Joe
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@... <mailto:johannes@...>
>>
>>
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> --
>>
>> Johannes Hutter | Embedded Software Engineer
>> Mail: johannes@...
>>
>>
>> Workaround GmbH (ProGlove)
>> Friedenstr. 4 | 81671 München
>>
>> Managing Director: Thomas Kirchner
>> HRB: 216605 | AG München
>> USt.-IdNr.: DE298859320
>>
>>
>> _______________________________________________
>> Zephyr-devel mailing list
>> Zephyr-devel@lists.zephyrproject.org
>> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>>


Re: ASSERT failure in USB HID

Pushpal Sidhu
 

Resending my last message since zephyr-devel@lists.zephyrproject.org
doesn't exist anymore, but it's now devel@lists.zephyrproject.org.

I'll repeat my last message here:
Just wanted to add that adding a debugger, I see that in the
USB_EPStartXfer() function in the HAL layer (for me, it's the
stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
by 0 error on this line:

USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
I haven't delved further than this, however.

- Pushpal

On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@gmail.com> wrote:
Hi,

On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@proglove.de> wrote:
I got hands on a nucleo-f411re and actually encounter the same issue. I also
observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
last one being the configured HID endpoint), but the enable function is only
called for the first two. Does anyone have an idea what the issue is there?


On 29.03.2018 20:53, Yannis Damigos wrote:

Hi Joe,

I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
a different error.

***** USAGE FAULT *****
Executing thread ID (thread): 0x20000938
Faulting instruction address: 0x8001e82
Division by zero
Fatal fault in essential thread! Spinning...
Just wanted to add that adding a debugger, I see that in the
USB_EPStartXfer() function in the HAL layer (for me, it's the
stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
by 0 error on this line:
USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
I haven't delved further than this, however.

- Pushpal

I added developers mailing list to give greater visibility to the problem.

Yannis

On 03/29/2018 05:27 PM, Johannes Hutter wrote:

Hey Yannis,

first of all, thanks for the support on the Zephyr Mailing List the last
weeks. I don't want to spam the list too much, that's why I'm writing you
directly. If you prefer to keep the questions on the mailing list, I am
happy to do that.


Now my question: The USB HID configuration works perfectly fine (I basically
simulate a keyboard). But if I enable ASSERTs my program (and also the USB
HID sample) fails during boot with following log:


[general] [DBG] HAL_PCD_ResetCallback:
[usb/hid] [DBG] hid_status_cb: USB device reset detected
[general] [DBG] HAL_PCD_SetupStageCallback:
[general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
0, status 0
[general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
[general] [DBG] usb_handle_request: ** 0 **
[usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
bmRequestType 0x80 len 64
[general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
[general] [DBG] usb_dc_ep_write: ep 0x80, len 18
[general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
ASSERTION FAIL [!_IsInIsr()] @
/home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:


Would you be so kind and try to run the sample on your boards with ASSERTs
enabled? Just to find out whether the problem is on my custom board side or
not.

Thanks a lot and best regards,

Joe


--

Johannes Hutter | Embedded Software Engineer
Mail: johannes@proglove.de <mailto:johannes@proglove.de>




Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320


--

Johannes Hutter | Embedded Software Engineer
Mail: johannes@proglove.de


Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
On Fri, Apr 13, 2018 at 12:56 PM, Pushpal Sidhu <psidhu.devel@gmail.com> wrote:
Hi,

On Tue, Apr 3, 2018 at 8:03 AM, Johannes Hutter <johannes@proglove.de> wrote:
I got hands on a nucleo-f411re and actually encounter the same issue. I also
observed that the callback is set for the endpoints 0x00, 0x80 and 0x81 (the
last one being the configured HID endpoint), but the enable function is only
called for the first two. Does anyone have an idea what the issue is there?


On 29.03.2018 20:53, Yannis Damigos wrote:

Hi Joe,

I try USB HID sample on my 96b_carbon with ASSERTs enabled and it fails with
a different error.

***** USAGE FAULT *****
Executing thread ID (thread): 0x20000938
Faulting instruction address: 0x8001e82
Division by zero
Fatal fault in essential thread! Spinning...
Just wanted to add that adding a debugger, I see that in the
USB_EPStartXfer() function in the HAL layer (for me, it's the
stm32l4xx_ll_usb.c), ep->maxpacket is set to 0. This causes the divide
by 0 error on this line:
USBx_INEP(ep->num)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (((ep->xfer_len + ep->maxpacket -1)/ ep->maxpacket) << 19)) ;
I haven't delved further than this, however.

- Pushpal

I added developers mailing list to give greater visibility to the problem.

Yannis

On 03/29/2018 05:27 PM, Johannes Hutter wrote:

Hey Yannis,

first of all, thanks for the support on the Zephyr Mailing List the last
weeks. I don't want to spam the list too much, that's why I'm writing you
directly. If you prefer to keep the questions on the mailing list, I am
happy to do that.


Now my question: The USB HID configuration works perfectly fine (I basically
simulate a keyboard). But if I enable ASSERTs my program (and also the USB
HID sample) fails during boot with following log:


[general] [DBG] HAL_PCD_ResetCallback:
[usb/hid] [DBG] hid_status_cb: USB device reset detected
[general] [DBG] HAL_PCD_SetupStageCallback:
[general] [DBG] usb_handle_control_transfer: usb_handle_control_transfer ep
0, status 0
[general] [DBG] usb_dc_ep_read_wait: ep 0x00, 8 bytes, 0+8, 0x20009bb4
[general] [DBG] usb_handle_request: ** 0 **
[usb/hid] [DBG] hid_custom_handle_req: Standard request: bRequest 0x6
bmRequestType 0x80 len 64
[general] [DBG] usb_handle_std_device_req: REQ_GET_DESCRIPTOR
[general] [DBG] usb_dc_ep_write: ep 0x80, len 18
[general] [DBG] usb_dc_ep_transfer: ep 0x80, len=18, in=1, sync=no
ASSERTION FAIL [!_IsInIsr()] @
/home/joe/code/proglove/embed/mark_one_s_firmware/lib/zephyr/kernel/sched.c:328:


Would you be so kind and try to run the sample on your boards with ASSERTs
enabled? Just to find out whether the problem is on my custom board side or
not.

Thanks a lot and best regards,

Joe


--

Johannes Hutter | Embedded Software Engineer
Mail: johannes@proglove.de <mailto:johannes@proglove.de>




Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320


--

Johannes Hutter | Embedded Software Engineer
Mail: johannes@proglove.de


Workaround GmbH (ProGlove)
Friedenstr. 4 | 81671 München

Managing Director: Thomas Kirchner
HRB: 216605 | AG München
USt.-IdNr.: DE298859320


_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


uart nrf5 power management

ismael fillonneau
 

Dear all,

I am currently using uart on NR52832 device, but the problem is that it consumes 500uA as soon as initialization has been done .

Nothing has been integrating in uart_nr5 driver to control power consumption while API is existing in the device.

I created a PR to start implementation of this feature.

https://github.com/zephyrproject-rtos/zephyr/pull/7034


As soon as low power control has been requested, power consumption decreases significantly (only few uA...).


I am not sure that it is the best way to disable uart, or that all cases are taken into account. Any recommendation could be helpfull!


Regards,

Ismael Fillonneau



Re: Zephyr development news, 4 Apr - 10 Apr 2018

Marti Bolivar
 

Fixing the mailing lists; sorry!

On Wed, Apr 11, 2018 at 12:02 PM, Marti Bolivar
<marti@opensourcefoundries.com> wrote:
Hello Zephyr community!

This is the first of a periodic (weekly-ish) newsletter tracking the latest
Zephyr development.

The goals are to give a human-readable summary of what's been merged
into master, breaking it down as follows:

- Highlights: important changes, new features, and bug fixes
- Individual changes: a complete list of patches, sorted chronologically
and sorted into separate areas (like "Architectures", "Kernel", "Drivers",
etc.)

The "important changes" will include things like API breaks and some
significant features. The focus is on changes in Zephyr that are
likely to require
changes in your Zephyr applications.

The new features and bug fixes sections aren't meant to be exhaustive; the
idea is to cover what happened from a high level. You can check the individual
changes section for a complete list of commits in areas you're interested in.

Any and all feedback on mistakes, significant omissions, etc., is welcome. We
will do our best to get things right, but we'll mess up sometimes :).

To start, I'm going to send these as plain text. Any comments on that or other
formatting and style feedback is also welcome.

Cheers,
Marti and Open Source Foundries

Highlights
==========

This newsletter covers changes in Zephyr between these two
commits:

- 4291fb67a ("usb: Remove duplicated CDC_ECM_SUBCLASS
definition"), Apr 4 2018

- 9bde3c06e ("tests: build_all: Add LPS22HB and LSM6DSL sensors
build test"), Apr 10 2018

The most significant of these changes are due to a large re-work
of the SPI APIs, which affected both the peripheral drivers
themselves as well as their users.

Important Changes
-----------------

SPI API
~~~~~~~

The SPI API (in include/spi.h) has been re-worked and
finalized. All in-tree users were upgraded to the new API. The
old SPI API, and all of its implementations, have been
removed. Out of tree uses of the old SPI API will need updates. A
summary of the API changes follows.

The I/O APIs now use a new struct spi_buf_set, which contains a
pointer to a struct spi_buf array, and its length:

struct spi_buf_set {
const struct spi_buf *buffers;
size_t count;
};

This structure is used in the I/O APIs so that the TX and RX
arguments can be specified in two formal parameters, which allows
using registers instead of the stack in some API calls.

All SPI API calls also now take a pointer to the SPI device
itself as their first parameter, instead of storing that device
in struct spi_config. This makes the SPI API consistent with
other Zephyr device APIs.

The "EEPROM mode" support was removed from the master controller
operations bit mask. It was replaced with a new flag,
SPI_CS_ACTIVE_HIGH, which inverts the usual polarity of the chip
select pin.

The spi_config parameter passed to the SPI API is now constant,
allowing it to be stored in flash memory.

The asynchronous SPI API no longer uses CONFIG_POLL
directly. Instead, a layer of indirection through
CONFIG_SPI_ASYNC was introduced, which selects CONFIG_POLL.

In addition to these changes in the SPI master mode API,
experimental support for SPI slave implementations was added to
the new API.

Board Porting Guidelines
~~~~~~~~~~~~~~~~~~~~~~~~

Official board porting guidelines were merged, which have
consistent rules for how to structure a board's Kconfig. For
details, refer here:

http://docs.zephyrproject.org/porting/board_porting.html#default-board-configuration

Features
--------

VLAN support:

VLAN support was added for Ethernet network
interfaces. Initial support is provided for for mcux, native
POSIX, and Atmel E70. The SLIP driver also has VLAN support.

New net shell commands "net vlan", "net vlan add", and "net
vlan del" were added to query and manipulate the VLAN
configuration.

A new sample application, samples/net/vlan, was added, which
can be used to set VLAN tags for ethernet interfaces.

As part of these and other network changes, the ethernet
files now live in their own directory, net/ip/l2/ethernet.

Red/black trees:

A new red/black balanced binary tree implementation was
added; the API is available in include/misc/rb.h. Like the
linked list types, the structure is *intrusive*: red-black
tree nodes are meant to be embedded in another structure,
which contains the user data associated with that node. Code
size compared to a doubly linked list on most architectures
is approximately an additional 2-2.5 KB.

Completion of DTS support for I2C and SPI on STM32:

All STM32-based boards now use device tree for I2C and SPI
peripherals.

Bluetooth generalizations:

Continuing the effort to generalize the core Bluetooth
subsystem across SoCs, the Bluetooth "ticker" timing API now
includes a generic hal/ticker.h file, which abstracts out SoC
specific definitions.

Drivers:

Ethernet is now enabled by default on the sam_e70_xplained
board.

New driver support includes SPI on nRF52, an interrupt in
transfer callback on USB HID, USB CDC EEM support for
encapsulating Ethernet packets over a USB transport, and GPIO
triggering for the ST LSM6DSL accelerometer and IMU.

Boards:

New boards include the SiFive HiFive1 and Nordic nRF52
Thingy:52 (PCA20020).

Speeding up CI:

An effort is underway to reduce the amount of time spent in
CI. To that end, an additional CI build slave was added, some
duplicative test coverage on qemu_x86 and qemu_cortex_m32 was
eliminated, and other optimizations were performed.

Boot banner changes:

The boot banner now prints the git version (based on git
describe) and hash, but timestamps were removed from it by
default to increase the reproducibility of Zephyr builds.

User mode memory pools:

A new memory pool implementation which is compatible with use
from user mode threads was merged; the API is available in
include/misc/mempool.h. This implementation shares code with
the in-kernel k_mem_pool API, but avoids constraints that are
incompatible with user mode. Memory pools are defined at
compile time with SYS_MEM_POOL_DEFINE(), and initialized by
sys_mem_pool_init(). Memory may be allocated and freed from
an initialized memory pool with sys_mem_pool_alloc() and
sys_mem_pool_free(), respectively.

Network interface management:

Interface statistics collection is now per-interface.

The network shell command "net iface" can now enable or
disable network interfaces by index.

Initial support for ethernet interface configuration has been
merged. This includes a link speed capabilities query. An API
was also merged for changing hardware configuration; this
includes link speed, but is not limited to it.

Bug Fixes
---------

Support for enabling GPIO port H on STM32L0 was fixed.

Support accessing sub-region attributes on ARM MPUs was fixed.

A pair of Bluetooth mesh fixes were merged, including a null
dereference and an issue related to enabling node identity
advertising.

The behavior of the CONFIG_FP_SOFTABI option was fixed. It now
generates floating point instructions, rather than turning them
off, which it was doing previously.

The temperature sensor channel for the nRF TEMP IP block was
fixed; it is now SENSOR_CHAN_DIE_TEMP.

A fix was merged for k_thread_create(), which now properly checks
the provided stack size on systems which enforce power of two
sizes.

POSIX fixes for pthread_cancel and timer_gettime were merged.

Dozens of commits cleaning up and fixing the test cases were
merged.

Individual Changes
==================

Area summary (197 patches total):

Area Patches
---------------------- -------
Arches 10
Bluetooth 3
Boards 10
Build 3
Continuous Integration 6
Documentation 12
Drivers 60
External 2
Kernel 5
Libraries 5
Miscellaneous 3
Networking 18
Samples 10
Scripts 6
Testing 44

Arches (10):

- 6d870ae2 arch/quark_se: Switch to native SPI DW driver
- 4652f59d arch/quark_se_c1000_ss: Switch to SPI DW driver
- 1ac6f4bd arch/quark_d2000: Switch to SPI DW driver
- a8685613 arch/quark_se: Enable SPI port 2 as a slave only
- 2d926f35 native: doc eth TAP: can only be compiled in Unix
- 700e4bd2 ARM: -march compile option is not set
- 6dae38cb arch: riscv32: fe310: Always-On domain adress definition
- 77bbc42e arch: arm: soc: stm32l0: fix port H EXTI
- 54842182 arm_mpu: fix _get_region_attr()
- 6c2047fc arch/arm: stm32: All SoCs have dts for I2C and SPI

Bluetooth (3):

- b8042ea9 Bluetooth: Mesh: Fix possible NULL dereferences in client models
- d6a549ce Bluetooth: Mesh: Fix Node Identity advertising with PB-ADV
- 6c6d98bc Bluetooth: controller: Use hal/ticker.h to abstract SoC specifics

Boards (10):

- 1f0bfb85 boards/x86: Pinmux SPI port 2 relevantly on quark_se_c1000_devboard
- 3e54d391 boards: sam_e70_xplained: Enable L2 ethernet layer
- 938a9699 boards: SiFive HiFive1 board
- 9287a9bf boards/arm/olimexino_stm32: Don't enable I2C and SPI
- 439a63da boards: Add support for nRF52 Thingy:52 (PCA20020)
- a068f29d boards: arm: nrf52_pca20020: Add board documentation
- ea9a3451 boards: native_posix: mark netif as supported
- 2ee6dff7 boards: fix yaml syntax and reduce indentation
- 973ec4ea boards: reduce testing on the same platform with variations
- de8d755c boards: test networking only in one qemu type

Build (3):

- 7d301cbb cmake: qemu_x86: remove useless options
- 9be27f73 kconfig: Make CONIG_FP_SOFTABI generate floating point instructions
- daf7716d build: use git version and hash for boot banner

Continuous Integration (6):

- 0df7e1c1 ci: Increase number of build slaves to 5
- 424a3db7 sanitycheck: do not always dump footprint statistics
- 20f553fe sanitycheck: do not call cmake twice on run
- ab351f40 sanitycheck: do not create overlays for filtered platforms
- 5df8cff0 sanitycheck: simplify logic of build_only/enable_slow checking
- 75547e2b sanitycheck: add option to list all available tags

Documentation (12):

- 9782755a native doc: minor improvement in ethernet driver
- 51658761 doc: Add a comment describing the algorithm used by entropy_nrf5.c
- 6fd8a0b3 doc: dts: Add reference to mcuboot flash partitions
- 8a8d9818 doc: subsys: Add dfu and mgmt subsytem doc
- cd05a630 doc: getting_started: Modernize macOS instructions
- 4b782253 doc: usb: Update API doc
- 3314c367 doc: misspellings in public API doxygen comments
- e48b64d1 doc: fix doc misspellings in doc, boards, samples
- 9abc31e3 doc: clean up QEMU networking doc
- f1275a78 doc: subsystem: settings subsystem doc
- 361ef340 doc: subsys: Remove unnecessary subsystem from titles
- 97083720 doc: provide board porting guidelines

Drivers (60):

- 4291fb67 usb: Remove duplicated CDC_ECM_SUBCLASS definition
- efa3a137 usb: Remove duplicated ACM_SUBCLASS definition
- d89e8e6a drivers/spi: Cleanup the Kconfig files
- 32426542 api/spi: Disable legacy API by default
- f3f9fab2 api/spi: Make spi_config parameter constant
- ea2431f3 api/spi: Reduce parameter number on transceive function
- da42c007 api/spi: Add a dedicated Kconfig option for asynchronous
mode enablement
- 7b185831 api/spi: Removing eeprom mode in configuration
- 9b27f29c api/spi: Add octal MISO lines mode
- f44ba8e7 api/spi: Make cs attribute in struct spi_config constant
- d4065ae7 drivers/ieee802154: Switch CC2520 to new SPI API
- 16cb7ab8 drivers/flash: Switch W25QXXDV driver to new SPI API
- 244c2af1 drivers/sensors: Switch bme280 driver to new SPI API
- eb7af552 drivers/sensors: Switch bmi160 driver to new SPI API
- 94d7c9f2 drivers/sensors: Switch adxl362 driver to new SPI API
- 2f7e6b6d drivers/sensors: Switch lis2dh driver to new SPI API
- d620c16a drivers/adc: Switch ti_adc108s102 driver to new SPI API
- 595340ab drivers/bluetooth: Switch SPI based HCI driver to new SPI API
- 3219817d drivers/bluetooth: Get rid completely of legacy SPI API in SPI HCI
- 29a68cd7 drivers/spi: Adapt Kconfig and generic context to enable
slave support
- 659f0f2d api/spi: Add the possibility to request CS active high logic
- 2a14d289 drivers/ethernet: Switch enc28j60 to new SPI API
- 7f4378e2 api/spi: Precise a bit the documentation
- 57a1f7b4 drivers/spi: Add support for TX or RX only modes on DW driver
- 44d4de51 drivers/spi: Remove legacy DesignWare SPI driver
- 423f0095 drivers/spi: Specify options per-port on DW driver
- 29f8b23b drivers/clock_control: Enable ARC core support on quark_se driver
- a8634944 drivers/spi: Enable port 3 and 4 on DW driver
- dc49d0f3 drivers/spi: Fix typo on parameters type in DW arc regs definitions
- 0a43cac3 drivers/spi: Removing QMSI driver as it does not support new API
- 65f6c967 drivers/spi: Switch Intel driver to new SPI API
- ef5152ab spi: Implement new spi api in the mcux dspi driver
- b62b12ee drivers/ieee802154: Switch MCR20A driver to new SPI API
- 09dd5e9b drivers/spi: Remove legacy API support from mcux dspi driver
- 00397c65 drivers: spi: Add shim for nrfx SPI driver
- 841a4207 drivers/spi: Add slave mode support to the DesignWare driver
- 79308dd1 drivers/spi: Simplify how error is forwarded from ISR handler in DW
- 1086fdf1 drivers/spi: spi_context lock makes transceive function
reentrant in DW
- b702236d drivers/ethernet: No need of semaphore for spi in enc28j60
- d5e6874d drivers/ieee802154: No need of semaphore for spi in mcr20a
- 13dba12b drivers/spi: Remove legacy NRF5 master and slave drivers
- 3f4cffc3 spi: Remove SPI legacy API
- f1ae9402 api/spi: Slave transactions will return received frames on success
- bdd03f38 drivers: sensor: temp_nrf5: fix sensor type
- 42a96c56 drivers: clock_control: quark_se: Fix "make menuconfig"
- 011ad6f7 drivers/spi: Fix tmod update on DW driver
- aaa9cf2e drivers: entropy: nrf5: Clarify Kconfig options
- 7385e388 drivers: eth: mcux: Enabling VLAN
- 02ee3651 drivers: eth: gmac: Adding VLAN support to Atmel E70 board
- 73b43e00 drivers: eth: native_posix: Add VLAN support
- 2c343d2b drivers: net: slip: Add VLAN support
- ed923da4 drivers: net: mcux: Use VLAN priority to set RX packet priority
- 992e3284 usb: netusb: Rework netusb media connect/disconnect
- d80ae8ae usb: netusb: Add CDC EEM network usb function
- 0d04aef6 usb: hid: add a INT IN transfer complete callback.
- dbb22644 usb: hid: implement set_report()
- 8d2b22cd drivers: timer: expose RTC1 ISR handler function
- fbd3c2f4 sensors: ccs811: Deassert the reset pin with GPIO
- 8e1cf7b6 gpio: nrf5: Make the init priority configurable
- 6fb326ce drivers: sensor: lsm6dsl: add trigger support

External (2):

- ca1cb054 ext: lib: tinycbor: fix Zephyr specific settings
- 00f6fc96 ext: lib: tinycbor: fix half-FP feature compilation

Kernel (5):

- f762fdf4 kernel: posix: move sleep and usleep functions into c file.
- 95f14322 sys_mem_pool: add test case
- bf44bacd kernel: mutex: Copy assertions to assertions to syscall handler
- 18cb8326 kernel: Disable build timestamps by default for reproducibility
- ec7ecf79 kernel: restore stack size check

Libraries (5):

- aa6de29c lib: user mode compatible mempools
- f603e603 lib: posix: Move posix layer from 'kernel' to 'lib'
- 4226c6d8 lib: posix: Fix mutex locking in pthread_cancel
- fe46c75d lib: posix: Fix integer overflow in timer_gettime
- 193f4feb lib: Red/Black balanced tree data structure

Miscellaneous (3):

- 5f67a611 include: improve compatibility with C++ apps.
- 7383814d cpp: mark __dso_handle as weak.
- 2ef57f0a lib/rbtree: Add a rb_contains() predicate

Networking (18):

- de13e979 net: if: vlan: Add virtual lan support
- 487e8104 net: shell: Add VLAN support
- 6643bb08 net: l2: ethernet: Add priority to sent ethernet VLAN header
- ad5bbefd net: Add function to convert VLAN priority to packet priority
- 687c3339 net: if: Use DEVICE_NAME_GET() instead of fixed string
- b70b4bca net: shell: Add network interface up/down command
- ffd0a1f5 net: core: Check interface when receiving a packet
- 444dfa74 net: l2: Remove l2_data section start and end pointers
- e56a9f0e net: ethernet: Return correct non VLAN interface
- 85d65b20 net: stats: Fix the net_mgmt statistics collection
- 1443ff0f net: stats: Make statistics collection per network interface
- e996b37c net/ethernet: Add capabilities exposed by device drivers
- e9d77b60 net/ethernet: No need to expose vlan_setup if vlan is not enabled
- 4bf1a9bd net/ethernet: All types are prefixed with ethernet_
- af0c5869 net/ethernet: Moving ethernet code to dedicated directory
- f3d80126 net/ethernet: Add function driver API to change some hw configuration
- 8d558fb5 net/ethernet: Add a management interface
- 757c5d18 net/ethernet: Fix uninitialized attributes in ethernet mgmt
parameters

Samples (10):

- 308f4df9 samples/drivers: Switch Fujistu FRAM sample to new SPI API
- e7de85b5 samples/bluetooth: Move hci_spi to new SPI API
- a0df4f66 samples: net: Fix sanitycheck for sam_e70_xplained board
- 5fbd4807 samples: net: vlan: Simple app for setting virtual lan settings
- 81d211f3 samples: hci_uart: Add references to sections
- bd583ed9 samples: mgmt: Expand smp_svr sample documentation
- 7c5c222c samples: net: Add test cases for USB EEM
- 156091fb samples: sample.yaml cleanup
- 65600d47 samples: power_mgr: add harnesss configuration
- 15ccd9cc sample: net: stats: Example how to use net_mgmt for statistics

Scripts (6):

- 46a172ae kconfiglib: Update to 2259d353426f1
- db28a5d8 kconfiglib: Update to 981d24aff7654
- 8fc44f29 kconfiglib: Update to e8408a06c68d8
- e32ed180 jlink: fix flashing behavior on Windows
- ba2ce2e9 script/extract_dts_includes: factorize call to upper()
- 074c90c5 scripts: dts_extract_include: generate aliases defs

Testing (44):

- a5efadf2 tests/drivers: Removing old SPI test
- b4247fde tests/spi: Remove excluded boards
- 9116cc7a tests: spi_loopback: Add frdm_k64f configuration
- 18d354c4 tests: spi_loopback: Add configurations for a few nRF5 boards
- 92be4112 tests: drivers: build_all: add TEMP_NRF5 to sensor test
- d155e886 tests: stack_random: Add Ztest support
- fab8c278 tests: lifo: Add lifo test with scenario
- 14e356c7 tests: net: vlan: Add VLAN tests
- e3076a47 tests: add tag for memory pool tests
- 46931c9a tests: posix: Resolve header file dependencies
- 9e4bbcc9 tests: kernel: add Cortex-M33/M7 in list of MCUs
- 316ffff6 tests: kernel: fix irq_vector_table test for nRF52X platforms
- 4fc2ccbd test: mbox_usage: add legacy test case for mailbox
- bdda3695 tests: net: vlan: Fix VLAN disable test
- f8502690 tests: context: rename main test
- 88c16923 tests: context: use ztest macros
- 86bb19ac tests: mutex: rename main test function
- 5d569eac tests: rename test -> main.c
- e73a95bd tests: kernel: use a consistent test suite name
- 5c72f40c tests: tags should not be required
- f3e8cb7e tests: add missing harness support
- 016b21a4 tests: mbedtls_sslclient: fix filtering and default conf
- 1934d3bd tests: enhance test filtering for net tests
- 4f4f135b tests: mqtt: fix dependencies
- fca15b49 tests: xip: cleanup test
- 390a2c4c tests: classify tests
- 8e8d6de6 tests: posix: fix tags and sections
- 49bb8313 tests: classify periphera tests
- 9e9784fc qemu_xtensa: ignore net and bluetooth tests
- 848c1054 tests: classify net tests and cleanup
- 5c89a4ce tests: ipv6: cleanup tests
- 3e086c68 tests: base64: do not exclude newlib
- 31e201b5 tests: net: context: simplify filtering
- d7e7b08c tests: cleanup meta-data of various tests
- 55ce5510 tests: cleanup subsystem tests meta-data
- 835ee3ff tests: net: checksum_offload: exclude native [REVERTME]
- d2807576 ztest: define test_main in the header file.
- fe067eb3 tests: add a C++ compile test.
- b71d6bab tests/net: Add a test for Ethernet net mgmt interface
- 3c856028 tests: net: checksum_offload: Adjust number of interfaces
- e2924ab4 tests: add min_flash option for some tests
- c625ab85 tests: rbtree test
- d7b7f511 tests: rbtree: Fix test so its actually runs
- 9bde3c06 tests: build_all: Add LPS22HB and LSM6DSL sensors build test


Zephyr API discussion weekly call

Carles Cufi
 

Hi all,

The Zephyr API weekly calls take place on Tuesdays. Everybody is welcome to join, and you can find all the relevant details here:

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion

Next week we will be discussing the current ADC and Watchdog API reworks, and we are also looking for an owner to the I2C API rework to join the call and take ownership of it. I have copied people involved in the current I2C PRs, but feel free to forward this to anyone who might be interested.

If you want to contribute on any of the items above please join next week. Additional details regarding the current issues being discussed in the calls can be found in the umbrella GitHub issue:

https://github.com/zephyrproject-rtos/zephyr/issues/5697

and in the meeting minutes:

https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk

Thanks,

Carles


Re: Zephyr list configuration

Pushpal Sidhu
 

Classic case of "if it ain't broke, don't fix it". Further, the list
email changed so my mail filters all had to be updated which was a
slight annoyance, especially since it was a very sudden change.

- Pushpal

On Sat, Apr 7, 2018 at 6:17 PM, David Brown <david.brown@linaro.org> wrote:
On Sat, Apr 07, 2018 at 06:59:20PM +0000, Marti Bolivar wrote:

I'm also receiving a separate copy of mail I send to zephyr lists, and
seem to
otherwise be receiving duplicate copies of some messages. If this could be
fixed too I would appreciate it.

Per some suggestions given on the mailing list, I'm going to try
unchecking the setting in my account: "I always want copies of my own
messages". This may be what is triggering it to generate a message
with a new message ID.

There still may be some issues with removing cross-posted addresses
from the headers, and I don't really know what this will do here.

Marti, if you get this message, do you mind sending me a private email
with the headers from the message? I think gmail will discard the
duplicate, so I won't really see if it worked.

Thanks,
David



Re: QEMU and bridged networking

Jukka Rissanen
 

Hi David,

I just tried this and got no issues, steps below.

On Thu, 2018-04-05 at 15:55 -0600, David Brown wrote:
When I use qemu with Linux, one of the network configurations I can
use is bridged, which makes the emulated platform appear as its own
device on my network. This allows things such dhcpc to work as it
would on a standalone device on my network.

With Zephyr, since we're doing the networking through a slip
interface
over a simulated uart, the automated qemu bridge networking doesn't
work.

Has anyone successfully enabled qemu_x86 with a network configuration
that bridged the device to the hosts network interface.

What I've tried so far is:

- Changed my systemd network configuration to create br0 as a
bridge
interface.

- Set my ethernet devices to master to br0

- Run dhcp on br0 instead of the ethernet device (maybe this is an
error).

- After starting up loop-slip-tap.sh, set tap0 to master to br0.
I did this option and got things working like this:

Create tap0 (from net-tools zephyr repo):
./loop-socat.sh
sudo ./loop-slip-tap.sh

Note that if you do not want to set IP address to tap0, then you can
add -x option to loop-slip-tap.sh but in that case you need to create
the tap0 device yourself.

Create bridge and attach it to tap0:
sudo brctl addbr br0
sudo brctl addif br0 tap0

Set IPv4 address to br0:
sudo ip addr add 203.0.113.2 dev br0
sudo ip route add 203.0.113/24 dev br0

Run dhcpd on br0:
sudo dhcpd -cf br0-qemu-dhcpd.conf br0

The contents of br0-qemu-dhcpd.conf file is:
option domain-name "zephyr.test";
default-lease-time 1200;
max-lease-time 3600;
subnet 203.0.113.0 netmask 255.255.255.0 {
range 203.0.113.64 203.0.113.96;
}

Then I started echo-server from samples/net/echo-server, edited
suitable config file and enabled CONFIG_NET_DHCPV4=y. After starting
echo-server, the device got IPv4 address just fine. You can use "net
iface" command in net-shell to verify that the IP address is added to
the network interface.


Cheers,
Jukka


Running the dhcpv4_client app doesn't ever find an address. I can
next try to hard-code an IP address and see if TCP will get through.

Thanks,
David

3621 - 3640 of 8041