SPI Transfer | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 4 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
SPI Transfer
March 27, 2017
11:23 am
Avatar
undermeadow
New Member
Forum Posts: 1
Member Since:
March 24, 2017
sp_UserOfflineSmall Offline

Am I doing something wrong or is the SPI function poorly implemented? Even if I set the Transfer Mode to Continue there is still huge 5ms delay between transferred bytes. How can I get rid of it?
And what about Data Command? How can I set whenever the transferred data are data or command. I can see that everything is sent as Command automatically.
SPI-issue-01.PNGImage Enlarger

Attachments
April 3, 2017
1:46 pm
Avatar
ddowning1327
Member
Forum Posts: 7
Member Since:
August 1, 2016
sp_UserOfflineSmall Offline

Are you watching the output with an oscilloscope?  Could you attach a screenshot? Which arduino are you using?  I used a Due and i only had 1us between bytes.

April 3, 2017
2:28 pm
Avatar
Steffan
Admin
Forum Posts: 304
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

undermeadow said
Am I doing something wrong or is the SPI function poorly implemented? Even if I set the Transfer Mode to Continue there is still huge 5ms delay between transferred bytes. How can I get rid of it?
And what about Data Command? How can I set whenever the transferred data are data or command. I can see that everything is sent as Command automatically.

Yes, unfortunately for AVR boards (non Due), there is an intentional delay added between CS low and start of transfer.  This is because the AVR boards to not handle CS in hardware and it has to be handled in software using a GPIO output.  There has to be some delay between CS low and transfer for slave devices.  If you use a Due, the CS is handled by the SPI peripheral so that delay should be smaller.  To control that delay on AVR boards, you could wrap a custom library to achieve what you want.

Forum Timezone: UTC 0

Most Users Ever Online: 33

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

John: 18

RTSLVU: 15

Dan6077: 11

Member Stats:

Guest Posters: 0

Members: 80

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 2

Topics: 58

Posts: 289

Newest Members: Geraldkix, ThomasSoogs, Angelvor, AngelaMuh, Nsneilohone

Administrators: geadmin: 5, filipealtoe: 35, Steffan: 89