Date   

Re: Does uart_pl011.c support non interrupt mode

Ayan Kumar Halder <ayankuma@...>
 

Hi Jaxson/Luca,

Thanks for your feedback.

On 03/08/2022 07:42, Jaxson Han wrote:
Hi Luca,

-----Original Message-----
From: Luca Fancellu <Luca.Fancellu@...>
Sent: Wednesday, August 3, 2022 2:30 PM
To: Jaxson Han <Jaxson.Han@...>
Cc: Ayan Kumar Halder <ayankuma@...>;
users@...; daniel.leung@...; Stabellini, Stefano
<stefano.stabellini@...>; michalorzel.eng@...
Subject: Re: Does uart_pl011.c support non interrupt mode



On 3 Aug 2022, at 06:42, Jaxson Han <Jaxson.Han@...> wrote:

Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 6:51 PM
To: Jaxson Han <Jaxson.Han@...>; users@...;
daniel.leung@...
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Re: Does uart_pl011.c support non interrupt mode

Hi Jaxson,

On 02/08/2022 11:03, Jaxson Han wrote:
Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson
Han <Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation
error
/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git
a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index
d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN uart_irq_config_func_t
irq_config_func; -#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some
issue with my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev) #else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n),
\
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)),
\
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks,
clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
Many thanks for this. It worked. :-)

Will you send a patch for this fix ?
Emmm, you could send a patch if you like :)
Hi all,

I think this was my mistake, I refactored the pl011 code to use the new driver
model and I missed that change!

So you can send a patch to fix it or I can send it, does GitHub has tags like
“Suggested-by”, to mention that You spotted the problem?
Usually, we open an issue to describe it and then fix it with a PR. But it's so small
that I think it's enough just tagging him directly in the PR description. :)
Anyway, it's up to you~
I have created a pull request https://github.com/zephyrproject-rtos/zephyr/pull/48706

As it is my first patch to Zephyr, please let me know if there is any mistake in the workflow.

While running 'twister' (https://docs.zephyrproject.org/latest/contribute/guidelines.html#twister), I noticed a failure.

/scratch/ayankuma/zephyr/zephyrproject/modules/hal/altera/altera_hal/HAL/src/altera_common.c:77:10: fatal error: kernel.h: No such file or directory
   77 | #include <kernel.h>

I think this is unrelated to my changes.

- Ayan


Jaxson

Cheers,
Luca

Jaxson

- Ayan

Regards,
Jaxson

Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


json parse error.

Mariappan N <nmarijoe@...>
 

hello,
Am developing http client app in zephyr. After http post am getting huge json data as response. It contains around 60 elements in it.
Am using in built json library to parse the json data. Created the json_obj_decr struct and mapped same as the JSON data.

However, the API json_obj_parse returns the invalid error. it throws the error value as -22.

As per documentation, there is limitation for json_obj_parse api

descr_len Number of elements in the descriptor array. Must be less than 31 due to implementation detail reasons (if more fields are necessary, use two descriptors)

In my case decr_len value will be around 60. If there any pointer on this, would be helpful.


Re: Zephyr secure connection example - samples/bluetooth/peripheral_sc_only #bluetooth

Ivo
 

When I enter incorrect password, a callback called 'pairing_failed' is triggered, but when I only cancel the pairing dialog, no 'pairing_failed' is triggered, therefore I cannot disconnect explicitly within this callback, but I wonder how it could even connect.
It tries to somehow automatically disconnect, but when I click on anything in android app, the applications stays connected, but when I do not touch anything in the app, it automatically disconnects, but it shows 'connected' for few seconds therefore I can open found services.


Re: Does uart_pl011.c support non interrupt mode

Jaxson Han <Jaxson.Han@...>
 

Hi Luca,

-----Original Message-----
From: Luca Fancellu <Luca.Fancellu@...>
Sent: Wednesday, August 3, 2022 2:30 PM
To: Jaxson Han <Jaxson.Han@...>
Cc: Ayan Kumar Halder <ayankuma@...>;
users@...; daniel.leung@...; Stabellini, Stefano
<stefano.stabellini@...>; michalorzel.eng@...
Subject: Re: Does uart_pl011.c support non interrupt mode



On 3 Aug 2022, at 06:42, Jaxson Han <Jaxson.Han@...> wrote:

Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 6:51 PM
To: Jaxson Han <Jaxson.Han@...>; users@...;
daniel.leung@...
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Re: Does uart_pl011.c support non interrupt mode

Hi Jaxson,

On 02/08/2022 11:03, Jaxson Han wrote:
Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson
Han <Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation
error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git
a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index
d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN uart_irq_config_func_t
irq_config_func; -#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some
issue with my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev) #else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n),
\
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)),
\
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks,
clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
Many thanks for this. It worked. :-)

Will you send a patch for this fix ?
Emmm, you could send a patch if you like :)
Hi all,

I think this was my mistake, I refactored the pl011 code to use the new driver
model and I missed that change!

So you can send a patch to fix it or I can send it, does GitHub has tags like
“Suggested-by”, to mention that You spotted the problem?
Usually, we open an issue to describe it and then fix it with a PR. But it's so small
that I think it's enough just tagging him directly in the PR description. :)
Anyway, it's up to you~

Jaxson


Cheers,
Luca


Jaxson


- Ayan


Regards,
Jaxson

Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


Re: Does uart_pl011.c support non interrupt mode

Luca Fancellu <Luca.Fancellu@...>
 

On 3 Aug 2022, at 06:42, Jaxson Han <Jaxson.Han@...> wrote:

Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 6:51 PM
To: Jaxson Han <Jaxson.Han@...>; users@...;
daniel.leung@...
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Re: Does uart_pl011.c support non interrupt mode

Hi Jaxson,

On 02/08/2022 11:03, Jaxson Han wrote:
Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson Han
<Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation
error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN uart_irq_config_func_t
irq_config_func; -#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some
issue with my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c
index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev)
#else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n),
\
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)), \
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks,
clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
Many thanks for this. It worked. :-)

Will you send a patch for this fix ?
Emmm, you could send a patch if you like :)
Hi all,

I think this was my mistake, I refactored the pl011 code to use the new driver model and I missed that change!

So you can send a patch to fix it or I can send it, does GitHub has tags like “Suggested-by”, to mention that
You spotted the problem?

Cheers,
Luca


Jaxson


- Ayan


Regards,
Jaxson

Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


Zephyr secure connection example - samples/bluetooth/peripheral_sc_only #bluetooth

Ivo
 

Dear all,

I am trying to develop an application on Nordic nrf52840_dongle utilizing bluetooth and Nordic Led Button Service. The application running on the dongle is supposed to notify button click on usb dongle and activate LED diode upon Nordic Android Blinky application or nRF Connect. Such a logic is very well working, but I wanted to implement sort of a security that not everyone is able to connect to the dongle and let the LED flash or have press button results available, so I wanted to base my secure connection on Zephyr example:
samples/bluetooth/peripheral_sc_only
Since my dongle is headless (I do not know any other better way, how to pair one headless device and Android phone) and I am a newbie in Zephyr, the only way which came to my mind was to set up fixed key.
The Android application correctly asks for a key and it gets paired and successfully connected when correct passkey is entered and disconnected when incorrect passkey is entered. The problem arises when I press connect button in nRF Connect application, dialog with pairing request pops up and I cancel the dialog.
The application gets connected to the dongle automatically and stays connected, practically bypassing any security code I have added.
Could anyone help me with this issue?
Maybe there is a callback upon rejection of such a dialog, but I do not know where.
If possible, could anyone help me what is the reccommended way to implement pairing with single headless BT device so far I cannot see the generated passkey when using anything more sophisticated than fixed passkey. The same way probably bluetooth mouse and keyboards do, no way to enter any security passkey and their are secure and probably get paired automatically upon start.
I am enclosing modified 'samples/bluetooth/peripheral_sc_only' example.

Thank you all
Ivo


Zephyr Support for Genesys2 FPGA Board #driver #api

marmiksoni007@...
 

My official project needs to have Zephyr on the Genesys2 Board. Kindly access the support.

I want to run this flow. 

https://gitlab.com/incoresemi/os_ports/zephyr

Please help with Board Support Files.


Re: Does uart_pl011.c support non interrupt mode

Jaxson Han <Jaxson.Han@...>
 

Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 6:51 PM
To: Jaxson Han <Jaxson.Han@...>; users@...;
daniel.leung@...
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Re: Does uart_pl011.c support non interrupt mode

Hi Jaxson,

On 02/08/2022 11:03, Jaxson Han wrote:
Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson Han
<Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation
error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN uart_irq_config_func_t
irq_config_func; -#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some
issue with my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c
index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev)
#else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n),
\
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)), \
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks,
clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
Many thanks for this. It worked. :-)

Will you send a patch for this fix ?
Emmm, you could send a patch if you like :)

Jaxson


- Ayan


Regards,
Jaxson

Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


Process a module overlay file in addition to the ones in the regular places #devicetree #defconfig

yshragai.firmware@...
 

Is there a way to get Zephyr to process an overlay file in a module directory (in my case an "extra module") in addition to the standard places it looks?
That is, without having to explicitly point to all the overlay files in DTC_OVERLAY_FILE.
That is, I want the automatic thing to happen - I want the build to automatically find the board/revision .dts and overlay files as it always does - and then I also want it to process an overlay file of a module.

(I tried appending to DTC_OVERLAY_FILE - I tried in the project top-level CMakeLists.txt as well as the module-level CMakeLists.txt - on the off chance that it would work. It didn't. In the top-level one it overrode the automatic finder rather than appending to it (just as if you specified it on the west cmd line). At the module-level, it didn't do anything - I guess it was set too late in the build flow.)

Thanks!


Re: Zephyr python netifaces install failure

Stephanos Ioannidis
 

Hi,

Please see https://github.com/zephyrproject-rtos/zephyr/issues/48584

building 'netifaces' extension
For now, unless you need to work with the "Intel CAVS" platform, which
actually requires this dependency, my suggestion would be to simply remove it
from the 'requirements-run-test.txt' file.

Another solution would be to use the Python 3.9 release for which the
'netifaces' package has a wheel (pre-built binary package).

Regards,

Stephanos


Zephyr python netifaces install failure

W Kicinski
 

I’m following the Zephyr getting started guide here:

https://docs.zephyrproject.org/latest/develop/getting_started/index.html

 

In the section “Get Zephyr and install Python dependencies” I’m following the directions for

Windows -> Install Globally

 

When I run the following:

pip3 install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt

 

I get the error:

  Running setup.py install for netifaces ... error

  error: subprocess-exited-with-error

 

  × Running setup.py install for netifaces did not run successfully.

  │ exit code: 1

  > [9 lines of output]

      C:\Users\wkicinski\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\config\setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.

        warnings.warn(msg, warning_class)

      running install

      C:\Users\wkicinski\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

        warnings.warn(

      running build

      running build_ext

      building 'netifaces' extension

      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

      [end of output]

 

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: legacy-install-failure

 

× Encountered error while trying to install package.

> netifaces

 

Choco installed python 3.10.  I installed the latest VS build tools, as well as the 2019 build tools with v14.2 compiler.

I still keep getting this error.  I’m on Windows 11.

 

Is there a known solution to this issue?

 

Thanks & Regards,

Walt Kicinski

 

 


Re: Does uart_pl011.c support non interrupt mode

Ayan Kumar Halder <ayankuma@...>
 

Hi Jaxson,

On 02/08/2022 11:03, Jaxson Han wrote:
Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson Han
<Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_irq_config_func_t irq_config_func;
-#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some issue with
my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c
index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev)
#else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)), \
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks, clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
Many thanks for this. It worked. :-)

Will you send a patch for this fix ?

- Ayan


Regards,
Jaxson

Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


Re: Does uart_pl011.c support non interrupt mode

Jaxson Han <Jaxson.Han@...>
 

Hi Ayan,

-----Original Message-----
From: Ayan Kumar Halder <ayankuma@...>
Sent: Tuesday, August 2, 2022 5:23 PM
To: users@...; daniel.leung@...; Jaxson Han
<Jaxson.Han@...>
Cc: Stabellini, Stefano <stefano.stabellini@...>;
michalorzel.eng@...; Luca Fancellu <Luca.Fancellu@...>
Subject: Does uart_pl011.c support non interrupt mode

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and
CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
474 | .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff
drivers/serial/uart_pl011.c diff --git a/drivers/serial/uart_pl011.c
b/drivers/serial/uart_pl011.c index d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
uint32_t sys_clk_freq;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_irq_config_func_t irq_config_func;
-#endif
+#else /* CONFIG_UART_INTERRUPT_DRIVEN */
+ volatile struct pl011_regs *uart; #endif /*
+CONFIG_UART_INTERRUPT_DRIVEN */
};


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some issue with
my diff ?
Sure, it does support.
You may try this:

diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c
index d00d805f10..a39a562946 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -467,7 +467,7 @@ void pl011_isr(const struct device *dev)
#else
#define PL011_CONFIG_PORT(n) \
static struct pl011_config pl011_cfg_port_##n = { \
- .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n), \
+ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)), \
.sys_clk_freq = DT_INST_PROP_BY_PHANDLE(n, clocks, clock_frequency), \
};
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */

Regards,
Jaxson


Appreciate any help.

Kind regards,

Ayan
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


Does uart_pl011.c support non interrupt mode

Ayan Kumar Halder <ayankuma@...>
 

Hi Zephyr Users,

When I try to compile with fvp_baser_armv8r_aarch32_defconfig and CONFIG_UART_INTERRUPT_DRIVEN=n, I get the following compilation error

/home/ayan/zephyrproject/zephyr/drivers/serial/uart_

pl011.c:474:4: error: 'struct pl011_config' has no member named 'uart'
  474 |   .uart = (volatile struct pl011_regs *)DT_INST_REG_ADDR(n),  \

I fixed this error using the following diff

ayan@ayan-Lenovo-V15-IIL:~/zephyrproject/zephyr$ git diff drivers/serial/uart_pl011.c
diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c
index d00d805f..636d2fcf 100644
--- a/drivers/serial/uart_pl011.c
+++ b/drivers/serial/uart_pl011.c
@@ -49,7 +49,9 @@ struct pl011_config {
        uint32_t sys_clk_freq;
 #ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_irq_config_func_t irq_config_func;
-#endif
+#else  /* CONFIG_UART_INTERRUPT_DRIVEN */
+       volatile struct pl011_regs *uart;
+#endif  /* CONFIG_UART_INTERRUPT_DRIVEN */
 };


But I do not get any serial output.

So, does uart_pl011 support non interrupt mode ? Or is there some issue with my diff ?

Appreciate any help.

Kind regards,

Ayan


Re: Labels removed from Device Tree

Bolivar, Marti
 

For a node:

foo: my-node... {
label = "bar";
...
};

You may use device_get_binding("bar") or
DEVICE_DT_GET(DT_NODELABEL(foo)).

The DT_NODELABEL(foo) part may be changed for an arbitrary devicetree
node identifier.

Please refer here for more details about node identifiers:

docs.zephyrproject.org/latest/build/dts/api-usage.html#node-identifiers

and here for more on DEVICE_DT_GET:

docs.zephyrproject.org/latest/kernel/drivers/index.html#group__device__model_1ga9a65996ce21f43acb7db061e23b48ec7

My apologies if my corporate email server mangles the above links.

HTH,
Martí

On Mon, Aug 01 2022, Bernd via lists zephyrproject org Weiberg wrote:
Hello,
the commit dts: arm: st: Remove label property from devicetrees
has broken my code.
I used device_get_binding() with the string to the device label in the dts file.
What is the correct approach in this case?




Labels removed from Device Tree

Weiberg, Bernd
 

Hello,

the commit dts: arm: st: Remove label property from devicetrees

has broken my code.

I used device_get_binding() with the string to the device label in  the dts file.

What is the correct approach in this case?

 


Re: Porting Host-only build with HCI SPI to another RTOS #stm32 #nrf52840 #hci #spi

Carles Cufi
 

If ST Micro uses custom HCI commands to create services then it means they are running both Host and Controller.

 

For a platform-neutral Host that can work with any standard HCI device (including Zephyr), check out nimBLE:

https://github.com/apache/mynewt-nimble

 

Carles

 

From: users@... <users@...> On Behalf Of valens.dsilva via lists.zephyrproject.org
Sent: 29 July 2022 01:10
To: users@...
Subject: Re: [Zephyr-users] Porting Host-only build with HCI SPI to another RTOS #stm32 #nrf52840 #hci #spi

 

Hi Carles,

I should be hitting Group Reply so the thread is captured. Apologies :)

Regarding the second question I think you are likely confusing layers. GATT services are in the Host, not in the Controller. So your 700 byte limit must be in the Host, which likely means that whatever IC you were connecting via SPI to was running both Host and Controller. 

it seems ST Micro (for their BlueNRG chipsets) uses custom HCI Vendor commands (ogf 0x3F) to create services so they are running a hybrid Host and Controller in their BlueNRG chipsets. Is there an open source BLE host that works with Zepher's HCI? 

Thanks


Bluetooth Classic Audio A2DP

Daniel Felkar <daniel.felkar@...>
 

Hi,

 

We are developing a product that will transmit audio mixed between 2 tracks via Bluetooth.


We will use a Bluetooth module like this Lyra Series Bluetooth 5.3 Modules | Laird Connectivity or something similar. We would like to implement Zephyr OS on that to use the A2DP or HSP profile. Do you have any application examples on that topic?

And also it would be nice if you can suggest to us some of the Bluetooth Classic modules you have working examples of Bluetooth audio transmission in somewhere 10x16mm form factor.

 

BR, Daniel


--

Lep pozdrav / Best regards,

 

Daniel Felkar

Developer


GRIDTECH d.o.o.

Knafelčeva 15 / 2000 MARIBOR / Slovenija - EU
Tel.: +386 41 502 851 / 
web: www.gridtech.si 

email: daniel.felkar@... 



Re: Porting Host-only build with HCI SPI to another RTOS #stm32 #nrf52840 #hci #spi

valens.dsilva@...
 

Hi Carles,

I should be hitting Group Reply so the thread is captured. Apologies :)

Regarding the second question I think you are likely confusing layers. GATT services are in the Host, not in the Controller. So your 700 byte limit must be in the Host, which likely means that whatever IC you were connecting via SPI to was running both Host and Controller. 
it seems ST Micro (for their BlueNRG chipsets) uses custom HCI Vendor commands (ogf 0x3F) to create services so they are running a hybrid Host and Controller in their BlueNRG chipsets. Is there an open source BLE host that works with Zepher's HCI? 

Thanks


Re: re-assembling large notification data #ble #bluetooth

Carles Cufi
 

Hi there,

 

BLE is fully reliable for GATT, and notifications are guaranteed to be delivered in sequence.

But what you really want is to configure your GATT MTU to the size of the data you want to send. Then the stack will do all the heavy lifting for you and it should be transparent. Note that the GATT MTU is independent of the LL MTU and thus of DLE.

 

Carles

 

From: <users@...> on behalf of "alok.sethi1+zephyr via lists.zephyrproject.org" <alok.sethi1+zephyr=gmail.com@...>
Reply-To: "alok.sethi1+zephyr@..." <alok.sethi1+zephyr@...>
Date: Thursday, 28 July 2022 at 02:40
To: "users@..." <users@...>
Subject: [Zephyr-users] re-assembling large notification data #ble #bluetooth

 

Hello,

I am fairly new to bluetooth n BLE and would need advice about how to transfer large amount of data (data larger than the MTU) from a sensor to a central device.
So the sensor is using notifications to send the data in multiple chunks and on the central device, my notification callback is called multiple times with a data pointer and length.

I believe that the notifications are acknowledged at the link layer so the application does not get any marker that there is more data pending. is that true?
Further, are the notifications guaranteed to be delivered in sequence?

Currently the sensor is putting a header on only the first chunk and not on the rest of chunks. I can run a re-assembly timer and just assemble the data from different notification calls, provided that the fragments are guaranteed to be delivered in sequence.
Below is just a snapshot of logs taken from the notification callback handler, showing the length of the fragment and the MTU of the connection.

[00:57:40.765,045] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.765,716] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.766,357] <dbg> ble_hdlr: notify_func: notify len:62, mtu:65
[00:57:40.766,815] <dbg> ble_hdlr: notify_func: notify len:2, mtu:65


BR