Interact with nRF9151 using external third party MCU

Hello, guys Wave

We want to evaluate nRF9151 SiP the following way:

  • To set it to operate in serial mode in which it is ready to receive AT commands (it comes pre-flashed in that mode on nRF9151-DK, to the best of my understanding)
  • To send AT commands and other necessary GPIO control using some external MCU (not nRF5340 MCU which is populated on nRF9151-DK board but some third party, external MCU)

Few questions related to our goal:

  1. Is it possible to achieve what we want?
  2. Which UART interface should we use for sending AT commands - UART1 or UART2?
  3. In addition to UART Rx/Tx, do we need some other GPIO to control the modem (e.g. Reset, some other GPIO that plays a role in modem control...)?
  4. We would like to test NB-IoT modem by default and switch to LTE-M if needed. How to achieve this, is there any special AT command for switching between available modes (NB-IoT/LTE-M)?

Thanks in advance for your time and efforts. Looking forward to hearing from you.

Sincerely,
Bojan.

Parents
  • Okay, I figured out that UART1 can be used to control the modem by the external MCU through the pins P0.26 (Modem RX, MCU TX) and P0.27 (Modem TX, MCU RX). It also seems that pressing the RESET button on nRF9151-DK resets the modem.

    Is there any other pin of the modem that needs to be controlled by an external MCU in order to reboot/reset the modem if it gets stuck or to put it so sleep if we want?

  • Hello Bojan,

    I'll try to reply to you questions one by one.

    To set it to operate in serial mode in which it is ready to receive AT commands (it comes pre-flashed in that mode on nRF9151-DK, to the best of my understanding)

    I would recommend at least getting the nRF Connect for Desktop and running the Quick Start app. Also you may want to update the Modem FW and Serial LTE Modem application (you can do that with the Cellular Monitor app in nRF Connect for Desktop).

    If you want to for example switch the pins used for things, then you'd need to compile SLM by yourself.

    Is it possible to achieve what we want?

    Yes.

    Which UART interface should we use for sending AT commands - UART1 or UART2?

    I should probably explain one thing first: those are just the default pins for UARTx. On the nRF91 family you can freely choose which GPIO pins do you want to connect to for example UART.

    Markings "UART1" and "UART2" on the DK are just showing 2 default UART pinouts on the DK, while actually being connected to the UART0 and UART1 peripheral instances on the nRF9151 SiP.

    By default SLM will be using the pins marked as UART1 on the DK schematics (UART0 peripheral on nRF9151).

    Pins marked as UART2 are by default connected to the UART1 peripheral, which is used for modem traces by default and can be useful to have routed to some test points/connector even in your end product.

    In addition to UART Rx/Tx, do we need some other GPIO to control the modem (e.g. Reset, some other GPIO that plays a role in modem control...)?

    Other than the aforementioned reset, if you look at configuration options there are two more pins that you can/should use, set by CONFIG_SLM_POWER_PIN and CONFIG_SLM_INDICATE_PIN:

    We would like to test NB-IoT modem by default and switch to LTE-M if needed. How to achieve this, is there any special AT command for switching between available modes (NB-IoT/LTE-M)?

    Please take a look at our DevAcademy course page explaining some of the basic AT commands:

    https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-2-cellular-fundamentals/topic/lesson-2-at-commands/

    As shown there you can use the AT%XSYSTEMMODE command.

    Best regards,

    Michal

  • Thanks for sharing useful info with me, !

    I am aware of the QuickStart app and the possibility to flash pre-built Serial LTE Modem app + modem FW (currently v2.0.1) from there.

    Concerning the UARTs, by analysing the SLM sample in your repository, I came across the nrf9151dk_nrf9151.conf file (link) where it says that UART_2 peripheral of nRF9151 SiP should be used when working with external MCU. This means that, if I want to evaluate nRF9151 SiP in combination with external MCU, I would need to:

    1. Modify nrf9151dk_nrf9151.conf file (comment out UART_0 and uncomment UART_2 Kconfig items, same thing for SLM_POWER_PIN and SLM_INDICATE_PIN)
    2. Recompile the SLM sample (using overlay-external-mcu.overlay file that will disable UART_0 and enable UART_2 peripheral)
    3. ...and flash it to nRF9151-DK . 

    Is my understanding correct?

  • Thanks!

    One more question... is it mandatory to use UART HW control pints (RTS, CTS)?

    When I was playing with pre-flashed SLM sample that is tailored for PC-based control of the modem, I connected an external USB-to-UART converter on nRF9151-dk UART_0 Rx/Tx lines (P0.26, P0.27) and was able to send AT commands using only Rx/Tx lines.

Reply Children
No Data
Related