Re: big_http_download sample localhost download
I forgot to mention.
After downloading up to 2680 bytes, I receive the following error: Timeout on reading responsees; 2 KiB; 0 MiB
|
|
Re: big_http_download sample localhost download
Hi Robert Thank you for your assistance. I managed to get qemu to begin downloading a file on localhost. However, the file downloads up to a maximum of 2680 bytes, then it fails, and restarts the download. Do you have any suggestions on why this only happens when downloading on localhost? Regards Brenton
On Wed, Nov 3, 2021 at 2:45 PM Lubos, Robert <Robert.Lubos@...> wrote:
|
|
ODP: k_sleep causes nRF5340 to reset
Chruściński, Krzysztof
Hi Jason,
I would check two things:
regards,
Krzysztof
Od: users@... <users@...> w imieniu użytkownika Jason Bens via lists.zephyrproject.org <jason.bens=teufel.de@...>
Wysłane: środa, 3 listopada 2021 12:35 Do: users@... <users@...> Temat: [Zephyr-users] k_sleep causes nRF5340 to reset Hi,
I’m porting some code from an nRF5340 eval board to my own board, and I’ve run into an issue. While waiting for the net core to boot up, I enter a loop and call k_sleep until an initialization callback returns, before proceeding to the rest of the code. For some reason, k_sleep is causing the application to reset, but only when building for release. Debug works perfectly fine. Replacing k_sleep with k_busy_wait or k_yield also works. This code was originally built on the zephyr release that ships with nRF Connect SDK 1.6.1, but updating to 1.7.1 doesn’t resolve the issue.
I’m working on creating a minimal project that reproduces this behaviour, but in the meantime, what could I check to troubleshoot this? Blinky, which also uses k_sleep in main, does not trigger a reset loop.
Thanks,
|
|
Re: big_http_download sample localhost download
Lubos, Robert
Hi Brenton,
The DNS server configuration shouldn’t be an issue in this case, as we provide the IP address of the server – in such case the DNS query isn’t even sent as we already know the IP address.
I’ve reproduced the problem locally, and it turned out there was a problem with ARP retransmission handling, wrong source address was selected for the retransmission, I’ve posted a PR with a fix proposal: https://github.com/zephyrproject-rtos/zephyr/pull/40038
Another thing is that the reason for the ARP retransmission even being sent is the fact that e1000 driver does not process any incoming packets early after boot (for about 1 second). I have to little knowledge the particular device/driver to figure out why is this happening, but I’ve asked the question in the aforementioned PR, perhaps we’ll get some answers there.
Regards, Robert
From: users@... <users@...>
On Behalf Of Brenton Chetty via lists.zephyrproject.org
Sent: wtorek, 2 listopada 2021 20:11 To: users@... Subject: [Zephyr-users] big_http_download sample localhost download
Hello,
|
|
k_sleep causes nRF5340 to reset
Jason Bens
Hi,
I’m porting some code from an nRF5340 eval board to my own board, and I’ve run into an issue. While waiting for the net core to boot up, I enter a loop and call k_sleep until an initialization callback returns, before proceeding to the rest of the code. For some reason, k_sleep is causing the application to reset, but only when building for release. Debug works perfectly fine. Replacing k_sleep with k_busy_wait or k_yield also works. This code was originally built on the zephyr release that ships with nRF Connect SDK 1.6.1, but updating to 1.7.1 doesn’t resolve the issue.
I’m working on creating a minimal project that reproduces this behaviour, but in the meantime, what could I check to troubleshoot this? Blinky, which also uses k_sleep in main, does not trigger a reset loop.
Thanks,
|
|
version of zephyr project
Nikos Karamolegkos
Hello, I have downloaded zephyrproject one year ago and I was developing in zephyr subfolder. Now I want to share this repository with my colleague, how can I find which version of zephyrproject is installed (where I had started) in order to ask him to install the same version and use my zephyr folder.
What is the best solution to this? -- Nikos Karamolegkos R & D engineer at ICS-FORTH Telecommunications and Networks Lab (TNL)
|
|
big_http_download sample localhost download
Hello,
I am attempting to download a file hosted on a localhost file server. - I am hosting a file named "Zephyr" using "python3 -m http.server 8980" - I am using a zeth interface and the "overlay-e1000.conf" to allow qemu to communicate with localhost. I successfully tested the LWM2M client example to ensure the connection was good. - I can download the Zephyr file when I input "http://192.0.2.2:8980/zephyr" into a web browser. - I attempted using the "overlay-ci.conf" file to perform the download. CONFIG_SAMPLE_BIG_HTTP_DL_URL="http://192.0.2.2:8980/zephyr" however I get the following error: Preparing HTTP GET request for http://192.0.2.2:8980/zephyr addrinfo @0x6da008: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1423 Iteration 1 of 1: sock = 0 [00:00:00.000,000] <inf> net_config: Initializing network [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1 [00:00:00.000,000] <inf> net_config: Running dhcpv4 client... Error: connect(sock, ai->ai_addr, ai->ai_addrlen) exit I managed to get the example to download the online vmlinuz file, however I cannot get the sample to download via localhost. Do you have any suggestions on what steps I could have missed? Could it be a DNS issue? for downloading the online vmlinuz file I used 8.8.8.8 as CONFIG_DNS_SERVER1. For localhost, I left it at 192.0.2.2 With thanks Brenton
|
|
Re: Timer with fixed interrupt period
Henrik Brix Andersen
Hi,
toggle quoted messageShow quoted text
The counter API provides exactly that: https://docs.zephyrproject.org/latest/reference/peripherals/counter.html Brgds, Brix -- Henrik Brix Andersen
On 31 Oct 2021, at 20.46, Arsenii Soitu <seniasoitu@...> wrote:
|
|
Timer with fixed interrupt period
Arsenii Soitu
Hello. I use stm32f429 and Zephyr Os 2.7.0
Is there any API for timers with fixed interrupt period? I need to change PWM duty cycle exactly every 1000 us. In bare-metal I would have used general purpose timer with fixed interrupt period, and changed duty cycle in interrupt handler But how should I manage with such task under Zephyr Os? Thank you
|
|
USB OTG?
Dave Nadler
Does Zephyr support USB host mode and also USB-OTG? -- Dave Nadler, USA East Coast voice (978) 263-0097, drn@..., Skype Dave.Nadler1
|
|
stm32: PWM: "st,prescaler" pwm property moved to timers node
Alexandre BOURDIOL <alexandre.bourdiol@...>
Hi all,
I'd like to inform STM32 PWM users that I'm pushing a change [1] to move Device Tree property "st,prescaler" from pwm node to timers node. Benefit is that it reflect hardware reality, and prescaler is usable by other drivers based on timers (like counter with ongoing PR #39414)
This change will be hopefully integrated in the next Zephyr DV. Note that I temporarily avoid compatibility break: if "st,prescaler" is defined in PWM node, it will be the value used by PWM driver.
[1] https://github.com/zephyrproject-rtos/zephyr/pull/39628
Regards, Alexandre Bourdiol
|
|
Re: Setting MAC address at boot?
#stm32
Anders
Update! Problem solved. The function net_if_set_link_addr() sets the MAC address.
Why isn't the function named net_if_set_mac_addr()?
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Adam Podogrocki
Hi Brenton, The only images you should flash are MCUboot and an image that goes to Slot#0. Any further operations should be conducted with the mcumgr tool. At least I used to do that. This tool gives you options to upload the new image (the first uploaded image should obviously be the one dedicated to slot#1), list already uploaded images, to check which slot is the current one, to boot from specified slot in test mode and finally to confirm, that the currently run image should become the active one. This tool performs swapping of images, so this is why you should also have a scratch_partition in your layout, e.g. partitions { boot_partition {}; slot0_partition {}; slot1_partition {}; scratch_partition {}; data_partition{}; // remaining space for application data purposes, optional }; When the image is confirmed, then swapping takes place and always the image from slot#0 is booted. At the time I used that tool UART and Bluetooth protocol were available. Cheers, Adam
On Thu, 28 Oct 2021 at 08:57, Brenton Chetty <brent7984@...> wrote:
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Hi Adam Thank you for your reply. Sorry for the late response, as I have been getting sporadic results, i.e. sometimes the image upgrade works and most of the time it doesn't. I have been using the following commands to sign and flash the image: rm -r build && west build -p auto -b nrf52840dk_nrf52840 samples/zephyr/hello-world/ -DCONFIG_BOOTLOADER_MCUBOOT=y -DDTC_OVERLAY_FILE="boards/nrf52840dk_nrf52840.overlay" west sign -t imgtool -- --key ~/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem --header-size 0x200 --align 8 --version 3.0.2+1 --slot-size 0x67000 --pad && west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex where the overlay file contains: / { chosen { zephyr,code-partition = &slot1_partition; }; }; I used --pad for both slots. I've noticed that sometimes when I flash to slot 1, sometimes the primary image swap_type=0x2 (test) and sometimes it's 0x4 (revert). I have confirmed that I am flashing my slot0 and slot1 images to the correct addresses (with padding). I am not sure if the Version number plays a role in my error. Do you have any suggestions on the top of your mind as to why I am getting sporadic results with the firmware upgrades? With thanks Brenton
On Tue, Oct 26, 2021 at 6:54 PM Adam Podogrocki <a.podogrocki@...> wrote:
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Adam Podogrocki
Hi Brenton, please try similar command: imgtool.py sign --key root-rsa-2048.pem --header-size 0x200 --align 8 --version <YOUR_VERSION> --slot-size <YOUR_SLOT_SIZE_IN_HEX> ZEPHYR_BIN_FILE NAME_OF_THE_SIGNED_FILE Cheers, Adam
On Mon, 25 Oct 2021 at 13:40, Brenton Chetty <brent7984@...> wrote: 1. Hi, how do I go about signing an image for slot1 usage.
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Martin Kozusky
Hi,
why do you want to compile it with
offset of slot1? Normaly you compile image for slot0, upload it to
slot1 and MCUboot will swap them after reboot.
Martin
Dne 25.10.2021 v 13:40 Brenton Chetty
napsal(a):
1. Hi, how do I go about signing an image for slot1 usage.
|
|
Setting MAC address at boot?
#stm32
Anders
Hi,
I'm new to Zephyr and is struggling with how to configure the MAC address for the ethernet interface on an STM32F767 based platform at boot. I have searched the internet and the Zephyr documentation for guidance but have not found anything useful. I have managed to set the MAC address at boot by modifying the function eth_initialize in eth_stm32_hal.c but there must be another way of doing this then modifying the driver or? Regards, Anders
|
|
MCUboot - Signing image for slot 1
#mcuboot
1. Hi, how do I go about signing an image for slot1 usage.
I used the following command for flashing into slot0 successfully: west sign -t imgtool -- --key ~/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem && west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex I adjusted my nrf52840dk_nrf52840 config as follows to flash into slot1: chosen { zephyr,code-partition = &slot1_partition; }; however when signing the image after this change, the offsets remain the same as it should be for slot 0 === image configuration: partition offset: 49152 (0xc000) (slot 1 should start at 0x73000) partition size: 421888 (0x67000) rom start offset: 512 (0x200) 2. Is there any tutorials online for MCUboot usage on Zephyr? I am attempting to get OTA firmware upgrade on my dev kit and I am not sure about the basic commands (Config Variables) to utilize mcuboot on zephyr. Regards Brenton
|
|
Re: MCUboot "Image in the primary slot is not valid"
#mcuboot
Martin Kozusky
Hi,
may be you forgot to sign the image?
west sign -t imgtool -- --key
path_to_mcuboot\root-rsa-2048.pem (or other key that mcuboot is
using)
west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex Martin
Dne 21.10.2021 v 14:17 Brenton Chetty
napsal(a):
Hi there
|
|
Re: PlatformIO for flashing zephyr code on ESP 32
Komal Rajput-Hajare <komal.hajare5@...>
Thank you so much.
On Thu, Oct 21, 2021, 2:09 PM Raúl Sánchez Siles <rsanchezs@...> wrote:
|
|