Date   

openocd.conf default

Gunnar Bråding
 

Hi!

I might have missed something, but is there a way to set a default openocd.conf in the local application directory, or set some other file as the default? The board-specific ones are not necessarily correct. I even wonder if the debug settings are board specific, rather than user-specific?
Actually I personally would consider it nice to just use my general configuration when selecting probe and such.

Cheers,
— Gunnar Brading


How can I set the content type and content encoding of the MQTT message #mqtt

petrus.vanderwalt@...
 

Hi, I am sending messages to my Azure IoT hub.  I am also storing my messages in Azure blob storage.  My message gets sent in JSON format.  The IoT hub receives my message correctly but when stored to the blob my messages are converted to 64-base.  This is the default setting of the blob storage for the message.  I have to specify the content type as "application/json" and content encoding as "utf_8" when sending my messages from the device.  I can not seem to find a place in the Zephyr mqtt library to set these message settings.  Does anyone have an idea how I can include these settings with my messages?  I will share a snippet from C# code that I use to simulate devices to show how they achieve this.

Any help or suggestions would be highly appreciated.

Regards,
Jurgens


Re: Azure MQTT with GSM modem over PPP #mqtt #modem #ppp #nrf52840

petrus.vanderwalt@...
 

Hi Jukka,

Thank you for your assistance.  My MQTT client using GSM modem is now working.

Regards,
Jurgens 


Re: Problem with LPTIM on Zephyr

Raz <raziebe@...>
 

Will i be able to run interrupt routine in an app ? 

בתאריך יום ד׳, 17 בפבר׳ 2021, 13:13, מאת Erwan Gouriou ‏<erwan.gouriou@...>:

First it depends what you intend to do with LPTIM.
There is a LPTIM driver which is meant to be used as a low power kernel ticker 
instead of the Cortex systick.

You can enable it in any sample using CONFIG_STM32_LPTIM_TIMER=y
By default it will use LSE as clock source.


On Tue, 16 Feb 2021 at 16:25, Raz <raziebe@...> wrote:
I tried to compile LPTIM in the kernel but Zephyr fails. 
Is there an example for LPTIM in an app ?


On Tue, Feb 16, 2021 at 12:30 PM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Raz,


Did you checked that the clocks are correctly enabled?
In any case, I'd suggest to minimize the use of Cube functions to the timer related functions.
Zephyr provides most of things you need for MSP and board init.

Cheers
Erwan

On Fri, 12 Feb 2021 at 14:59, Raz <raziebe@...> wrote:
hello.
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:

 HAL_Init();

  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LPTIM1_Init();
  for (;i<2;i++) {
 HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_5);
 HAL_Delay(1000);
  }
  /*
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
     Error_Handler();
  }
  HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  while (1)
  {
 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  }
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards


SDK 0.12.3 Release

Kumar Gala
 

Hi,

Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.12.3

Please download and try things out and report any issues.

* Backport GCC 10.2+ (ie, changes that would be in GCC 10.3) for Arm for fixes associated with Cortex-M55

- k


Timer with high Frequency

tobias.roehmel@...
 

Hi all,

I am using an STM32F4 discovery board which runs at 100Mhz. I want to fade an LED with PWM and need to change the PWM duty-cycle very quickly (every us). I tried using a k_timer but it's not updating the duty-cycle fast enough. I tried to increase the tick-rate (with CONFIG_SYS_CLOCK_TICKS_PER_SEC) but this didn't help. What would be the correct way to do this?

Kind regards,
Tobias Röhmel


LTS schedule and scope meeting on Tuesday, 23rd February

Carles Cufi
 

Hi all,

As you probably know, on Tuesdays we have two regularly scheduled meetings:

- API meeting (17:00 UTC)
- Bug triage and Release Readiness meeting (18:00 UTC)

This week however, we will hold a special one-off meeting to discuss the schedule and scope of the next LTS release.
The meeting will be open to everyone and will last two hours.

When: Tuesday, 23rd February, 17:00 UTC (18:00 CET, 12PM EST, 11AM CST, 9AM PST)
Where: https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWU2MjZlYWEtZDcwMi00MWQzLTgwMjEtNDdkYjQwMjBjMmFj%40thread.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-5e334e88f6d8%22%7d

Thanks,

Carles


Re: Problem with LPTIM on Zephyr

Erwan Gouriou
 

First it depends what you intend to do with LPTIM.
There is a LPTIM driver which is meant to be used as a low power kernel ticker 
instead of the Cortex systick.

You can enable it in any sample using CONFIG_STM32_LPTIM_TIMER=y
By default it will use LSE as clock source.


On Tue, 16 Feb 2021 at 16:25, Raz <raziebe@...> wrote:
I tried to compile LPTIM in the kernel but Zephyr fails. 
Is there an example for LPTIM in an app ?


On Tue, Feb 16, 2021 at 12:30 PM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Raz,


Did you checked that the clocks are correctly enabled?
In any case, I'd suggest to minimize the use of Cube functions to the timer related functions.
Zephyr provides most of things you need for MSP and board init.

Cheers
Erwan

On Fri, 12 Feb 2021 at 14:59, Raz <raziebe@...> wrote:
hello.
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:

 HAL_Init();

  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LPTIM1_Init();
  for (;i<2;i++) {
 HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_5);
 HAL_Delay(1000);
  }
  /*
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
     Error_Handler();
  }
  HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  while (1)
  {
 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  }
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards


Re: STM32L Errors Building samples/drivers/spi_fujitsu_fram with Ninja

@kiwironnie
 

Thanks Erwan, brilliant, solved!

When the board alias "spi-1 = &spi1;" was added the executable built ok, no errors!

Note that an underscore in "spi_1 = &spi1;" threw an error: dtlib.DTError: /aliases: alias property name 'spi_1' should include only characters from [0-9a-z-]

But then it's clear from the documentation that dashes in the .dts become underscores in the source.

Am not bothered about the actual hardware at this stage, as the idea is to be able to use an example that builds ok as a template to be modified.

Cheers

Ron


Re: Problem with LPTIM on Zephyr

Raz <raziebe@...>
 

I tried to compile LPTIM in the kernel but Zephyr fails. 
Is there an example for LPTIM in an app ?


On Tue, Feb 16, 2021 at 12:30 PM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Raz,


Did you checked that the clocks are correctly enabled?
In any case, I'd suggest to minimize the use of Cube functions to the timer related functions.
Zephyr provides most of things you need for MSP and board init.

Cheers
Erwan

On Fri, 12 Feb 2021 at 14:59, Raz <raziebe@...> wrote:
hello.
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:

 HAL_Init();

  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LPTIM1_Init();
  for (;i<2;i++) {
 HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_5);
 HAL_Delay(1000);
  }
  /*
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
     Error_Handler();
  }
  HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  while (1)
  {
 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  }
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards


Re: Port for STM32F101RF #stm32

Erwan Gouriou
 

Hi Thomas,

There is no STM32F101 port indeed.
Though there are others variants of STM32F1 series available.
So I don't expect too much trouble when adding STM32F101 support.

You could find below a recent example of STM32 SoC porting:

Cheers
Erwan

On Tue, 16 Feb 2021 at 14:59, <arve@...> wrote:
Ciao a tutti

At the moment I am busy with a project which was built on a rather old STM32F101RF. Is there a Zephyr port available for it? I could not find anything in the sources. But I may have overlooked something.

Many thanks in advance
Thomas


Port for STM32F101RF #stm32

arve@...
 

Ciao a tutti

At the moment I am busy with a project which was built on a rather old STM32F101RF. Is there a Zephyr port available for it? I could not find anything in the sources. But I may have overlooked something.

Many thanks in advance
Thomas


SMP server on HCI USB composite device #nrf52480 #mcumgr #hci #usb

Martin Roesch
 

Hi,

I am trying to figure out how to make a HCI USB Bluetooth host adapter with device management on a nRF52840 Dongle.

My approach is to make a USB composite device consisting of the Bluetooth device (CONFIG_USB_DEVICE_BLUETOOTH) and a CDC ACM UART (CONFIG_USB_CDC_ACM) which is used as backend for the MCU Manager Support (CONFIG_MCUMGR_SMP_UART).

When the nRF52840 Dongle is plugged into a USB port on a Linux machine, the serial device /dev/ttyACM0 is available and the SMP server is able to communicate with the mcumgr application.
But the no Bluetooth adapter is detected.

Listing the device with lsusb shows that there is a Interface available that provides the Bluetooth protocol:

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2fe3 NordicSemiconductor
  idProduct          0x000b 
  bcdDevice            2.05
  iManufacturer           1 Manufacturer
  iProduct                2 Product
  iSerial                 3 41EE42283B95248A
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0069
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       2 Abstract (modem)
      bFunctionProtocol       0 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      0 
      iInterface              0 
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x02
          use DataInterface
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Am I missing something in the Zephyr kernel configuration? Or on the Linux host side?
Is the approach with the composite USB device even feasible for what I want to achieve?
Should I use another backend for the SMP server, e.g. udp?

Any suggestions or insights are appreciated, as I am by not very experienced with USB.


Re: SMT32F103 - RCC_CFGR_PLLXTPRE not set correctly?

Erwan Gouriou
 

Hi Naro,

Have you tried to revert the faulty commit and see if this fixes the issue in your case ?
(To make it work, you might have to remove #ifdefery around `SOC_STM32F10X_DENSITY_DEVICE`.

Cheers
Erwan




On Thu, 11 Feb 2021 at 18:25, immanuel narodoslawsky <narodo.imm@...> wrote:
Hi everyone,

I have troubles getting my custom board to work. I think the problem is that the RCC_CFGR_PLLXTPRE bit is not handled properly. I am using an STM32F103C8 (same as on the bluebill board) with an external 16MHz quartz. I am trying to run the system on 72MHz by dividing the input clock by 2.
Currently I am on Zephyr 2.4.0, but as far as I can see this is still the same for the latest version.

I saw that this config option was removed in commit 6b72fbae7c  since the HAL layer is supposed to handle this, but I can't quite see how.

If I follow the calls I end up in the LL_PLL_ConfigSystemClock_HSE HAL function that passes the "prediv" value from the PLL init struct to LL_RCC_PLL_ConfigDomain_SYS. As far as I can see it does not handle the shifting to the right position or any parsing of the "prediv" value.

But since this config option was removed on purpose I am wondering if I am doing something wrong here. What is the intended way of configuring this option?

Can you please let me know if anyone got this working?

Thanks a lot for your help!


Best regards,
Naro




Re: Problem with LPTIM on Zephyr

Erwan Gouriou
 

Hi Raz,


Did you checked that the clocks are correctly enabled?
In any case, I'd suggest to minimize the use of Cube functions to the timer related functions.
Zephyr provides most of things you need for MSP and board init.

Cheers
Erwan

On Fri, 12 Feb 2021 at 14:59, Raz <raziebe@...> wrote:
hello.
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:

 HAL_Init();

  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LPTIM1_Init();
  for (;i<2;i++) {
 HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_5);
 HAL_Delay(1000);
  }
  /*
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
     Error_Handler();
  }
  HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  while (1)
  {
 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  }
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards


Re: STM32L Errors Building samples/drivers/spi_fujitsu_fram with Ninja

Erwan Gouriou
 

Hi Ron,

First question: do you have the matching FRAM that is described on  the sample ?

If  yes, I'd suggest adding "spi_1 = &spi1;" in your board aliases, and hopefully this should work.

BR

Erwan


On Mon, 15 Feb 2021 at 18:39, <ron@...> wrote:
New to Zephyr, no problem with building and running the hello world example for an STM32L433, nucleo_l433rc_p board
Trying to build samples/drivers/spi_fujitsu_fram as an example of SPI use. From a created build directly cmake -GNinja -DBOARD=nucleo_l433rc_p .. runs through ok, but Ninja fails with:

/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:208:32: error: 'DT_N_ALIAS_spi_1_P_label' undeclared (first use in this function)
  208 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)
      |                                ^~~~~~~~~~~
/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:2176:24: note: in definition of macro 'DT_CAT'
 2176 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:584:27: note: in expansion of macro 'DT_PROP'
  584 | #define DT_LABEL(node_id) DT_PROP(node_id, label)
      |                           ^~~~~~~
../src/main.c:148:27: note: in expansion of macro 'DT_LABEL'
  148 |  spi = device_get_binding(DT_LABEL(DT_ALIAS(spi_1)));
      |                           ^~~~~~~~

and other similar errors.
Have checked that SPI1 is enabled for the board in the .dts file.  Also tried building for other STM32 boards but getting similar errors running Ninja.
Some guidance would be appreciated.


STM32L Errors Building samples/drivers/spi_fujitsu_fram with Ninja

@kiwironnie
 

New to Zephyr, no problem with building and running the hello world example for an STM32L433, nucleo_l433rc_p board
Trying to build samples/drivers/spi_fujitsu_fram as an example of SPI use. From a created build directly cmake -GNinja -DBOARD=nucleo_l433rc_p .. runs through ok, but Ninja fails with:

/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:208:32: error: 'DT_N_ALIAS_spi_1_P_label' undeclared (first use in this function)
  208 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)
      |                                ^~~~~~~~~~~
/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:2176:24: note: in definition of macro 'DT_CAT'
 2176 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/media/fred/zephyrdev/stm-testbed/zephyr/include/devicetree.h:584:27: note: in expansion of macro 'DT_PROP'
  584 | #define DT_LABEL(node_id) DT_PROP(node_id, label)
      |                           ^~~~~~~
../src/main.c:148:27: note: in expansion of macro 'DT_LABEL'
  148 |  spi = device_get_binding(DT_LABEL(DT_ALIAS(spi_1)));
      |                           ^~~~~~~~

and other similar errors.
Have checked that SPI1 is enabled for the board in the .dts file.  Also tried building for other STM32 boards but getting similar errors running Ninja.
Some guidance would be appreciated.


Adafruit Feather Sense on Zephyr

Dimitrios Kosyvas <kosyvas14828@...>
 

Hello
I want to use Zephyr to build an audio recognition application  for my thesis and then flash it via a external debugger to Adafruit Feather Sense .In the list of supported boards there is
Adafruit Feather nrf52840 Express and i was wondering  if i can use  that to build for the Sense board ,since both boards have the save processor and just different peripherals .

Dimitris







Problem with LPTIM on Zephyr

Raz <raziebe@...>
 

hello.
I am trying to use the LPTIM for the nucleos 476  by integrating it from CUBE. I ported the code below to Zephyr:

 HAL_Init();

  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LPTIM1_Init();
  for (;i<2;i++) {
 HAL_GPIO_TogglePin (GPIOA, GPIO_PIN_5);
 HAL_Delay(1000);
  }
  /*
   * LSE Input freq is 32768 hz.
   *  32768/64 = 512hz
   * */
  int secs = 3;
  if (HAL_LPTIM_Counter_Start_IT(&hlptim1, 512* secs + 1) != HAL_OK) {
     Error_Handler();
  }
  HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  while (1)
  {
 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
  }
  /* USER C

However, the timer does not start. Anyone is familiar with this problem ?

Kind regards


SMT32F103 - RCC_CFGR_PLLXTPRE not set correctly?

immanuel narodoslawsky
 

Hi everyone,

I have troubles getting my custom board to work. I think the problem is that the RCC_CFGR_PLLXTPRE bit is not handled properly. I am using an STM32F103C8 (same as on the bluebill board) with an external 16MHz quartz. I am trying to run the system on 72MHz by dividing the input clock by 2.
Currently I am on Zephyr 2.4.0, but as far as I can see this is still the same for the latest version.

I saw that this config option was removed in commit 6b72fbae7c  since the HAL layer is supposed to handle this, but I can't quite see how.

If I follow the calls I end up in the LL_PLL_ConfigSystemClock_HSE HAL function that passes the "prediv" value from the PLL init struct to LL_RCC_PLL_ConfigDomain_SYS. As far as I can see it does not handle the shifting to the right position or any parsing of the "prediv" value.

But since this config option was removed on purpose I am wondering if I am doing something wrong here. What is the intended way of configuring this option?

Can you please let me know if anyone got this working?

Thanks a lot for your help!


Best regards,
Naro



241 - 260 of 2693