This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1642BOOST: can IWR1642Boot output data to spi output

Part Number: IWR1642BOOST

Hi,

I have a IWR1642Boost board.  I am wondering if the data can be routed to SPI instead of UART.

Thanks

Terry

  • Hi Terry,

    Yes, you should be able to send data to SPI. Please refer to SPI test code in SDK for the same.

    Thanks

    Yogesh

  • Hi Yogesh

    could you please tell me the file name so that i can search ?  is this test code for reading data from SPI ? or actually maksing the change to send data to SPI bus ?

    Thanks

  • Hi Terry,

    Both. See ~\mmwave_sdk_xx_xx_xx_xx\packages\ti\drivers\spi\test\xwr16xx\main.c

    Thanks

    Yogesh

  • Hi Yogesh,

    Thanks a lot, I found this file . I am still trying to get the big picture.   the board is connected to pc.  by default it sends day throught UART right ?

    and this test code running on host pc  to read data from the platform ? 

    Thanks,

    Terry

  • Hi Yogesh,

    Is there a document which describe how do i build this test code ? mmwave_sdk_xx_xx_xx_xx\packages\ti\drivers\spi\test\xwr16xx\main.c

    Thanks,

    Terry

  • Hi Terry,

    For building, please refer to section 4.5 of the mmwave_sdk_user_guide.pdf in ~\mmwave_sdk_xx_xx_xx_xx\docs folder.

    For test procedure, please refer to mmwave_sdk_unit_test_procedure.pdf in ~\mmwave_sdk_xx_xx_xx_xx\docs folder.

    Thanks

    Yogesh

  • Hi Yogesh,

    I followed the mmwave_sdk_unit_test_procedure.pdf.  first use ccs to load  ti/mmwave_sdk_03_03_00_03/packages/ti/drivers/spi/test/xwr16xx/xwr16xx_spi_mss.xer4f first . I would like to follow 1. 6. R4 SPI/FTDI Test.

    On xwr16xx side I change the variable as following

    Parameter

    Value
    gXWR1xxxLoopbackTest 0
    gXWR1xxxMasterWithXWR1xxx 0
    gXWR1xxxSlaveWithXWR1xxx 0
    gXWR1xxxSlaveWithFTDITest 1

    on my host ubuntu pc . 

    1.I went to  ti/mmwave_sdk_03_03_00_03/packages/ti/drivers/spi/test/unix

    2. I followed READ me in above directory and installed D2XX driver the latest 1.4.8 version it is .gz file i can not exact it. so i downloaded 1.4.6 for x64 (64bit) then compile this spiTest sucessfully

    3. when I run it on my pc i need provide VID and PID . i am not sure which one to give so  i did lsusb first . it prints 

    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 0cf3:e301 Atheros Communications, Inc.
    Bus 001 Device 036: ID 0c45:7692 Microdia
    Bus 001 Device 035: ID 22d4:2100
    Bus 001 Device 034: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
    Bus 001 Device 054: ID 0451:bef3 Texas Instruments, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    so i run like this on pc sudo ./spitest 0x0451 0xb3f3  on pc side it prints err like 

    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485
    Error, couldn't send command to MSPEE
    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485
    Error, couldn't send command to MSPEE
    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485
    Error, couldn't send command to MSPEE
    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485
    Error, couldn't send command to MSPEE
    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485
    Error, couldn't send command to MSPEE
    Incorrect Message received from slave: magic =0x2946, dataLen=0, seqNo=9485

    then when I run ccs to run the xwr16xx it seems test is selftest and did not wati for host pc to send cmd

    [Cortex_R4_0] ******************************************
    Debug: MibSPI Driver Test Application Start
    ******************************************
    Feature: SPI_open API test (instance=0): Passed
    Debug: SPI Instance @0800fe6c has been opened successfully
    Debug: SPI Instance @0800fe6c has been closed successfully
    Debug: Passed DMA channel number check
    Feature: SPI_open API test - DMA channel validation (instance=0): Passed
    Feature: SPI_open API test - chip select validation (instance=0): Passed
    Feature: SPI_open API test - data size validation (instance=0): Passed
    Feature: SPI_open API test - bit rate validation (instance=0): Passed
    Debug: Open the SPI Instance for SPI transfer parameter check test
    Debug: SPI_transfer with data size = 1 failed with error=6.
    Feature: SPI_transfer API test - data size=1 validation (instance=0): Passed
    Debug: SPI_transfer with data size = 11 failed with error=6.
    Feature: SPI_transfer API test - data size=11 validation (instance=0): Passed
    Debug: SPI_transfer failed with NULL pointers for both TX and RX.
    Feature: SPI_transfer API test - buffer address validation (instance=0): Passed
    Debug: SPI Instance @0800fe6c has been closed successfully
    Debug: Finished API Test for SPIA!
    Feature: SPI_open API test (instance=1): Passed
    Debug: SPI Instance @0800fe78 has been opened successfully
    Debug: SPI Instance @0800fe78 has been closed successfully
    Debug: Passed DMA channel number check
    Feature: SPI_open API test - DMA channel validation (instance=1): Passed
    Feature: SPI_open API test - chip select validation (instance=1): Passed
    Feature: SPI_open API test - data size validation (instance=1): Passed
    Feature: SPI_open API test - bit rate validation (instance=1): Passed
    Debug: Open the SPI Instance for SPI transfer parameter check test
    Debug: SPI_transfer with data size = 1 failed with error=6.
    Feature: SPI_transfer API test - data size=1 validation (instance=1): Passed
    Debug: SPI_transfer with data size = 11 failed with error=6.
    Feature: SPI_transfer API test - data size=11 validation (instance=1): Passed
    Debug: SPI_transfer failed with NULL pointers for both TX and RX.
    Feature: SPI_transfer API test - buffer address validation (instance=1): Passed
    Debug: SPI Instance @0800fe78 has been closed successfully
    Debug: Finished API Test for SPIB!
    Debug: SPI Instance(0) @0800fe6c has been opened successfully
    Debug: SPI Instance(1) @0800fe78 has been opened successfully
    Feature: SPI_open API test for two instances: Passed
    Debug: SPI Instance(0) @0800fe6c has been closed successfully
    Debug: SPI Instance(1) @0800fe78 has been closed successfully
    Debug: SPI Instance(0) @0800fe6c has been opened successfully
    Debug: passed DMA channel number check for two SPI instances.
    Feature: SPI_open API test for two instances: DMA channel validation: Passed
    Debug: SPI Instance @0800fe6c has been closed successfully
    Debug: Finished API Test for SPIA + SPIB!
    Debug: SPI Instance @0800fe6c has been reopened in SLAVE mode successfully for 4pin FTDI testing

  • btw i only connect iwr1642boost board to pc via usb. there is no dev pack add-on board

  • it looks like in order to run ti/mmwave_sdk_03_03_00_03/packages/ti/drivers/spi/test/unix on host pc i need put on devpack board on top of iwr16xx. 

    then the test seems okay ? 

    sudo ./spiTest 0x0451 0xfd03
    [sudo] password for terry:
    SPI Test Program started.
    4 device(s) attached:
    Dev0: FT2WAAJQA - AR-DevPack-EVM-012 A
    Dev1: FT2WAAJQB - AR-DevPack-EVM-012 B
    Dev2: FT2WAAJQC - AR-DevPack-EVM-012 C
    Dev3: FT2WAAJQD - AR-DevPack-EVM-012 D
    SPI device(0) is opened, handle = 3abe7090
    Incorrect magic number ffff
    XWR1xxx board is ready for test.
    Echo test failed 0 out of 5000

  • Terry,

    Thanks for confirming. I will mark it as closed

    Yogesh