CONFIG_NET_L2_OPENTHREAD=y leads to failure in gpio pins.

Hi,

I noticed an issue with CONFIG_NET_L2_OPENTHREAD=y in my project, and I prepared a newer, simpler project to investigate in the issue.

The new program simply sets pins to high and low. After flashing it onto an external module and plugging the external module onto a baseboard, all of the LEDs on the base board should be flashing one by one in a cycle..

As I slowly add more configurations to prj.conf, I realize that adding CONFIG_NET_L2_OPENTHREAD=y when CONFIG_NETWORKING=y will lead to all the external module pins behaving unexpectedly. None of the LEDs on the base board will turn on. What does CONFIG_NET_L2_OPENTHREAD do exactly? How does it interfere with the gpio pins? 

Parents
  • Hello,

    What does CONFIG_NET_L2_OPENTHREAD do exactly?

    Some documentation on the OpenThread L2 abstraction level can be found here: https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_ieee802154.html

    CONFIG_NET_L2_OPENTHREAD also selects a list of other Kconfig symbols. See the list here:

    https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NET_L2_OPENTHREAD

    How does it interfere with the gpio pins? 

    I need to investigate this. Your simple project may help to speed up the process, but it looks like you are using a custom board. Are you able to reproduce the issue on an nRF54L15 DK?

    Best regards,

    Maria

  • Hi Maria, 

    Just an update, I updated my project to an even simpler one, it will just print Hello World + iteration number over and over again. I can view the message through RTT when CONFIG_NET_L2_OPENTHREAD is not enabled. However, I tried enabling the configuration, I can no longer view the messages. Thus, this might be something more significant than just having a conflict with the GPIO pins, as RTTs will not even display any messages. 

    #include <stdio.h>
    #include <zephyr/kernel.h>
    int main() {
    	int i = 0;
    	while (1) {
    		printk("Hello World! %d\n", i++);
    		k_msleep(1000);
    	}
    	return 1;
    }

  • Hello,

    Thank you for sharing your modified sample. I was able to get this working today.

    There is a nRF54L15 specific configuration file for the OpenThread CLI sample which I used parts of to make the modified hello_world work with RTT logging. The symbol choices are documented in the sample.

    Add these Kconfig symbols to your prj.conf and start with a fresh build (delete your old directory or use a new name):

    CONFIG_MAIN_STACK_SIZE=6144
    
    CONFIG_NVS=n
    CONFIG_ZMS=y
    CONFIG_SETTINGS_ZMS=y
    
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON=y

    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON can be exchanged with CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD or CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER, as both of those selects CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON.

    Best regards,

    Maria

  • Hi Maria

    I tried adjusting my prj.conf, and it looks as follows: 

    CONFIG_GPIO=y
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_UART_CONSOLE=n
    CONFIG_SERIAL=n
    CONFIG_STDOUT_CONSOLE=y
    CONFIG_PRINTK=y
    CONFIG_GPIO_INIT_PRIORITY=40
    
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON=y
    
    CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NETWORKING=y
    
    CONFIG_MAIN_STACK_SIZE=6144
    
    CONFIG_NVS=n
    CONFIG_ZMS=y
    CONFIG_SETTINGS_ZMS=y
    

    However, it would still not print Hello World xx in Segger RTT.

    I tried removing CONFIG_NET_L2_OPENTHREAD=y from the updated prj.conf file such that I have:

    CONFIG_GPIO=y
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_UART_CONSOLE=n
    CONFIG_SERIAL=n
    CONFIG_STDOUT_CONSOLE=y
    CONFIG_PRINTK=y
    CONFIG_GPIO_INIT_PRIORITY=40
    
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON=y
    
    # CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NETWORKING=y
    
    CONFIG_MAIN_STACK_SIZE=6144
    
    CONFIG_NVS=n
    CONFIG_ZMS=y
    CONFIG_SETTINGS_ZMS=y
    

    and this was still able to print. 

    Thus, the problem still has not been solved; the messages will only print if CONFIG_NET_L2_OPENTHREAD is not present. 

    Please note again, that I am flashing onto an external module by connecting it to the 54L15dk with programming wires. If I'm only flashing onto the 54L15dk, I can view the messages with no problem, even with CONFIG_NET_L2_OPENTHREAD=y present. 

    Thanks for your time, I look forward to your reply!

    Best regards,

    Allan Wang

Reply
  • Hi Maria

    I tried adjusting my prj.conf, and it looks as follows: 

    CONFIG_GPIO=y
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_UART_CONSOLE=n
    CONFIG_SERIAL=n
    CONFIG_STDOUT_CONSOLE=y
    CONFIG_PRINTK=y
    CONFIG_GPIO_INIT_PRIORITY=40
    
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON=y
    
    CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NETWORKING=y
    
    CONFIG_MAIN_STACK_SIZE=6144
    
    CONFIG_NVS=n
    CONFIG_ZMS=y
    CONFIG_SETTINGS_ZMS=y
    

    However, it would still not print Hello World xx in Segger RTT.

    I tried removing CONFIG_NET_L2_OPENTHREAD=y from the updated prj.conf file such that I have:

    CONFIG_GPIO=y
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_UART_CONSOLE=n
    CONFIG_SERIAL=n
    CONFIG_STDOUT_CONSOLE=y
    CONFIG_PRINTK=y
    CONFIG_GPIO_INIT_PRIORITY=40
    
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_COMMON=y
    
    # CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NETWORKING=y
    
    CONFIG_MAIN_STACK_SIZE=6144
    
    CONFIG_NVS=n
    CONFIG_ZMS=y
    CONFIG_SETTINGS_ZMS=y
    

    and this was still able to print. 

    Thus, the problem still has not been solved; the messages will only print if CONFIG_NET_L2_OPENTHREAD is not present. 

    Please note again, that I am flashing onto an external module by connecting it to the 54L15dk with programming wires. If I'm only flashing onto the 54L15dk, I can view the messages with no problem, even with CONFIG_NET_L2_OPENTHREAD=y present. 

    Thanks for your time, I look forward to your reply!

    Best regards,

    Allan Wang

Children
Related