Re: Zephyr's k_sleep gets stuck on nRF52832
Peter A. Bigot
Version 1.14.99 suggests you have a snapshot of the development series leading up to the recent 2.0 release. The problem you're reporting was fixed in #17845 in upstream Zephyr 2019-08-01. It may be worth updating to the 2.0 release for your development as many other problems were fixed in the latter part of August.
Peter
|
||
|
||
Zephyr's k_sleep gets stuck on nRF52832
Kimberly Langland <KimL@...>
Hello All,
We were seeing an issue that occasionally, all tasks waiting for a timeout using k_sleep get stuck in the suspended state (while other tasks continue to run normally), and then after about 8 minutes full normal functionality returns.
After digging into this issue, is appears that either the RTC needs an N+3 buffer between the RTC->COUNTER and the RTC->CC value to guarantee to trigger the ISR (instead of an N+2 buffer as documented), or that there is a race condition in the nrf_rtc_timer driver where between the time of reading the RTC->COUNTER, and writing to RTC->CC, RTC->COUNTER has already advanced.
Has anyone else seen this, or know the appropriate fix/workaround?
Detailed description: * Zephyr Version: 1.14.99 * Running on nR53832
Each time this behavior occurs, the first task in the timeout_list (in the kernel/timeout module) has a timeout time of 1 tick. Reading the RTC1 registers, directly as this occurs, the RTC1->COUNTER value is just above the RCT1->CC[0] value. Normal behavior returns about 8 mins later when the RTC1->COUNTER register passes the RTC1->CC[0] value a second time (this is a 24 bit register clocked at 32kHZ with no prescaler).
In Nordic's documentation for the RTC on nRF52832 it states: "If the COUNTER is N, writing N+2 to a CC register is guaranteed to trigger a COMPARE event at N+2". Zephyrs driver seems to address this case by writing N+2 to the RTC1->CC[0] register (instead on N+1) in the case that a one tick timeout is requested. However in this case we are still not receiving the ISR until the COUNTER has looped around.
I have tried setting the RTC1->CC[0] register instead to N+3 (in the 1 tick timeout case), and have not yet seen the issue reoccur with the following modification to the nrf_rtc_timer driver.
/* dt - is the delta between RTC->COUNTER and RTC->CC[0] * cyc - is the value to write to RTC->CC[0] */ } else if (dt == 1) { - set_comparator(cyc + 1); + set_comparator(cyc + 2); }
|
||
|
||
Listen for "USB_DETECTED" events?
Benjamin Lindqvist
Hi, Going through the APIs today looking for a public function for discerning if we are connected to something (i.e. we are supplied by VBUS) but I couldn't find anything. There is some internal API at `subsys/usb/usb_device.c` (usb_register_status_callback) but it clearly won't work since it's not public etc. Am I just missing it or does it not exist?
|
||
|
||
Upcoming Event: Zephyr Project: Dev Meeting - Thu, 09/12/2019 8:00am-9:00am, Please RSVP
#cal-reminder
devel@lists.zephyrproject.org Calendar <devel@...>
Reminder: Zephyr Project: Dev Meeting When: Thursday, 12 September 2019, 8:00am to 9:00am, (GMT-07:00) America/Los Angeles Where:https://zoom.us/j/993312203 An RSVP is requested. Click here to RSVP Organizer: devel@... Description: Join Zoom Meeting
|
||
|
||
Dev Review Meeting Agenda - 12 Sept 2019
Kumar Gala
Here’s the issues/PRs on the agenda so far for this week’s Dev Review Meeting:
* posix: Kconfig: Allow to enable individual components, POSIX_API just enables all https://github.com/zephyrproject-rtos/zephyr/pull/18780 If you you have anything else let me know. - k
|
||
|
||
Re: c++ application development
#nrf52840
Peter A. Bigot
Not until we get #19002 and then #18464 merged. Since I'm the one with concerns about those I'll work to get them in next week if that's possible. For now you could make progress by taking 18464 into your Zephyr tree; then you can use the malloc-based new/delete that comes free from combining libc++ and newlib.
Peter
|
||
|
||
Re: c++ application development
#nrf52840
Narendar Malepu
Hi, Is there source for memory allocation using new other than k_malloc ? Because in my application want to use memory alloation from free heap not from the heap memory pool.
On Thu, Sep 12, 2019 at 6:11 AM Peter A. Bigot <pab@...> wrote: Dynamic memory allocation is supported in Zephyr C++, though you have to enable a source for the memory. You should not have to define overloads for those operators.
|
||
|
||
Re: c++ application development
#nrf52840
Peter A. Bigot
Dynamic memory allocation is supported in Zephyr C++, though you have to enable a source for the memory. You should not have to define overloads for those operators.
tests/application_development/libcxx in current master is the most complete example of C++ use. PRs 18464, 18991, and 19002 may be helpful as well. Peter
|
||
|
||
c++ application development
#nrf52840
Narendar Malepu
Hi,
we are developing an application in c++, for dynamic memory allocation using new as operator overloading as below void *operator new(size_t size) {
void *p = malloc(size);
return p;
}
void operator delete(void *ptr)
{
free(ptr);
} but as per documentation it is mention that new and delete are not supported, complier is not showing any error or warning for my usage. Can you help regarding above new operator overloading whether to use it or not in my application. Thanks
|
||
|
||
Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2
Paul Sokolovsky
Hello Marti,
On Fri, 6 Sep 2019 17:41:56 +0000 "Bolivar, Marti" <Marti.Bolivar@...> wrote: Hi Paul,[] Of course, no test suite is perfect, but I hope this addresses yourIt definitely does, and I much appreciate the detailed response (hopefully you wrote it not just as a response, but also a checklist for yourself, confirming there're no obvious things missed). It actually took some time to go in detail thru it, and I agree that good thought was put into various cases, it works close to the best possible (and I'm conservative only because I didn't use it much enough). To address a potential follow-up, I am looking into adding betterSounds great, and even the test file you referred to is 20K, so testing coverage is definitely not "bare". My only concern would be that maintaining west has become a non-trivial endeavor, but I guess, that part is covered, so all readers of the original and this thread should be happy about it! Thanks again! Thanks, -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
||
|
||
RTIO API, Other potential uses
Tom Burdick
Hi Everyone, I've been steadily and surely working on a new API, primarily aimed at sensors, but has been split in such a way that device drivers could extend the base API of configuring a stream with rules and triggering reads for other things. It was always my intention that this base API potentially be useful for other things. Things like sensors that might also need DMA like transfers without actually copying things. A look-see of how things are coming along, for sensors and this API, can be found Note that the rtio_sensor prefix and requirements are an extension of the RTIO device API rtio_sensor_api: https://github.com/bfrog/zephyr/pull/1/files#diff-7de7f52cfc39aed90f28eab7c0ebb97fR235 I'd be interested in knowing if anyone has a potential use case for the base rtio_api besides the sensor use that I'm working on. If so I'll push hard to work on that with you to get it in for 2.1 perhaps. Let me know your thoughts! Cheers, Tom
|
||
|
||
Upcoming Event: Zephyr Project: APIs - Tue, 09/10/2019 9:00am-10:00am, Please RSVP
#cal-reminder
devel@lists.zephyrproject.org Calendar <devel@...>
Reminder: Zephyr Project: APIs When: Tuesday, 10 September 2019, 9:00am to 10:00am, (GMT-07:00) America/Los Angeles Where:https://zoom.us/j/177647878 An RSVP is requested. Click here to RSVP Organizer: devel@... Description: Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/177647878 Live meeting minutes: https://docs.google.com/
|
||
|
||
API meeting: Agenda
Carles Cufi
Hi all,
This week we will look at: - GPIO: Update on progress - Roadmap for GPIO inclusion: https://github.com/zephyrproject-rtos/zephyr/issues/18530 - Merge https://github.com/zephyrproject-rtos/zephyr/pull/16648 to topic-gpio - V4Z: Quick update on PR status https://github.com/zephyrproject-rtos/zephyr/pull/17194 - Sensor API: Update on progress Additional items in the "Triage" column in the GitHub project may be discussed if time permits. If you want an item included in the meeting, please add it to the GitHub project. https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion https://github.com/zephyrproject-rtos/zephyr/projects/18 https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards,
|
||
|
||
Re: Dual ethernet interfaces on Zephyr OS ?
Jukka Rissanen
Hi,
toggle quoted messageShow quoted text
there exists NET_DEVICE_INIT_INSTANCE() macro (in include/net/net_if.h) that can be used for this purpose. You would need to edit the ethernet driver and call that macro with suitable parameters. You could also create ETH_NET_DEVICE_INIT_INSTANCE() (it does not exists yet) from ETH_NET_DEVICE_INIT() (in include/net/ethernet.h) and add instance support to that. Cheers, Jukka
On Tue, 2019-09-10 at 19:16 +0800, "Explorer wrote:
Hello,
|
||
|
||
Dual ethernet interfaces on Zephyr OS ?
"Explorer
Hello, I have got one I.MXRT1062 board with 2 ethernet port on it. And I checked the I.MXRT1062 EVK BSP and it only support one ETH port. Is there anything (docs or code) I can refer to , so I can add dual ethernet interfaces with tcp-ip stack to this board? ------ B.R. PeterC
|
||
|
||
Re: native_posix on MacOS?
#builds
alpi@...
> Perhaps this is an area I could lend a hand.
You’d be very welcome.
From: Allen Curtis <allen@...>
Sent: Monday 9 September 2019 16:23 To: Alberto Escolar Piedras (ALPI) <ALPI@...> Cc: devel@... Subject: Re: [Zephyr-devel] native_posix on MacOS? #builds
Thanks Alberto,
Everything works great in my Linux VM. Perhaps this is an area I could lend a hand.
Allen
On Mon, Sep 9, 2019 at 4:54 AM Alberto Escolar Piedras (ALPI) <ALPI@...> wrote:
-- Allen Curtis Medical Device Architect Critical Software Solutions, LLC
|
||
|
||
Re: native_posix on MacOS?
#builds
Allen Curtis
Thanks Alberto, Everything works great in my Linux VM. Perhaps this is an area I could lend a hand. Allen
On Mon, Sep 9, 2019 at 4:54 AM Alberto Escolar Piedras (ALPI) <ALPI@...> wrote:
--
Allen Curtis Medical Device Architect Critical Software Solutions, LLC
|
||
|
||
Re: native_posix on MacOS?
#builds
alpi@...
Hi,
> could someone tell me if building Zephyr to run natively on MacOS is supported? https://github.com/zephyrproject-rtos/zephyr/issues/10945
BR
From: devel@... <devel@...>
On Behalf Of allen via Lists.Zephyrproject.Org
Sent: Monday 9 September 2019 05:51 To: devel@... Cc: devel@... Subject: [Zephyr-devel] native_posix on MacOS? #builds
Hello, Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include
-I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h
-ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow
-Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int
-fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj
-MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj
-c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt ../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive GEN_OFFSET_SYM(_kernel_t, current); ^ ../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM' GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M)) ^ ../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM' "\n\t.type\t" #name ",@object" : : "n"(value)) ^ <inline asm>:3:2: note: instantiated into assembly here .type ___kernel_t_current_OFFSET,@object
|
||
|
||
native_posix on MacOS?
#builds
Allen Curtis
Hello,
Before I waste a lot of time, could someone tell me if building Zephyr to run natively on MacOS is supported? I am getting the following error messages regarding GEN_OFFSET_SYM() and GEN_ABSOLUTE_SYM(). Thanks Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include -I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt ../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive GEN_OFFSET_SYM(_kernel_t, current); ^ ../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM' GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M)) ^ ../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM' "\n\t.type\t" #name ",@object" : : "n"(value)) ^ <inline asm>:3:2: note: instantiated into assembly here .type ___kernel_t_current_OFFSET,@object
|
||
|
||
NRF1802
Miguel Wisintainer <tcpipchip@...>
Sir,
Can you help me ? I tried to implement the ADC on that chip but now success!
Can you send a simple example that enable a analog input (for example 10 bits, and intern 3.3V reference) and read it ?
P0.04 AIN5 Digital I/O Analog input General purpose I/O pin. ADC
Today i implemented the BLE and works very fine! The board used was BLE400! But i want to send the analog value!
Thank you so much!
Miguel
|
||
|