This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stuck at SPM: prepare to jump to Non-Secure image (nRF9160)

I just finished successfully running the azure_fota and azure_iot_hub demos on my nRF9160DK. In a completely separate project, I am now attempting to adapt the TMP116 sensor demo to the nRF9160DK so that (later) I can stream TMP117 temperature probe data to Azure. The demo says that it should support both TMP116 and TMP117 equally, but my error seems to be in a different area.

My issue is that the serial output stops at "SPM: prepare to jump to Non-Secure image."

I have created the overlay by following the demo-supplied overlay and other nRF9160 documentation online. I am using the following commands to build and flash the device (without errors or warnings):

$ rm -rf build

$ west build -b nrf9160dk_nrf9160_ns -- -DDTC_OVERLAY_FILE="boards/arm/nrf9160dk_nrf9160.overlay"

$ west flash --erase

Could you please help me understand why my application is not proceeding to main()? I feel like it is something simple, but I still cannot identify the cause.tmp116.tar.gzterminaloutput.docx

Parents Reply
  • Using an nRF52840dk (instead of the nRF9160dk), I am able to read temperatures from the TMP117. So, whatever I'm doing wrong must be unique to the nRF9160.

    I'm including my project and build commands for the nRF52840dk below in case it might be of use to anyone else. My TMP117 has an i2c address of 0x49.

    $ rm -rf build
    $ west build -b nrf52840dk_nrf52840 -- -DDTC_OVERLAY_FILE="boards/arm/nrf52840dk_nrf52840.overlay"
    $ west flash --erase

    tmp116_nrf52840.tar.gz

Children
  • Solved the issue! I have to use &i2c2 instead of &i2c1 in my board overlay and disable &uart2. I'm not 100% sure why this is, but I'll keep looking into it tomorrow to see if I can understand it. My updated overlay file is below - when used with the rest of the tmp116.tar.gz project, I am seeing temperatures over serial.

    /*
     * Copyright (c) 2019 Centaur Analytics, Inc
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    &i2c2 {
        
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	sda-pin = < 30 >;
    	scl-pin = < 31 >;
        clock-frequency = <I2C_BITRATE_STANDARD>;
    
    	ti_tmp116: ti_tmp116@49 {
    		compatible = "ti,tmp116";
    		reg = <0x49>;
    		label = "TMP116";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		
    		eeprom: ti_tmp116_eeprom@0 {
    			compatible = "ti,tmp116-eeprom";
    			reg = <0x0>;
    			label = "TMP116_EEPROM";
    			read-only;
    		};
    	};
    
    };
    
    &uart2 {
    	status = "disabled";
    };
    

Related