UART_SERIAL or ISR in asset_tracker_v2

I had look on  overlay-low-power-conf  file and in folder child_image on spm.conf file that UART_SERIAL=n is set. I need to interface a UART device to nRF9160.

1. Is asset_tracker_v2 by default in UART_ISR ?

2. May UART_UART_ASYNC_API be used in to communicate with uart device or only ISR mode is possible or any of both in asset_tracker_v2 ?

3. I am doubtful that if UART_ASYNC_API and UART_SERIAL are enabled, will LTE work even then ?? To communicate with LTE, what peripheral is used ? 

4. I tried to add UART_SERIAL=y in prj.conf. It remains fade .. as shown in image. I commented UART_SERIAL=n in overlay-low-power.conf file , even then it remains fade.

5.  May in file spm.conf in child_image folder UART_SERIAL=n be removed ? where will it cause in SPM or child image ? I tried once and thereafter nRF9160 started to reset due to some fatal error during run. 

Parents
  • Hello,

    1. Is asset_tracker_v2 by default in UART_ISR ?

    It should be. You are talking about uart0 right? CONFIG_UART_0_INTERRUPT_DRIVEN=y is enabled in .config for me.

    2. May UART_UART_ASYNC_API be used in to communicate with uart device or only ISR mode is possible or any of both in asset_tracker_v2 ?

    Yes, I don't see any reason why that should not work.

    3. I am doubtful that if UART_ASYNC_API and UART_SERIAL are enabled, will LTE work even then ?? To communicate with LTE, what peripheral is used ? 

    I believe it should work. The peripheral for interfacing with the modem is the IPC; infocenter.nordicsemi.com/.../ipc.html

    4. I tried to add UART_SERIAL=y in prj.conf. It remains fade .. as shown in image. I commented UART_SERIAL=n in overlay-low-power.conf file , even then it remains fade.

    Not sure what that means, but maybe it is being overridden. Have you tried to build and checked the .config in the build folder?

    5.  May in file spm.conf in child_image folder UART_SERIAL=n be removed ? where will it cause in SPM or child image ? I tried once and thereafter nRF9160 started to reset due to some fatal error during run. 

    Can you post the log from the error?

Reply
  • Hello,

    1. Is asset_tracker_v2 by default in UART_ISR ?

    It should be. You are talking about uart0 right? CONFIG_UART_0_INTERRUPT_DRIVEN=y is enabled in .config for me.

    2. May UART_UART_ASYNC_API be used in to communicate with uart device or only ISR mode is possible or any of both in asset_tracker_v2 ?

    Yes, I don't see any reason why that should not work.

    3. I am doubtful that if UART_ASYNC_API and UART_SERIAL are enabled, will LTE work even then ?? To communicate with LTE, what peripheral is used ? 

    I believe it should work. The peripheral for interfacing with the modem is the IPC; infocenter.nordicsemi.com/.../ipc.html

    4. I tried to add UART_SERIAL=y in prj.conf. It remains fade .. as shown in image. I commented UART_SERIAL=n in overlay-low-power.conf file , even then it remains fade.

    Not sure what that means, but maybe it is being overridden. Have you tried to build and checked the .config in the build folder?

    5.  May in file spm.conf in child_image folder UART_SERIAL=n be removed ? where will it cause in SPM or child image ? I tried once and thereafter nRF9160 started to reset due to some fatal error during run. 

    Can you post the log from the error?

Children
  • 1. Does prj.conf overrides .Kconfig or reverse ?

    2. In the .Kconfig following is written:

    # Asset Tracker v2 requires UART_INTERRUPT_DRIVEN to be enabled when SERIAL is used in order to
    # receive AT Commands.
    config UART_INTERRUPT_DRIVEN
        default y if SERIAL
    3. I added following to prj.conf
         
    #uart1
    CONFIG_UART_1_INTERRUPT_DRIVEN=n
    CONFIG_UART_2_INTERRUPT_DRIVEN=n
    CONFIG_UART_ASYNC_API=y
    4. The resulting .config file has following:
      
    #***************
    # Serial Drivers
    #
    # CONFIG_UART_ITE_IT8XXX2 is not set
    CONFIG_UART_NRFX=y
    CONFIG_UART_ASYNC_TX_CACHE_SIZE=8
    CONFIG_UART_0_NRF_UARTE=y
    CONFIG_UART_0_ENHANCED_POLL_OUT=y
    CONFIG_UART_0_INTERRUPT_DRIVEN=y
    # CONFIG_UART_0_NRF_PARITY_BIT is not set
    CONFIG_UART_0_NRF_TX_BUFFER_SIZE=32
    # CONFIG_UART_0_NRF_HW_ASYNC is not set
    # CONFIG_UART_0_NRF_ASYNC_LOW_POWER is not set
    CONFIG_UART_1_NRF_UARTE=y
    # CONFIG_UART_1_INTERRUPT_DRIVEN is not set
    CONFIG_UART_1_ASYNC=y
    CONFIG_UART_1_ENHANCED_POLL_OUT=y
    # CONFIG_UART_1_NRF_PARITY_BIT is not set
    CONFIG_UART_1_NRF_TX_BUFFER_SIZE=32
    # CONFIG_UART_1_NRF_HW_ASYNC is not set
    # CONFIG_UART_1_NRF_ASYNC_LOW_POWER is not set
    CONFIG_UART_2_NRF_UARTE=y
    # CONFIG_UART_2_INTERRUPT_DRIVEN is not set
    CONFIG_UART_2_ASYNC=y
    CONFIG_UART_2_ENHANCED_POLL_OUT=y
    # CONFIG_UART_2_NRF_PARITY_BIT is not set
    CONFIG_UART_2_NRF_TX_BUFFER_SIZE=32
    # CONFIG_UART_2_NRF_HW_ASYNC is not set
    # CONFIG_UART_2_NRF_ASYNC_LOW_POWER is not set
    CONFIG_UART_ENHANCED_POLL_OUT=y
    CONFIG_NRF_UARTE_PERIPHERAL=y
    # CONFIG_UART_ALTERA_JTAG is not set
    # CONFIG_UART_RPI_PICO is not set
    # CONFIG_UART_XLNX_UARTLITE is not set
     
    /#***************
    5. My requirement is to use : UART1 and UART2 in DMA ASYNC_API Mode, while asset_tracker_v2 requires UART0 in Interrupt Driven Mode for AT Commands.
    6. Will above settings in point 4 achieve the requirements of point 5. 
  • Hello!

    The Kconfig file can be used to set custom default values for configuration options, while prj.conf can be used to overrule those defaults. So prj.conf overrides Kconfig.

    As far as I can tell it looks like your above settings will result in your desired configuration.

    Best regards,

    Einar

Related