MX25R64 cannot enter DPD.

Hello,

    We found that the nrf52840 cannot properly pull the CS pin high to get the MX25R64 into DPD. The SDK version is nrf connect SDK V2.0.0. The macro CONFIG_PM_DEVICE=y has been enabled. At this time, the driver nrf_qspi_nor.c should be able to control the MX25R64 to enter the DPD. But when we measured the CS pin level, it was always low. How to pull the cs pin high in nrf_qspi_nor.c ?

    Thanks.

Parents
  • Hello Bon,

    Are you seeing any activity on the other pins connected to MX25R64?

    I found another case, nRF52840 Zephyr dual QSPI MX25R64 flash example, that looks somewhat similar to yours. Try copying from the suggested solution into your .overlay:

    &qspi {
    	status = "okay";
    	sck-pin = <19>;
    	io-pins = <20>, <21>;
    	csn-pins = <17>;
    	mx25r64: mx25r6435f@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		quad-enable-requirements = "NONE";
    		/* MX24R64 supports only pp and pp4io */
    		writeoc = "pp";
    		/* MX24R64 supports all readoc options */
    		readoc = "fastread";
    		sck-frequency = <8000000>;
    		label = "MX25R64";
    		jedec-id = [c2 28 17];
    		sfdp-bfp = [
    			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
    			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
    			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
    			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
    		];
    		size = <67108864>;
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    Could you please post your .overlay and your prj.conf file?

Reply
  • Hello Bon,

    Are you seeing any activity on the other pins connected to MX25R64?

    I found another case, nRF52840 Zephyr dual QSPI MX25R64 flash example, that looks somewhat similar to yours. Try copying from the suggested solution into your .overlay:

    &qspi {
    	status = "okay";
    	sck-pin = <19>;
    	io-pins = <20>, <21>;
    	csn-pins = <17>;
    	mx25r64: mx25r6435f@0 {
    		compatible = "nordic,qspi-nor";
    		reg = <0>;
    		quad-enable-requirements = "NONE";
    		/* MX24R64 supports only pp and pp4io */
    		writeoc = "pp";
    		/* MX24R64 supports all readoc options */
    		readoc = "fastread";
    		sck-frequency = <8000000>;
    		label = "MX25R64";
    		jedec-id = [c2 28 17];
    		sfdp-bfp = [
    			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
    			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
    			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
    			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
    		];
    		size = <67108864>;
    		has-dpd;
    		t-enter-dpd = <10000>;
    		t-exit-dpd = <35000>;
    	};
    };

    Could you please post your .overlay and your prj.conf file?

Children
  • Hi,

    I tried your suggested solution but CS is still low. Below is my .overlay and your prj.conf. I renamed prj.conf to prj.conf.txt because devzone doesn't allow me to upload files in .conf format.

    app.overlay

    #
    # Copyright (c) 2021, Nordic Semiconductor ASA
    # All rights reserved.
    #
    # Use in source and binary forms, redistribution in binary form only, with
    # or without modification, are permitted provided that the following conditions
    # are met:
    #
    # 1. Redistributions in binary form, except as embedded into a Nordic
    #    Semiconductor ASA integrated circuit in a product or a software update for
    #    such product, must reproduce the above copyright notice, this list of
    #    conditions and the following disclaimer in the documentation and/or other
    #    materials provided with the distribution.
    #
    # 2. Neither the name of Nordic Semiconductor ASA nor the names of its
    #    contributors may be used to endorse or promote products derived from this
    #    software without specific prior written permission.
    #
    # 3. This software, with or without modification, must only be used with a Nordic
    #    Semiconductor ASA integrated circuit.
    #
    # 4. Any software provided in binary form under this license must not be reverse
    #    engineered, decompiled, modified and/or disassembled.
    #
    # THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS OR
    # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    # MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
    # DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE LIABLE
    # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    ################################################################################
    # Application Configuration - release version
    
    # Enable HomeKit
    CONFIG_HOMEKIT=y
    
    # Firmware version
    CONFIG_MCUBOOT_IMAGE_VERSION="1.0.1+0"
    
    # Newlib and FPU are requirements for HomeKit
    CONFIG_NEWLIB_LIBC=y
    CONFIG_FPU=y
    CONFIG_FPU_SHARING=y
    
    # Settings configuration
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_NVS=y
    CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=1
    CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
    
    # Multiprotocol support
    CONFIG_MPSL=y
    
    # Crypto configuration
    CONFIG_NRF_OBERON=y
    CONFIG_OPENTHREAD_NRF_SECURITY_CHOICE=y
    CONFIG_NORDIC_SECURITY_BACKEND=y
    CONFIG_CC3XX_BACKEND=n
    CONFIG_MBEDTLS_PK_C=y
    CONFIG_MBEDTLS_PK_WRITE_C=y
    CONFIG_MBEDTLS_SHA512_C=n
    CONFIG_MBEDTLS_RSA_C=n
    CONFIG_MBEDTLS_CIPHER_MODE_CTR=n
    CONFIG_MBEDTLS_CIPHER_MODE_CBC=n
    
    # Bootloader Configuration
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y
    CONFIG_MCUBOOT_IMG_MANAGER=y
    
    # Miscellaneous
    CONFIG_MPU_STACK_GUARD=y
    CONFIG_HEAP_MEM_POOL_SIZE=32768
    CONFIG_ASSERT=n
    CONFIG_DK_LIBRARY=y
    CONFIG_REBOOT=y
    CONFIG_BOOT_BANNER=n
    
    # Disable logs
    CONFIG_LOG=n
    CONFIG_SERIAL=n
    CONFIG_SHELL_LOG_BACKEND=n
    CONFIG_OPENTHREAD_SHELL=n
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    
    # Stacks
    CONFIG_HAP_STACK_SIZE=5283
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4492
    
    # External flash configuration
    CONFIG_NORDIC_QSPI_NOR=y
    CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16
    
    # HAP over Bluetooth LE
    CONFIG_HAP_HAVE_BLE=y
    
    # Number of vendor specific UUIDs
    CONFIG_HAP_BT_VS_UUID_COUNT=60
    
    # Enable HAP over Bluetooth LE
    CONFIG_BT=y
    CONFIG_BT_CTLR=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_GATT_CLIENT=y
    CONFIG_BT_GATT_DYNAMIC_DB=y
    
    # Bluetooth LE configuration
    CONFIG_BT_DEVICE_NAME_DYNAMIC=y
    CONFIG_BT_DEVICE_NAME_MAX=34
    CONFIG_BT_CTLR_PHY_2M=y
    CONFIG_BT_LL_SOFTDEVICE=y
    CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y
    CONFIG_BT_PERIPHERAL_PREF_MIN_INT=16
    CONFIG_BT_PERIPHERAL_PREF_MAX_INT=32
    CONFIG_BT_MAX_CONN=2
    CONFIG_BT_MAX_PAIRED=1
    
    # Disable Bluetooth features not needed
    CONFIG_BT_DEBUG_NONE=y
    CONFIG_BT_ASSERT=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_GATT_CACHING=n
    CONFIG_BT_HCI_VS_EXT=n
    
    # Bluetooth LE threads stacks sizes
    CONFIG_BT_RX_STACK_SIZE=6400
    CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
    CONFIG_BT_HCI_TX_STACK_SIZE=800
    
    # Enabling Prepare Write feature
    CONFIG_BT_ATT_PREPARE_COUNT=8
    
    # Bluetooth LE buffers
    CONFIG_BT_CTLR_RX_BUFFERS=1
    CONFIG_BT_BUF_ACL_TX_COUNT=2
    CONFIG_BT_L2CAP_TX_MTU=158
    CONFIG_BT_BUF_ACL_TX_SIZE=27
    CONFIG_BT_BUF_ACL_RX_COUNT=2
    CONFIG_BT_BUF_ACL_RX_SIZE=162
    CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1
    CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
    
    # HAP over Thread
    CONFIG_HAP_HAVE_THREAD=y
    
    # Thread networking
    CONFIG_OPENTHREAD_THREAD_STACK_SIZE=14096
    CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NETWORKING=y
    
    # OpenThread libraries
    CONFIG_OPENTHREAD_LIBRARY=y
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y
    CONFIG_OPENTHREAD_TCP_ENABLE=n
    
    # Enable MTD Sleepy End Device
    CONFIG_OPENTHREAD_MTD=y
    CONFIG_OPENTHREAD_MTD_SED=y
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y
    # Poll period for sleepy end devices [ms]
    CONFIG_OPENTHREAD_POLL_PERIOD=3000
    CONFIG_PM_DEVICE=y
    
    # Network buffers
    CONFIG_NET_PKT_RX_COUNT=10
    CONFIG_NET_PKT_TX_COUNT=10
    CONFIG_NET_BUF_RX_COUNT=16
    CONFIG_NET_BUF_TX_COUNT=16
    
    # Enable custom EUI-64 address
    # This option enables setting custom vendor EUI64 value stored
    # in User information configuration registers (UICR).
    # Notice that this disables the default setting of EUI64
    # value from Factory information configuration registers (FICR)
    # CONFIG_IEEE802154_NRF5_UICR_EUI64_ENABLE=y
    
    # Base of the two consecutive registers from the UICR customer
    # section in which custom EUI64 is stored
    CONFIG_IEEE802154_NRF5_UICR_EUI64_REG=0
    
    # CONFIG_HAP_TESTING=y
    # CONFIG_HAP_FIRMWARE_UPDATE=y
    
    CONFIG_ADC=y
    

    Thanks.

Related