This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

SPIM failed to read after NRF SDK updated to 1.6.x

Hi all,

I am using NRF5340 in my custom board. The spims are working well, they are developed by nrfx lib in NRF SDK 1.5.1.

However, after I updated my sdk to 1.6.1, the spim cannot read correctly anymore.

The chip id I want to read by spim is supposed to be  "0x1a", but always got "0xff".

So is there any changes between sdk 1.5.1 and 1.6.1 on using spim?

Thanks!

  • Hi,

    Could you show me the prj.conf of the project?

    Did you make any changes, other than updating the SDK version?

  • No, I did not change any code, and I use the same board.

    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    CONFIG_BOARD_ENABLE_DCDC_APP=y
    CONFIG_BOARD_ENABLE_DCDC_NET=y
    CONFIG_BOARD_ENABLE_DCDC_HV=y
    
    CONFIG_BT=y
    CONFIG_BT_DEBUG_LOG=y
    CONFIG_BT_SMP=y
    CONFIG_BT_SIGNING=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DIS=y
    CONFIG_BT_ATT_PREPARE_COUNT=5
    CONFIG_BT_PRIVACY=y
    CONFIG_BT_DEVICE_NAME="Zephyr Peripheral"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_DEVICE_NAME_DYNAMIC=y
    CONFIG_BT_DEVICE_NAME_MAX=65
    CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
    CONFIG_BT_SETTINGS=y
    
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    
    CONFIG_DISK_ACCESS=y
    CONFIG_LOG=y
    CONFIG_FILE_SYSTEM=y
    CONFIG_FAT_FILESYSTEM_ELM=y
    
    CONFIG_FPU=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_NANO=n
    CONFIG_CMSIS_DSP=y
    CONFIG_CMSIS_DSP_MATRIX=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_GPIO=n
    CONFIG_NRFX_GPIOTE=y
    CONFIG_NRFX_DPPI=y
    CONFIG_NRFX_SPIM=y
    CONFIG_NRFX_SPIM2=y
    CONFIG_NRFX_SPIM3=y
    CONFIG_NRFX_SPIM4=y
    
    CONFIG_NO_OPTIMIZATIONS=y
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_NRFX_QSPI=n
    CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
    CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=128
    CONFIG_PPI_TRACE=y
    CONFIG_NRFX_TIMER=y
    # CONFIG_NRFX_TIMER0 is not set
    CONFIG_NRFX_TIMER1=y
    CONFIG_NRFX_TIMER2=y
    CONFIG_NRFX_PWM=y
    CONFIG_NRFX_PWM0=y
    CONFIG_NRFX_UARTE=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_UART_ASYNC_API=y
    #CONFIG_UART_0_NRF_UARTE=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_UART_0_INTERRUPT_DRIVEN=y
    #CONFIG_UART_0_NRF_FLOW_CONTROL=n
    
    CONFIG_SERIAL=n
    #
    CONFIG_CONSOLE=y
    #CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_PRINTK=y
    #CONFIG_LOG_DEFAULT_LEVEL=4
    #CONFIG_USE_SEGGER_RTT=y
    #CONFIG_LOG_BACKEND_RTT=y
    #CONFIG_LOG_BACKEND_UART=n
    #CONFIG_LOG_DEFERRED=n
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_USE_SEGGER_RTT=y
    #
    
    #i2c
    CONFIG_I2C=n
    CONFIG_I2C_NRFX=y
    CONFIG_I2C_1=y
    CONFIG_NRFX_TWIM1=y
    
    
    CONFIG_HEAP_MEM_POOL_SIZE=65536
    CONFIG_MAIN_STACK_SIZE=16384
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=16384
    #CONFIG_IDLE_STACK_SIZE = 4096
    #CONFIG_PRIVILEGED_STACK_SIZE = 4096
    #CONFIG_APPLICATION_WORKQUEUE_STACK_SIZE=4096
    #CONFIG_APPLICATION_WORKQUEUE_STACK_SIZE=2048
    CONFIG_HW_STACK_PROTECTION=y
    
    
    #USB related configs
    CONFIG_USB=y
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
    CONFIG_LOG=y
    CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
    CONFIG_MASS_STORAGE_DISK_NAME="NAND"

  • Hi Oivind,

    Is there any advice for me?

  • There was a change to the disk drivers in zephyr, I think that might be the issue. Try to add:

    CONFIG_DISK_DRIVERS=n

  • I added CONFIG_DISK_DRIVERS=n to prj.conf, but still got the same result.

    It is very strange, because I tested the program (built in sdk v1.6.1) on 5340 DK board, it worked well. The program(built in sdk v1.6.1) failed on my custom board.

    But the program(built in sdk 1.5.1) worked well on both 5340 DK and my custom board!

    So I really want to know why and what is the different between 1.5.1 and 1.6.1? 

Related