Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

SPI Test Driver

Read the articles...

To install the SPI Test Driver in your NuttX project...

  1. Copy the files...

    To the folder nuttx/drivers/rf

  2. Update the NuttX Build Config...

    ## TODO: Change this to the path of our "incubator-nuttx" folder
    cd nuttx/nuttx
    
    ## Preserve the Build Config
    cp .config ../config
    
    ## Erase the Build Config and Kconfig files
    make distclean
    
    ## For BL602: Configure the build for BL602
    ./tools/configure.sh bl602evb:nsh
    
    ## For ESP32: Configure the build for ESP32.
    ## TODO: Change "esp32-devkitc" to our ESP32 board.
    ./tools/configure.sh esp32-devkitc:nsh
    
    ## Restore the Build Config
    cp ../config .config
    
    ## Edit the Build Config
    make menuconfig 
  3. In menuconfig...

    • Enable the SPI Port (SPI0)

    • Enable the SPI Character Driver

    • Enable the SPI Test Driver

    As explained here...

    "Load the SPI Test Driver"

  4. Edit the function bl602_bringup or esp32_bringup in this file...

    ## For BL602:
    nuttx/boards/risc-v/bl602/bl602evb/src/bl602_bringup.c
    
    ## For ESP32: Change "esp32-devkitc" to our ESP32 board 
    nuttx/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c
    

    And call spi_test_driver_register to register our SPI Test Driver.

    (See this)

  5. The SPI Test Driver is accessible by NuttX Apps as "/dev/spitest0"