nrf9160 uart shell echo works on nrf9160dk (SICA B1 2110AM) but not on Thingy91 (SICA B0 1924AP)

I have two boards, a Thingy91 with "nrf9160 SICA B0 1924AP" and a nrf9160dk with "nrf9160 SICA B1 2110AM". Everything works as expected on nrf9160dk but on the Thingy91 shell echo do not work (i.e. keys pressed in console not visible until I press enter).

it seems that `nrf_uarte_event_check(uarte, NRF_UARTE_EVENT_ENDRX)`, which reads the `ENDRX` register, behaves differently on the two boards. On nrf9160dk it returns for every character received but on Thingy91 it does not return until new line.

Is this a known issue or am I missing something obvious? I have compared .config, .dts and uart register values but found no clues, except that some `RESERVED` uart register have different values between the two boards.

Some relevant configs:

CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_UART_ASYNC_API=y

Parents
  • Hello, 

    Running the Modem Shell sample application with its default Kconfig does work as expected for me, both on a

    nRF9160 DK (v1.0.0, SICA B1)

    mosh:~$ *** Booting Zephyr OS build v3.0.99-ncs1  ***                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                  
    MOSH version:       v2.0.0                                                                                                                                                                                                                                                                                                    
    MOSH build id:      custom                                                                                                                                                                                                                                                                                                    
    MOSH build variant: dev                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  
    Network registration status: searching                                                                                                                                                                                                                                                                                        
    Currently active system mode: LTE-M                                                                                                                                                                                                                                                                                           
    LTE cell changed: ID: 21250048, Tracking area: 31401                                                                                                                                                                                                                                                                          
    RRC mode: Connected                                                                                                                                                                                                                                                                                                           
    PDN event: PDP context 0 activated                                                                                                                                                                                                                                                                                            
    Network registration status: Connected - home network                                                                                                                                                                                                                                                                         
    PSM parameter update: TAU: 1152000, Active time: 20 seconds                                                                                                                                                                                                                                                                   
    PDN event: PDP context 0 IPv6 up                                                                                                                                                                                                                                                                                              
    Modem config for system mode: LTE-M                                                                                                                                                                                                                                                                                           
    Modem config for LTE preference: No preference, automatically selected by the modem                                                                                                                                                                                                                                           
    Currently active system mode: LTE-M                                                                                                                                                                                                                                                                                           
    Modem FW version:      mfw_nrf9160_1.3.2                                                                                                                                                                                                                                                                                      
    Device ID:             nrf-352656109830011                                                                                                                                                                                                                                                                                    
    Operator full name:   ""                                                                                                                                                                                                                                                                                                      
    Operator short name:  ""                                                                                                                                                                                                                                                                                                      
    Operator PLMN:        "24201"                                                                                                                                                                                                                                                                                                 
    Current cell id:       21250048 (0x01444000)                                                                                                                                                                                                                                                                                  
    Current phy cell id:   177                                                                                                                                                                                                                                                                                                    
    Current band:          20                                                      
    Current TAC:           31401 (0x7AA9)  
    Current rsrp:          50: -91dBm  
    Current snr:           36: 12dB
    Mobile network time and date: 22/06/28,07:52:41+08
    PDP context info 1:                    
      CID:                0                                                        
      PDN ID:             0                                                        
      PDP context active: yes       
      PDP type:           IPV4V6                                                   
      APN:                telenor.smart                                            
      IPv4 MTU:           1500                                                     
      IPv6 MTU:           1500                                                     
      IPv4 address:       10.50.79.182                                             
      IPv6 address:       2a02:2121:6ba:66b5::2b44:30a1
      IPv4 DNS address:   193.213.112.4, 130.67.15.198
      IPv6 DNS address:   2001:4600:4:fff::52, 2001:4600:4:1fff::52
    RRC mode: Idle                                                                 
    mosh:~$ ping -d google.com                                                     
    Initiating ping to: google.com                                                 
    RRC mode: Connected                                                            
    Source IP addr: 10.50.79.182                                                   
    Destination IP addr: 142.250.74.14                                             
    Pinging google.com results: time=0.039secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.052secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.112secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.046secs, payload sent: 0, payload received 0
    Ping statistics for google.com:                                                
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
    Approximate round trip times in milli-seconds:
        Minimum = 39ms, Maximum = 112ms, Average = 62ms
    Pinging DONE                                                                   
    RRC mode: Idle                                                                 
    mosh:~$                          

    and Thingy:91 (v1.4.0, SICA B0). 

    mosh:~$ *** Booting Zephyr OS build v3.0.99-ncs1  ***
                                                                                   
    MOSH version:       v2.0.0
    MOSH build id:      custom         
    MOSH build variant: dev 
                                                                                   
                                                                                   
                                                                                   
    Network registration status: searching                                                                                                                                                                                                                                                                                        
    Currently active system mode: LTE-M
    LTE cell changed: ID: 21250048, Tracking area: 31401
    RRC mode: Connected
    PDN event: PDP context 0 activated
    Network registration status: Connected - roaming
    PSM parameter update: TAU: 9000, Active time: -1 seconds
    Modem config for system mode: LTE-M
    Modem config for LTE preference: No preference, automatically selected by the modem
    Currently active system mode: LTE-M
    Modem FW version:      mfw_nrf9160_1.3.1
    Device ID:             nrf-352656101085176
    Operator full name:   ""
    Operator short name:  ""
    Operator PLMN:        "24201"
    Current cell id:       21250048 (0x01444000)
    Current phy cell id:   177
    Current band:          20
    Current TAC:           31401 (0x7AA9)
    Current rsrp:          45: -96dBm
    Current snr:           37: 13dB
    Mobile network time and date: 22/06/28,08:16:11+08
    PDP context info 1:
      CID:                0
      PDN ID:             0
      PDP context active: yes
      PDP type:           IP
      APN:                ibasis.iot
      IPv4 MTU:           1430
      IPv4 address:       10.160.233.49
      IPv6 address:       ::
      IPv4 DNS address:   62.93.146.209, 216.168.184.184
      IPv6 DNS address:   ::, ::
    RRC mode: Idle
    mosh:~$ ping -d google.com
    Initiating ping to: google.com
    RRC mode: Connected
    Source IP addr: 10.160.233.49
    Destination IP addr: 142.250.179.174
    Pinging google.com results: time=0.079secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.130secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.068secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.142secs, payload sent: 0, payload received 0
    Ping statistics for google.com:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
    Approximate round trip times in milli-seconds:
        Minimum = 68ms, Maximum = 142ms, Average = 104ms
    Pinging DONE
    mosh:~$ 
    

    However, with the default configuration, only: 

    CONFIG_UART_INTERRUPT_DRIVEN=y 

    is set, while: 

    # CONFIG_UART_ASYNC_API is not set 

    Some relevant configs:

    CONFIG_UART_INTERRUPT_DRIVEN=y

    CONFIG_UART_ASYNC_API=y

    Could enabling both APIs have any impact on the UART performance for the Thingy:91? The Zephyr documentation also states that only features needed should be enabled. If you disable the asynchronous API, does that make any difference on your Thingy:91? 

    Regards, 

    Markus 

Reply
  • Hello, 

    Running the Modem Shell sample application with its default Kconfig does work as expected for me, both on a

    nRF9160 DK (v1.0.0, SICA B1)

    mosh:~$ *** Booting Zephyr OS build v3.0.99-ncs1  ***                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                  
    MOSH version:       v2.0.0                                                                                                                                                                                                                                                                                                    
    MOSH build id:      custom                                                                                                                                                                                                                                                                                                    
    MOSH build variant: dev                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  
    Network registration status: searching                                                                                                                                                                                                                                                                                        
    Currently active system mode: LTE-M                                                                                                                                                                                                                                                                                           
    LTE cell changed: ID: 21250048, Tracking area: 31401                                                                                                                                                                                                                                                                          
    RRC mode: Connected                                                                                                                                                                                                                                                                                                           
    PDN event: PDP context 0 activated                                                                                                                                                                                                                                                                                            
    Network registration status: Connected - home network                                                                                                                                                                                                                                                                         
    PSM parameter update: TAU: 1152000, Active time: 20 seconds                                                                                                                                                                                                                                                                   
    PDN event: PDP context 0 IPv6 up                                                                                                                                                                                                                                                                                              
    Modem config for system mode: LTE-M                                                                                                                                                                                                                                                                                           
    Modem config for LTE preference: No preference, automatically selected by the modem                                                                                                                                                                                                                                           
    Currently active system mode: LTE-M                                                                                                                                                                                                                                                                                           
    Modem FW version:      mfw_nrf9160_1.3.2                                                                                                                                                                                                                                                                                      
    Device ID:             nrf-352656109830011                                                                                                                                                                                                                                                                                    
    Operator full name:   ""                                                                                                                                                                                                                                                                                                      
    Operator short name:  ""                                                                                                                                                                                                                                                                                                      
    Operator PLMN:        "24201"                                                                                                                                                                                                                                                                                                 
    Current cell id:       21250048 (0x01444000)                                                                                                                                                                                                                                                                                  
    Current phy cell id:   177                                                                                                                                                                                                                                                                                                    
    Current band:          20                                                      
    Current TAC:           31401 (0x7AA9)  
    Current rsrp:          50: -91dBm  
    Current snr:           36: 12dB
    Mobile network time and date: 22/06/28,07:52:41+08
    PDP context info 1:                    
      CID:                0                                                        
      PDN ID:             0                                                        
      PDP context active: yes       
      PDP type:           IPV4V6                                                   
      APN:                telenor.smart                                            
      IPv4 MTU:           1500                                                     
      IPv6 MTU:           1500                                                     
      IPv4 address:       10.50.79.182                                             
      IPv6 address:       2a02:2121:6ba:66b5::2b44:30a1
      IPv4 DNS address:   193.213.112.4, 130.67.15.198
      IPv6 DNS address:   2001:4600:4:fff::52, 2001:4600:4:1fff::52
    RRC mode: Idle                                                                 
    mosh:~$ ping -d google.com                                                     
    Initiating ping to: google.com                                                 
    RRC mode: Connected                                                            
    Source IP addr: 10.50.79.182                                                   
    Destination IP addr: 142.250.74.14                                             
    Pinging google.com results: time=0.039secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.052secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.112secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.046secs, payload sent: 0, payload received 0
    Ping statistics for google.com:                                                
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
    Approximate round trip times in milli-seconds:
        Minimum = 39ms, Maximum = 112ms, Average = 62ms
    Pinging DONE                                                                   
    RRC mode: Idle                                                                 
    mosh:~$                          

    and Thingy:91 (v1.4.0, SICA B0). 

    mosh:~$ *** Booting Zephyr OS build v3.0.99-ncs1  ***
                                                                                   
    MOSH version:       v2.0.0
    MOSH build id:      custom         
    MOSH build variant: dev 
                                                                                   
                                                                                   
                                                                                   
    Network registration status: searching                                                                                                                                                                                                                                                                                        
    Currently active system mode: LTE-M
    LTE cell changed: ID: 21250048, Tracking area: 31401
    RRC mode: Connected
    PDN event: PDP context 0 activated
    Network registration status: Connected - roaming
    PSM parameter update: TAU: 9000, Active time: -1 seconds
    Modem config for system mode: LTE-M
    Modem config for LTE preference: No preference, automatically selected by the modem
    Currently active system mode: LTE-M
    Modem FW version:      mfw_nrf9160_1.3.1
    Device ID:             nrf-352656101085176
    Operator full name:   ""
    Operator short name:  ""
    Operator PLMN:        "24201"
    Current cell id:       21250048 (0x01444000)
    Current phy cell id:   177
    Current band:          20
    Current TAC:           31401 (0x7AA9)
    Current rsrp:          45: -96dBm
    Current snr:           37: 13dB
    Mobile network time and date: 22/06/28,08:16:11+08
    PDP context info 1:
      CID:                0
      PDN ID:             0
      PDP context active: yes
      PDP type:           IP
      APN:                ibasis.iot
      IPv4 MTU:           1430
      IPv4 address:       10.160.233.49
      IPv6 address:       ::
      IPv4 DNS address:   62.93.146.209, 216.168.184.184
      IPv6 DNS address:   ::, ::
    RRC mode: Idle
    mosh:~$ ping -d google.com
    Initiating ping to: google.com
    RRC mode: Connected
    Source IP addr: 10.160.233.49
    Destination IP addr: 142.250.179.174
    Pinging google.com results: time=0.079secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.130secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.068secs, payload sent: 0, payload received 0
    Pinging google.com results: time=0.142secs, payload sent: 0, payload received 0
    Ping statistics for google.com:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
    Approximate round trip times in milli-seconds:
        Minimum = 68ms, Maximum = 142ms, Average = 104ms
    Pinging DONE
    mosh:~$ 
    

    However, with the default configuration, only: 

    CONFIG_UART_INTERRUPT_DRIVEN=y 

    is set, while: 

    # CONFIG_UART_ASYNC_API is not set 

    Some relevant configs:

    CONFIG_UART_INTERRUPT_DRIVEN=y

    CONFIG_UART_ASYNC_API=y

    Could enabling both APIs have any impact on the UART performance for the Thingy:91? The Zephyr documentation also states that only features needed should be enabled. If you disable the asynchronous API, does that make any difference on your Thingy:91? 

    Regards, 

    Markus 

Children
No Data
Related