Date   

[bt_le]Does Zephyr have APIs to get ConnInterval, DataLengthExtension and PHY?

Kai Ren
 

Hello,

I’m trying to find the APIs on Zephyr, https://docs.zephyrproject.org/latest/reference/bluetooth/index.html , using these APIs can get

  • ConnInterval,
  • whether Data Length Extension is enable or not, and
  • which PHY is using, 1M uncoded, 2M uncoded or 1M coded?

But I haven’t found them, so send this email for help.

Thanks!

 

Regards,

Kai

 

 

 


Re: Removing padding from generated hex files

Sebastian Boe
 

"Does the ". = 0x1000;" indicate the padding?"


Yes, you would want to compare it to the source to see what it's trying to do, and possibly
how to make it stop.

________________________________________
From: Jamie Mccrae <Jamie.Mccrae@lairdconnect.com>
Sent: Thursday, April 4, 2019 3:13 PM
To: Bøe, Sebastian; devel@lists.zephyrproject.org
Subject: RE: Removing padding from generated hex files

Hi,
That's where I'm not sure on, I see the fill section but can't work out where it's coming from:
Memory Configuration

Name Origin Length Attributes
FLASH 0x00000000 0x00100000 xr
SRAM 0x20000000 0x00040000 xw
IDT_LIST 0x20040000 0x00000800 xw
*default* 0x00000000 0xffffffff

Linker script and memory map

LOAD zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
LOAD zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
LOAD app/libapp.a
LOAD zephyr/libzephyr.a
LOAD zephyr/arch/arch/arm/core/libarch__arm__core.a
LOAD zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a
LOAD zephyr/arch/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a
LOAD zephyr/lib/libc/minimal/liblib__libc__minimal.a
LOAD zephyr/boards/arm/nrf52840_pca10059/libboards__arm__nrf52840_pca10059.a
LOAD zephyr/drivers/serial/libdrivers__serial.a
LOAD zephyr/kernel/libkernel.a
LOAD zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
LOAD c:/gcc-arm/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m/nofp\libgcc.a
0x00000020 _region_min_align = 0x20

.rel.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rel.plt))
[!provide] PROVIDE (__rel_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rel.iplt))
.rel.iplt 0x00000000 0x0 zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[!provide] PROVIDE (__rel_iplt_end = .)

.rela.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rela.plt))
[!provide] PROVIDE (__rela_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rela.iplt))
[!provide] PROVIDE (__rela_iplt_end = .)

.rel.dyn
*(SORT_BY_ALIGNMENT(.rel.*))

.rela.dyn
*(SORT_BY_ALIGNMENT(.rela.*))

/DISCARD/
*(SORT_BY_ALIGNMENT(.plt))
*(SORT_BY_ALIGNMENT(.iplt))
*(SORT_BY_ALIGNMENT(.got.plt))
*(SORT_BY_ALIGNMENT(.igot.plt))
*(SORT_BY_ALIGNMENT(.got))
*(SORT_BY_ALIGNMENT(.igot))
*(SORT_BY_ALIGNMENT(.irq_info))
*(SORT_BY_ALIGNMENT(.intList))
0x00000000 _image_rom_start = 0x0

text 0x00000000 0x1100
0x00001000 . = 0x1000
*fill* 0x00000000 0x1000
0x00001000 _vector_start = .
*(SORT_BY_ALIGNMENT(.exc_vector_table))
*(SORT_BY_ALIGNMENT(.exc_vector_table.*))

The linker.cmd file has this:
_image_rom_start = (0x0 + 0x0);
text :
{
. = 0x1000;
_vector_start = .;
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
KEEP(*(.gnu.linkonce.irq_vector_table))
KEEP(*(.vectors))
KEEP(*(.openocd_dbg))
KEEP(*(".openocd_dbg.*"))

KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
_vector_end = .;
} > FLASH
Does the ". = 0x1000;" indicate the padding?
Thanks,
Jamie

-----Original Message-----

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.


Re: Removing padding from generated hex files

lairdjm
 

Hi,
That's where I'm not sure on, I see the fill section but can't work out where it's coming from:
Memory Configuration

Name Origin Length Attributes
FLASH 0x00000000 0x00100000 xr
SRAM 0x20000000 0x00040000 xw
IDT_LIST 0x20040000 0x00000800 xw
*default* 0x00000000 0xffffffff

Linker script and memory map

LOAD zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
LOAD zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
LOAD app/libapp.a
LOAD zephyr/libzephyr.a
LOAD zephyr/arch/arch/arm/core/libarch__arm__core.a
LOAD zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a
LOAD zephyr/arch/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a
LOAD zephyr/lib/libc/minimal/liblib__libc__minimal.a
LOAD zephyr/boards/arm/nrf52840_pca10059/libboards__arm__nrf52840_pca10059.a
LOAD zephyr/drivers/serial/libdrivers__serial.a
LOAD zephyr/kernel/libkernel.a
LOAD zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
LOAD c:/gcc-arm/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m/nofp\libgcc.a
0x00000020 _region_min_align = 0x20

.rel.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rel.plt))
[!provide] PROVIDE (__rel_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rel.iplt))
.rel.iplt 0x00000000 0x0 zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[!provide] PROVIDE (__rel_iplt_end = .)

.rela.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rela.plt))
[!provide] PROVIDE (__rela_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rela.iplt))
[!provide] PROVIDE (__rela_iplt_end = .)

.rel.dyn
*(SORT_BY_ALIGNMENT(.rel.*))

.rela.dyn
*(SORT_BY_ALIGNMENT(.rela.*))

/DISCARD/
*(SORT_BY_ALIGNMENT(.plt))
*(SORT_BY_ALIGNMENT(.iplt))
*(SORT_BY_ALIGNMENT(.got.plt))
*(SORT_BY_ALIGNMENT(.igot.plt))
*(SORT_BY_ALIGNMENT(.got))
*(SORT_BY_ALIGNMENT(.igot))
*(SORT_BY_ALIGNMENT(.irq_info))
*(SORT_BY_ALIGNMENT(.intList))
0x00000000 _image_rom_start = 0x0

text 0x00000000 0x1100
0x00001000 . = 0x1000
*fill* 0x00000000 0x1000
0x00001000 _vector_start = .
*(SORT_BY_ALIGNMENT(.exc_vector_table))
*(SORT_BY_ALIGNMENT(.exc_vector_table.*))

The linker.cmd file has this:
_image_rom_start = (0x0 + 0x0);
text :
{
. = 0x1000;
_vector_start = .;
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
KEEP(*(.gnu.linkonce.irq_vector_table))
KEEP(*(.vectors))
KEEP(*(.openocd_dbg))
KEEP(*(".openocd_dbg.*"))

KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
_vector_end = .;
} > FLASH
Does the ". = 0x1000;" indicate the padding?
Thanks,
Jamie

-----Original Message-----

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.


Re: Removing padding from generated hex files

Sebastian Boe
 

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.

________________________________________
From: Jamie Mccrae <Jamie.Mccrae@lairdconnect.com>
Sent: Thursday, April 4, 2019 2:34 PM
To: Bøe, Sebastian; devel@lists.zephyrproject.org
Subject: RE: Removing padding from generated hex files

Hi,
I have tried that but it still pads the first section with 0x00 bytes. I'm using a custom board file and project so tried switched to trying it with the hello world sample using the nrf52840_pca10059 board file and enabled the option there, the area where the MBR is, is filled with 0x00 inside the hex file.
Thanks,
Jamie

-----Original Message-----

Hi,

try enabling

CONFIG_BUILD_NO_GAP_FILL

IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.


Re: Removing padding from generated hex files

lairdjm
 

Hi,
I have tried that but it still pads the first section with 0x00 bytes. I'm using a custom board file and project so tried switched to trying it with the hello world sample using the nrf52840_pca10059 board file and enabled the option there, the area where the MBR is, is filled with 0x00 inside the hex file.
Thanks,
Jamie

-----Original Message-----

Hi,

try enabling

CONFIG_BUILD_NO_GAP_FILL

IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.


Re: Removing padding from generated hex files

Sebastian Boe
 

Hi,

try enabling

CONFIG_BUILD_NO_GAP_FILL

IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on behalf of via Lists.Zephyrproject.Org <Jamie.Mccrae=lairdconnect.com@lists.zephyrproject.org>
Sent: Thursday, April 4, 2019 2:14 PM
To: devel@lists.zephyrproject.org
Cc: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] Removing padding from generated hex files

Hi,
Is it possible when building projects to have the flash sections that are defined in the dts but unused (in this instance, the Nordic MBR) and not have them filled but instead left blank/empty? I have created a simple project and enabled mcuboot support in the build options, it uses the flash partition table correctly and places the code at 0x1000 instead of 0x0, but it has filled 0x0 – 0x1000 with 0x00 bytes, which if flashed will overwrite the Nordic MBR and leave a dead module. Instead, I would like to have code start at 0x1000, nothing at all placed between 0x0 – 0x1000, and the same in another section which is defined later, this is so that there can be external data present which isn’t overwritten when the application hex file is flashed to the module.
Thanks,
Jamie


Removing padding from generated hex files

Jamie Mccrae <Jamie.Mccrae@...>
 

Hi,

Is it possible when building projects to have the flash sections that are defined in the dts but unused (in this instance, the Nordic MBR) and not have them filled but instead left blank/empty? I have created a simple project and enabled mcuboot support in the build options, it uses the flash partition table correctly and places the code at 0x1000 instead of 0x0, but it has filled 0x0 – 0x1000 with 0x00 bytes, which if flashed will overwrite the Nordic MBR and leave a dead module. Instead, I would like to have code start at 0x1000, nothing at all placed between 0x0 – 0x1000, and the same in another section which is defined later, this is so that there can be external data present which isn’t overwritten when the application hex file is flashed to the module.

Thanks,

Jamie


Re: BT Mesh Health Server Fault Register #bluetoothmesh #zephyrbluetoothmesh

Johan Hedberg
 

Hi Billy,

On 3 Apr 2019, at 19.44, William Fish <William.fish@manulytica.com> wrote:
Thanks, I've had a look but I still need to understand how to register the faults, via application. Any hint would be appreciated.
That depends on your application and the source of the faults. All the stack requires is for you to keep track of the fault history. You could do that e.g. with a simple u8_t array like the mesh shell does.

In the case of the mesh shell it has arrays for current and registered faults, with the assumption that there can be up to CUR_FAULTS_MAX different faults. There are also fault-add and fault-del commands to artificially introduce faults (the shell is a testing program - for a real device you’d have the faults coming from some real source). Take a look at how the command handlers for add-fault and del-fault behave, i.e. the cmd_add_fault() and cmd_del_fault() functions. Any time a fault appears or goes away you’re expected to call the bt_mesh_fault_update() API so that the right message gets sent out to the network (if the node is configured to do publication through its health server).

The difference between the two types fault arrays (if it’s unclear from the mesh spec): registered faults is the history of faults that your device has experienced at some point in its history, whereas current faults is the set of faults that is currently experiencing. That’s why the add-fault shell command adds to both arrays but the del-fault only removes from the current faults array.

Johan


Re: BT Mesh Health Server Fault Register #bluetoothmesh #zephyrbluetoothmesh

Johan Hedberg
 

Hi,

On 3 Apr 2019, at 19.13, William Fish <William.fish@manulytica.com> wrote:
I am looking at the BT Mesh Health Server, and Client, so that i can report faults between nodes and ultimately to the central control application.

Unfortunately, i have run into a problem; How do I register a fault? Now the nice people over at Nordic have a few handy functions that allow me to add/set/clear faults but I'm at a loss with the Zephyr implementation.

Nordic SDK Functions
void health_server_fault_register(health_server_t * p_server, uint8_t fault_code);
void health_server_fault_clear(health_server_t * p_server, uint8_t fault_code);
bool health_server_fault_is_set(health_server_t * p_server, uint8_t fault_code);
The Zephyr mesh health server leaves fault registration up to the application, however you do need to register a bt_mesh_health_srv_cb struct which includes callbacks for retrieving the faults, clearing them, etc (these are called whenever the stack needs them). Take a look at e.g. how this is done in the mesh shell in subsys/bluetooth/host/mesh/shell.c.

Johan


BT Mesh Health Server Fault Register #bluetoothmesh #zephyrbluetoothmesh

William Fish
 

Hi All,
I am looking at the BT Mesh Health Server, and Client, so that i can report faults between nodes and ultimately to the central control application.

Unfortunately, i have run into a problem; How do I register a fault? Now the nice people over at Nordic have a few handy functions that allow me to add/set/clear faults but I'm at a loss with the Zephyr implementation.

Nordic SDK Functions
void health_server_fault_register(health_server_t * p_server, uint8_t fault_code);
void health_server_fault_clear(health_server_t * p_server, uint8_t fault_code);
bool health_server_fault_is_set(health_server_t * p_server, uint8_t fault_code);


Re: #ble #nrf52840 #nrf52840 #ble

Carles Cufi
 

Hi Henry,

 

This is news to me and, although it might be expected, I would like to check with a couple of people. So I think this deserves being tracked. Would you mind opening a “Question” issue on GitHub so I can copy the relevant people and we can investigate a bit further? If you have any code snippets that you can attach to the issue that would be most helpful as well.

 

Thanks,

 

Carles

 

From: devel@... <devel@...> On Behalf Of henry.wagner via Lists.Zephyrproject.Org
Sent: 29 March 2019 22:41
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] #ble #nrf52840

 

After implementing a throughput test for BLE using #nrf52840 hardware and Zephyr 1.14-rc1, notice some curious behavior in data we are collecting.  The test seems to show that sending data from the central (client) to peripheral (server) throughput performance is relatively balanced per connection but one peripheral seems to get little data and one peripheral get more.  In data flow from the peripherals to the central, it is much more unbalanced with one or two peripherals having all the throughput and the others having none.

The central to peripheral is 1:N where the central is a single point source.  The many peripherals to central is an N:1 with many sources.  In my case N is 1 up to 5, but would like to be greater.  The overall aggregate throughput is constant, just not evenly distributed among the BLE devices or comm directions.  Using DLE and 2M PHY

Any thoughts to why this behavior is present and how to diagnose/resolve to produce consistent and balanced throughput among the BLE devices?    Do I have something misconfigured in my devices?  Can share if that will help.


Re: Error Msg whey type "west --version" on the guide of v1.14-rc3

Kai Ren
 

Hi Aaron,
I'm using Windows.

After type "pip --version", the output is:
pip3 --version
pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7)


Best Regards,
Kai

From: Aaron Xu <overheat1984@gmail.com>
Sent: Wednesday, April 3, 2019 9:53 AM
To: Kai Ren <kren@bluetooth.com>
Cc: devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Error Msg whey type "west --version" on the guide of v1.14-rc3

Hi,

Which OS? win or linux(ubuntu etc.)?

# Linux
pip3 install --user west

# macOS and Windows
pip3 install west

PS: make sure you already installed python3.





On Wed, Apr 3, 2019 at 9:37 AM Kai Ren <mailto:kren@bluetooth.com> wrote:
Hello,
I follow this link, https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.zephyrproject.org%2Flatest%2Fgetting_started%2Findex.html%23get-the-source-code&data=02%7C01%7C%7Cc25091f7b8ac4cd5416108d6b7d72dac%7Ce4e0fec5fc6c4dd6ae374bdb30e156b9%7C0%7C0%7C636898532159410710&sdata=GafJVpl0vcuzNoeWclKDT8N3zb9s%2BQyTV5tfNzvZY0Q%3D&reserved=0 , to install west, but after type *west --version*, below message pop-up, it looks abnormal.
 
West bootstrapper version: v0.5.7 (c:\python37\lib\site-packages\west\_bootstrap)
Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\west.exe\__main__.py", line 9, in <module>
  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 479, in main
    wrap(wrap_argv)
  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 445, in wrap
    cwd=west_git_repo).decode(sys.getdefaultencoding()).strip()
  File "c:\python37\lib\subprocess.py", line 376, in check_output
    **kwargs).stdout
  File "c:\python37\lib\subprocess.py", line 453, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\python37\lib\subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "c:\python37\lib\subprocess.py", line 1155, in _execute_child
    startupinfo)
NotADirectoryError: [WinError 267] The directory name is invalid
 
 
Best Regards,
Kai


Re: Error Msg whey type "west --version" on the guide of v1.14-rc3

Aaron Xu
 

Hi,

Which OS? win or linux(ubuntu etc.)?

# Linux
pip3 install --user west

# macOS and Windows
pip3 install west

PS: make sure you already installed python3.





On Wed, Apr 3, 2019 at 9:37 AM Kai Ren <kren@...> wrote:

Hello,

I follow this link, https://docs.zephyrproject.org/latest/getting_started/index.html#get-the-source-code , to install west, but after type *west --version*, below message pop-up, it looks abnormal.

 

West bootstrapper version: v0.5.7 (c:\python37\lib\site-packages\west\_bootstrap)

Traceback (most recent call last):

  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main

    "__main__", mod_spec)

  File "c:\python37\lib\runpy.py", line 85, in _run_code

    exec(code, run_globals)

  File "C:\Python37\Scripts\west.exe\__main__.py", line 9, in <module>

  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 479, in main

    wrap(wrap_argv)

  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 445, in wrap

    cwd=west_git_repo).decode(sys.getdefaultencoding()).strip()

  File "c:\python37\lib\subprocess.py", line 376, in check_output

    **kwargs).stdout

  File "c:\python37\lib\subprocess.py", line 453, in run

    with Popen(*popenargs, **kwargs) as process:

  File "c:\python37\lib\subprocess.py", line 756, in __init__

    restore_signals, start_new_session)

  File "c:\python37\lib\subprocess.py", line 1155, in _execute_child

    startupinfo)

NotADirectoryError: [WinError 267] The directory name is invalid

 

 

Best Regards,

Kai

 


Error Msg whey type "west --version" on the guide of v1.14-rc3

Kai Ren
 

Hello,

I follow this link, https://docs.zephyrproject.org/latest/getting_started/index.html#get-the-source-code , to install west, but after type *west --version*, below message pop-up, it looks abnormal.

 

West bootstrapper version: v0.5.7 (c:\python37\lib\site-packages\west\_bootstrap)

Traceback (most recent call last):

  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main

    "__main__", mod_spec)

  File "c:\python37\lib\runpy.py", line 85, in _run_code

    exec(code, run_globals)

  File "C:\Python37\Scripts\west.exe\__main__.py", line 9, in <module>

  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 479, in main

    wrap(wrap_argv)

  File "c:\python37\lib\site-packages\west\_bootstrap\main.py", line 445, in wrap

    cwd=west_git_repo).decode(sys.getdefaultencoding()).strip()

  File "c:\python37\lib\subprocess.py", line 376, in check_output

    **kwargs).stdout

  File "c:\python37\lib\subprocess.py", line 453, in run

    with Popen(*popenargs, **kwargs) as process:

  File "c:\python37\lib\subprocess.py", line 756, in __init__

    restore_signals, start_new_session)

  File "c:\python37\lib\subprocess.py", line 1155, in _execute_child

    startupinfo)

NotADirectoryError: [WinError 267] The directory name is invalid

 

 

Best Regards,

Kai

 


BLE throughput under load, QOS #ble #nrf52840

henry.wagner@...
 

After implementing a throughput test for BLE using Nordic nrf52840 hardware and Zephyr 1.14-rc1, notice some curious behavior in data we are collecting.   The test is to evaluate maximum throughput in a 1 to many and many to 1 scenario. Testing seems to show that when sending data from the central (client) to peripheral (server), the throughput performance is relatively balanced per connection but one peripheral seems to get less data and one peripheral get more than the others.  In data flow from the peripherals to the central, it is much more unbalanced with one or two peripherals having all the throughput and the others having none.

The central to peripheral is 1:N where the central is a single point source.  The many peripherals to central is an N:1 with many sources.  In my case N is 1 up to 5, but would like to be greater.  The overall aggregate throughput is constant, just not evenly distributed among the BLE devices or comm directions.  Using DLE and 2M PHY and data is transferred using bt_gatt_write_without_response on client and bt_gatt_notify and the server.

There doesn't seem to be any QOS but I would not have expected such unbalanced behavior.  Any thoughts to why this is and how to diagnose/resolve to produce consistent and balanced throughput among the BLE devices?    Do I have something misconfigured in my devices?  Can share if that will help.


lightweight hash/MAC support

Jacob Morales Gonzalez <jacobinho86@...>
 

Hi, currently i am working on a benchmark project of the following light weight crypto hash and mac primitives:

Currently (as far as i know) there are baremetal software implementations for ATtiny Devices (https://link.springer.com/content/pdf/10.1007%2F978-3-642-37288-9_11.pdf), that ignore portability, and i think it is worth to integrate that functionality into the zephyr project, because it'll add light weight crypto protocols that are starting to be used in its fields of application:


Re: Atomic() vs k_sched_lock() vs irq_lock() vs k_mutex_lock()

Boie, Andrew P
 

You should be using the APIs in include/atomic.h

 

On arches that don't natively support atomic operations, these get implemented in terms of irq_lock()

 

Andrew

 

From: devel@... [mailto:devel@...] On Behalf Of Kim Bøndergaard
Sent: Monday, April 1, 2019 6:53 AM
To: Zephyr-devel@...
Subject: [Zephyr-devel] Atomic() vs k_sched_lock() vs irq_lock() vs k_mutex_lock()

 

We have an internal discussion about the recommended usage of the 4 methods mentioned in subjects, when the goal is to protect an assignment of a variable (u32 - any platform) within one task so it is not resulting in an invalid reading from a higher priority task.

 

Mutex'es are usually good since they only disturb the threads being involved in accessing the shared variable - but are they overkill in this case?

irq_lock() sounds like something fast but effects the entire system

k_sched_lock() is fast (according to the manual) but effects all threads as I see it.

 

atomic is probably a good option, but what's the efficiency on e.g. an ARM platform not natively supporting atomic's.

 

Any ideas or recommendation about when to use what solution?

 

 

Kim Bøndergaard
Prevas A/S
Team Manager / Systems Architect
 
Hedeager 3, DK-8200 Aarhus N

Phone +45 3315 9090
Mobile +45 5154 3961
kibo@...
www.prevas.dk

 

 


Re: GitHub Help

Kinder, David B <david.b.kinder@...>
 

Hi Lars and Billy,

When you do get things figured out, please let me know what GitHub issues you were having and if there are improvements to the Zephyr getting started documentation we can make.

I’m a tech writer on the project, so you can reply just to me with any insights on improvements.

 

Thanks!

-- david (david.b.kinder@...)

 

 

From: devel@... [mailto:devel@...] On Behalf Of Lars Knudsen
Sent: Monday, April 01, 2019 8:27 AM
To: William Fish <William.fish@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] GitHub Help

 

Hi Billy,

 

what seems to be the problem? - just reply to me so we don't bother the list

 

br

Lars

 

On Mon, Apr 1, 2019 at 5:25 PM William Fish <William.fish@...> wrote:

Help Please.
I am new to GitHub and am having a terrible time trying to follow the instructions as I used a mixed environment the instructions and results are causing me (and everyone involved) a lot of unnecessary problems.

Can anyone help?

Billy..


Re: GitHub Help

Lars Knudsen
 

Hi Billy,

what seems to be the problem? - just reply to me so we don't bother the list

br
Lars

On Mon, Apr 1, 2019 at 5:25 PM William Fish <William.fish@...> wrote:
Help Please.
I am new to GitHub and am having a terrible time trying to follow the instructions as I used a mixed environment the instructions and results are causing me (and everyone involved) a lot of unnecessary problems.

Can anyone help?

Billy..


GitHub Help

William Fish
 

Help Please.
I am new to GitHub and am having a terrible time trying to follow the instructions as I used a mixed environment the instructions and results are causing me (and everyone involved) a lot of unnecessary problems.

Can anyone help?

Billy..

1801 - 1820 of 7688