Date   

Re: I2c problem on 96b Carbon.

Yannis Damigos
 

Hi,

On Fri, Aug 4, 2017 at 12:27 AM, Iñaki Malerba <inakimmalerba@gmail.com> wrote:
Hi everyone!

I've been struggling with this problem for the last weeks. I cannot make it
to comunicate my carbon board with an fxos8700 IMU.

Enabling the interruptions mode on the i2c driver, I can see on the logic
analyzer it sends the address of the byte to read, but it doesnt receives
the answer.
I tried my best to debug it with gdb and I get to the point where it gets
looped on `handle_rxne` (drivers/i2c/i2c_ll_stm32_v1.c) with `data.len = 0`.

I also have some doubts about some lines there. For example, how does it ack
the message if it enters the first `if` with `data.len = 1` and then, when
decreased, `data.len == 1` its false.
You are right, the first `if` with `data.len = 1` should be nack and
not ack (probably I made a typo during driver development). In case a
single byte has to be received, the Acknowledge disable is made before
ADDR flag is cleared.

Could you test the I2C read both in polling and interrupt mode with
the following branch? I only have a slave I2C display which supports
only write operations and I cannot test it myself.
https://github.com/ydamigos/zephyr/commits/i2c-read

If everything works fine, I will create a PR to fix it.

It doesnt generate the stop bit either because the burst read sets
`I2C_MESSAGE_RESTART` flag.
Why does `i2c_reg_read_byte` uses burst read instead of normal read?

Any help on this would be really apreciated, Im really stuck on here.
__
Martin Iñaki Malerba
inakimmalerba@gmail.com | +54 02945 15468443
inaki@satellogic.com


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


I2c problem on 96b Carbon.

Iñaki Malerba <inakimmalerba@...>
 

Hi everyone!

I've been struggling with this problem for the last weeks. I cannot make it to comunicate my carbon board with an fxos8700 IMU.

Enabling the interruptions mode on the i2c driver, I can see on the logic analyzer it sends the address of the byte to read, but it doesnt receives the answer.
I tried my best to debug it with gdb and I get to the point where it gets looped on `handle_rxne` (drivers/i2c/i2c_ll_stm32_v1.c) with `data.len = 0`.

I also have some doubts about some lines there. For example, how does it ack the message if it enters the first `if` with `data.len = 1` and then, when decreased, `data.len == 1` its false.
It doesnt  generate the stop bit either because the burst read sets `I2C_MESSAGE_RESTART` flag.
Why does `i2c_reg_read_byte` uses burst read instead of normal read?

Any help on this would be really apreciated, Im really stuck on here.
__
Martin Iñaki Malerba
inakimmalerba@... | +54 02945 15468443


Re: Help needed for Zephyr compilation

Carles Cufi
 

Hi there,

Note that the Getting Started guides have been updated to use a requirements.txt instead of manually installing a set of Python modules. If you run pip against that .txt file it should install all required deps.

Thanks,

Carles

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-
bounces@lists.zephyrproject.org] On Behalf Of Vakul Garg
Sent: 02 August 2017 10:07
To: massimiliano cialdi <massimiliano.cialdi@powersoft.it>; zephyr-
users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Help needed for Zephyr compilation

Thanks, it worked for me too.

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-
bounces@lists.zephyrproject.org] On Behalf Of massimiliano cialdi
Sent: Tuesday, August 01, 2017 5:49 PM
To: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Help needed for Zephyr compilation

I had the same problem, and I solved it installing pyelftool 0.24

pip3 install pyelftools==0.24

best regards
Max
On 01/08/2017 12:43, Vakul Garg wrote:

Hi

I am newbie to Zephyr and compiling source from HEAD of master branch
for target qemu_x86.

I am getting following error.

Traceback (most recent call last):

File "/home/b16394/zephyr/zephyr-git/scripts/gen_offset_header.py",
line 8, in <module>

from elftools.elf.elffile import ELFFile

ImportError: No module named 'elftools'

make[3]: *** [include/generated/offsets.h] Error 1

make[2]: *** [prepare] Error 2

make[1]: *** [sub-make] Error 2

Can someone please help?

I could compile from below mentioned commit, but compiling latest code
fails with above error.

commit bc2454fa9e966ab31db6b78439389f9066f840b3

Regards

Vakul



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


Re: Help needed for Zephyr compilation

Vakul Garg <vakul.garg@...>
 

Thanks, it worked for me too.

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of massimiliano cialdi
Sent: Tuesday, August 01, 2017 5:49 PM
To: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Help needed for Zephyr compilation

I had the same problem, and I solved it installing pyelftool 0.24

pip3 install pyelftools==0.24

best regards
Max
On 01/08/2017 12:43, Vakul Garg wrote:

Hi

I am newbie to Zephyr and compiling source from HEAD of master branch
for target qemu_x86.

I am getting following error.

Traceback (most recent call last):

File "/home/b16394/zephyr/zephyr-git/scripts/gen_offset_header.py",
line 8, in <module>

from elftools.elf.elffile import ELFFile

ImportError: No module named 'elftools'

make[3]: *** [include/generated/offsets.h] Error 1

make[2]: *** [prepare] Error 2

make[1]: *** [sub-make] Error 2

Can someone please help?

I could compile from below mentioned commit, but compiling latest code
fails with above error.

commit bc2454fa9e966ab31db6b78439389f9066f840b3

Regards

Vakul



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


Re: Help needed for Zephyr compilation

Massimiliano Cialdi
 

I had the same problem, and I solved it installing pyelftool 0.24

pip3 install pyelftools==0.24

best regards
Max

On 01/08/2017 12:43, Vakul Garg wrote:

Hi

I am newbie to Zephyr and compiling source from HEAD of master branch for target qemu_x86.

I am getting following error.

Traceback (most recent call last):

File "/home/b16394/zephyr/zephyr-git/scripts/gen_offset_header.py", line 8, in <module>

from elftools.elf.elffile import ELFFile

ImportError: No module named 'elftools'

make[3]: *** [include/generated/offsets.h] Error 1

make[2]: *** [prepare] Error 2

make[1]: *** [sub-make] Error 2

Can someone please help?

I could compile from below mentioned commit, but compiling latest code fails with above error.

commit bc2454fa9e966ab31db6b78439389f9066f840b3

Regards

Vakul



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


Re: Help needed for Zephyr compilation

Adam Podogrocki
 

Seems that the Python module named 'elftools' is missing. Please install the mentioned packed and try again.

Cheers,
Adam

On 1 August 2017 at 12:43, Vakul Garg <vakul.garg@...> wrote:

Hi

 

I am newbie to Zephyr and compiling source from HEAD of master branch for target qemu_x86.

I am getting following error.

 

Traceback (most recent call last):

  File "/home/b16394/zephyr/zephyr-git/scripts/gen_offset_header.py", line 8, in <module>

    from elftools.elf.elffile import ELFFile

ImportError: No module named 'elftools'

make[3]: *** [include/generated/offsets.h] Error 1

make[2]: *** [prepare] Error 2

make[1]: *** [sub-make] Error 2

 

Can someone please help?

I could compile from below mentioned commit, but compiling latest code fails with above error.

 

commit bc2454fa9e966ab31db6b78439389f9066f840b3

 

Regards

 

Vakul

 

 


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



Help needed for Zephyr compilation

Vakul Garg <vakul.garg@...>
 

Hi

 

I am newbie to Zephyr and compiling source from HEAD of master branch for target qemu_x86.

I am getting following error.

 

Traceback (most recent call last):

  File "/home/b16394/zephyr/zephyr-git/scripts/gen_offset_header.py", line 8, in <module>

    from elftools.elf.elffile import ELFFile

ImportError: No module named 'elftools'

make[3]: *** [include/generated/offsets.h] Error 1

make[2]: *** [prepare] Error 2

make[1]: *** [sub-make] Error 2

 

Can someone please help?

I could compile from below mentioned commit, but compiling latest code fails with above error.

 

commit bc2454fa9e966ab31db6b78439389f9066f840b3

 

Regards

 

Vakul

 

 


Re: Custom configuration options

Scott Nelson <scott@...>
 

Thank you! That worked perfectly.

On Jul 31, 2017, at 12:15 PM, Rosen, Michael R <michael.r.rosen@intel.com> wrote:

Scott,

I haven’t had the chance to try this on newer version of Zephyr (this is from a Zephyr 1.7 project), but this is how I added project Kconfig's:

1) In you project's Makefile, add the following:

KBUILD_KCONFIG = $(PWD)/Kconfig
export KBUILD_KCONFIG

2) In your project's main directory (same directory as the Makefile), create a file named Kconfig, and put this in it:

mainmenu "[Project Name Here] Configuration"

config PROJECT_BASE
string
option env="PROJECT_BASE"

source "Kconfig.zephyr"

source "$PROJECT_BASE/src/Kconfig"

You can now create an entire Kconfig tree in your src directory, starting with src/Kconfig.

Mike

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-
bounces@lists.zephyrproject.org] On Behalf Of Scott Nelson
Sent: Monday, July 31, 2017 6:43 AM
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] Custom configuration options

Is it possible to create application-specific config options? I tried creating a
Kconfig file with a few options in my project root dir but didn’t see any of the
options when running “make menuconfig”. I noticed the Kconfig.zephyr
recursively includes everything in the Zephyr source tree but is it possible to
add additional options from my project file structure?

Thanks!

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


Re: Custom configuration options

Michael Rosen
 

Scott,

I haven’t had the chance to try this on newer version of Zephyr (this is from a Zephyr 1.7 project), but this is how I added project Kconfig's:

1) In you project's Makefile, add the following:

KBUILD_KCONFIG = $(PWD)/Kconfig
export KBUILD_KCONFIG

2) In your project's main directory (same directory as the Makefile), create a file named Kconfig, and put this in it:

mainmenu "[Project Name Here] Configuration"

config PROJECT_BASE
string
option env="PROJECT_BASE"

source "Kconfig.zephyr"

source "$PROJECT_BASE/src/Kconfig"

You can now create an entire Kconfig tree in your src directory, starting with src/Kconfig.

Mike

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-
bounces@lists.zephyrproject.org] On Behalf Of Scott Nelson
Sent: Monday, July 31, 2017 6:43 AM
To: zephyr-users@lists.zephyrproject.org
Subject: [Zephyr-users] Custom configuration options

Is it possible to create application-specific config options? I tried creating a
Kconfig file with a few options in my project root dir but didn’t see any of the
options when running “make menuconfig”. I noticed the Kconfig.zephyr
recursively includes everything in the Zephyr source tree but is it possible to
add additional options from my project file structure?

Thanks!

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


Re: STM32F4 clock problem

Andreas Kölbl <andreas.koelbl@...>
 

This works, thanks a lot. I will work on a patch fixing this issue in
the defconfig of stm32f4_disco.

Am 31.07.2017 um 15:08 schrieb Yannis Damigos:

On Fri, Jul 28, 2017 at 10:54 AM, Andreas Kölbl
<andreas.koelbl@st.oth-regensburg.de> wrote:
Hello,

I'm quite new to zephyr and I'm working on a stm32f4_discovery board
(defconfig).
I tried the blinky application from examples (enabled the corresponding
GPIO in the config).
I didn't change the base clock setup from the configuration. With that,
I discovered the k_sleep interval is kind of wrong. It sleeps about 3,5
times longer than it should be.

I also tried another GPIO-Pin (PB8) to toggle instead of the LED in the
example and measured the frequency with a scope. It measured an
frequency (ACTIVE_HIGH->ACTIVE_HIGH) of 214.09mHz which should be 500mHz.

Am I missing something here?
Hi Andreas,

The default values could be wrong. Using the Clock configuration tool
for STM32F40x/41x microcontrollers (AN3988) from
http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stsw-stm32091.html,
the default values should be:

# 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=8
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=336
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 don't have the hardware, could you test the above values?

Yannis



--
Andreas Kölbl

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


Custom configuration options

Scott Nelson <scott@...>
 

Is it possible to create application-specific config options? I tried creating a Kconfig file with a few options in my project root dir but didn’t see any of the options when running “make menuconfig”. I noticed the Kconfig.zephyr recursively includes everything in the Zephyr source tree but is it possible to add additional options from my project file structure?

Thanks!

-Scott


Re: STM32F4 clock problem

Yannis Damigos
 

On Fri, Jul 28, 2017 at 10:54 AM, Andreas Kölbl
<andreas.koelbl@st.oth-regensburg.de> wrote:
Hello,

I'm quite new to zephyr and I'm working on a stm32f4_discovery board
(defconfig).
I tried the blinky application from examples (enabled the corresponding
GPIO in the config).
I didn't change the base clock setup from the configuration. With that,
I discovered the k_sleep interval is kind of wrong. It sleeps about 3,5
times longer than it should be.

I also tried another GPIO-Pin (PB8) to toggle instead of the LED in the
example and measured the frequency with a scope. It measured an
frequency (ACTIVE_HIGH->ACTIVE_HIGH) of 214.09mHz which should be 500mHz.

Am I missing something here?
Hi Andreas,

The default values could be wrong. Using the Clock configuration tool
for STM32F40x/41x microcontrollers (AN3988) from
http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stsw-stm32091.html,
the default values should be:

# 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=8
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=336
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 don't have the hardware, could you test the above values?

Yannis



--
Andreas Kölbl

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


Re: device tree

Yannis Damigos
 

Hi Max,

On Fri, Jul 28, 2017 at 12:45 PM, massimiliano cialdi
<massimiliano.cialdi@powersoft.it> wrote:
As explained here
https://www.zephyrproject.org/doc/1.8.0/application/application.html#application-structure
I have ceated a directory My-app and the src

-- <baseDir> |-- My-app
| |-- src |-- zephyr |-- dts : If I have to write devicetree files to
support my board can I add a subdirectory in My-app? -- <baseDir> |-- My-app
| |-- src | |-- dts |-- zephyr |-- dts :
Or do I have to work in <baseDir>/zephyr/dts?
Currently, there is no support for out-of-tree board definitions (see
https://jira.zephyrproject.org/browse/ZEP-150).
If you want to add support for your board in the Zephyr, you need to
add your board's definition files under boards/<arch> folder and
board's dts file under dts/<arch> folder.

best regards
Max

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


optimization

Massimiliano Cialdi
 

I wonder how I can force -O3 optimization if I need it in my project.

In zephyr/Makefile I found
ifeq ($(CONFIG_DEBUG),y)
KBUILD_CFLAGS_OPTIMIZE := -Og
else
KBUILD_CFLAGS_OPTIMIZE := -Os
endif

If I wanted to avoid modifying the Makefile file, is there a way to do this by touching only my application's files?

best regards


device tree

Massimiliano Cialdi
 

As explained here https://www.zephyrproject.org/doc/1.8.0/application/application.html#application-structure

I have ceated a directory My-app and the src

-- <baseDir>
|-- My-app
| |-- src
|-- zephyr
|-- dts
:

If I have to write devicetree files to support my board can I add a subdirectory in My-app?

-- <baseDir>
|-- My-app
| |-- src
| |-- dts
|-- zephyr
|-- dts
:

Or do I have to work in <baseDir>/zephyr/dts?


best regards
Max


device tree

Massimiliano Cialdi
 

As explained here https://www.zephyrproject.org/doc/1.8.0/application/application.html#application-structure
I have ceated a directory My-app and the src

-- <baseDir> |-- My-app
| |-- src |-- zephyr |-- dts : If I have to write devicetree files to support my board can I add a subdirectory in My-app? -- <baseDir> |-- My-app
| |-- src | |-- dts |-- zephyr |-- dts :
Or do I have to work in <baseDir>/zephyr/dts?

best regards
Max


set show

Massimiliano Cialdi
 


STM32F4 clock problem

Andreas Kölbl <andreas.koelbl@...>
 

Hello,

I'm quite new to zephyr and I'm working on a stm32f4_discovery board
(defconfig).
I tried the blinky application from examples (enabled the corresponding
GPIO in the config).
I didn't change the base clock setup from the configuration. With that,
I discovered the k_sleep interval is kind of wrong. It sleeps about 3,5
times longer than it should be.

I also tried another GPIO-Pin (PB8) to toggle instead of the LED in the
example and measured the frequency with a scope. It measured an
frequency (ACTIVE_HIGH->ACTIVE_HIGH) of 214.09mHz which should be 500mHz.

Am I missing something here?

--
Andreas Kölbl


Docker Image for ARM Boards

Agustin Henze
 

Hello, today I have started my first steps on zephyr and I am completely happy
to see an RTOS prepared for the future :).

After my first steps, I don't know... 5 minutes? :D. I decided to write the
recipe to have an environment ready to build and run application (emulated or
via jtag). Here it goes https://hub.docker.com/r/agustinhenze/zephyr-arm/

I hope that someone else find this useful and of course any suggestion,
improvement, contribution, etc is welcomed.

--
TiN


GPIO Pins FRMD_K64F

Kevin Stöckl <k_stoeckl@...>
 

Hello,
I want to trigger on the rising edge of a sensor (buzzer,PIR,...) but where can I find the Name of the Pin from the NXP Frdm-K64f Board.


So how is it possible with this Board to trigger on the rising edge of sensors?

Thanks in Advance

Kevin


2601 - 2620 of 2702