You are here

SPI Master Interface

Most of the DLN adapters support the SPI master interface. Some of them have several independent SPI master ports.

Before transmitting data, you need to configure the SPI master ports according to the slave requirements and enable it (See Configuring the SPI Master Interface).

You can either transmit data in full-duplex or in half-duplex mode (See SPI Data Transmission).

If you need to work with multi slave devices, you can interconnect them following the instructions in Connecting Multiple Slave Devices.

Rating: 
Average: 1 (1 vote)
Daniel Hurta
Daniel Hurta's picture
Offline
Last seen: 4 years 2 months ago
Joined: 06/24/2014 - 14:13
Event-driven-Asynchronus-SPI-Master-Read(#of bytes)

You describe the difference between Synchronous and Asynchronous interfaces. How can I select these features? How can I overcome the 256 byte buffer limit? I need 432 Bytes to be read each event, every 200nS

Maxim
Maxim's picture
Offline
Last seen: 1 year 11 months ago
Joined: 07/14/2013 - 09:10
Event-driven-Asynchronus-SPI-Master-Read(#of bytes)

Hello Daniel,

Synchronous interface is used by default. If you want to use asynchronous interface, please review applications at C:\Program Files\Diolan\DLN\demo\c++.console folder. You need to create commands with commands IDs, command data and send them with DlnSendMessage() API function.

Also you can not overcome the 256 bytes buffer limit by calling DlnSpiMasterRead() once. Because buffer size is limited to 256 bytes. You can only call spi master read command or function for few times to read the full message.

If you have low speed for your application, we already have dln library which operates without DlnServer and it can also greatly increase transaction speed. 

User login