FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Getting Null values while using Sample program.  (Read 43788 times)

Reepak

  • Newbie
  • *
  • Posts: 1
    • View Profile
Getting Null values while using Sample program.
« on: July 19, 2019, 04:19:01 AM »

Hi All,
we are getting null values(tmpBuf) but ft4222_status is FT4222_OK while using a sample program as spi_slave_test_slave_side. That program we have got from below link(windows).
https://www.ftdichip.com/Products/ICs/FT4222H.html.
connection is among device like PC-->USB-Spi adapter-->Traveo2 board(microcontroller)

ft4222_status = FT4222_SPISlave_Read(ftHandle, &tmpBuf[0], rxSize, &sizeTransferred);
                if((ft4222_status == FT4222_OK) && (rxSize == sizeTransferred))
               

MOSI-->MOSI
MISO-->MISO
SS-->SS

but when are using loopback(Adapter only) with readwrite method that is working fine.

Could you please let me know where are we going wrong??
 Thanks at advance



Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: Getting Null values while using Sample program.
« Reply #1 on: July 19, 2019, 04:36:39 PM »

Hello,

spi_slave_test_slave_side should be used with spi_slave_test_master_side.

Run spi_slave_test_slave_side.exe on the slave and it waits for the master. I selected Dev 0 since this is my slave (loc ID 114):



Then run spi_slave_test_master_side.exe. I selected Dev 1 (loc ID 113):



You can see from the screenshots that the data is received.

These are only examples to demonstrate how to use the libraries.

The code should be changed to work with your MCU.

Best Regards,
FTDI Community
Logged

danjames

  • Newbie
  • *
  • Posts: 2
  • yo
    • View Profile
    • Baclinc
Re: Getting Null values while using Sample program.
« Reply #2 on: August 25, 2020, 01:07:11 PM »

Thankyou!!

anoopkyadav

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Getting Null values while using Sample program.
« Reply #3 on: March 02, 2022, 02:55:50 PM »

I am also getting Zero Values at read buffer USING UMFT221X Device as SPI Slave
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: Getting Null values while using Sample program.
« Reply #4 on: March 02, 2022, 04:59:27 PM »

Can you provide more detail please?
You are using UMFT221X.  What code etc, etc ......

Regards
FTDI Community
Logged