I’am using two Stellaris Cortex M3 chips to transfer data. These are configured for CAN transfers and have a input buffer of 16 CAN Messages.
PDO’s and standard SDO transfer work very well. But now I want to use the SDO block transfer to transfer a datablock of size 512 bytes from a flash page read of another device.
I created a user type „octet_string512“ and made an entry in the object dictionary. The SDO client initiates a block upload from the Server, but transfers just 1 Byte, the first one in the datablock. Then sends block upload end message.
Are there any hints or how has this to be done? What’s with the combination of „readNetworkDict“ and „getReadResultNetworkDict“ how to use them in Block mode?
Does SDO_BLOCK_SIZE define the absolute maximum size of the block or just a segment of the block?
I would be thankful for any advice!
> I created a user type "octet_string512" and made an entry in the
> object dictionary. The SDO client initiates a block upload from the
> Server, but transfers just 1 Byte, the first one in the datablock.
> Then sends block upload end message.
Could you check the server's response to the client upload initiate ?
Last 4 bytes of data are the size, is it 512 like expected ?
A copy of all the can traffic would help.
Also check in the c source of the dictionary that the size field is good.
> Are there any hints or how has this to be done? What's with the
> combination of "readNetworkDict" and "getReadResultNetworkDict" how to
> use them in Block mode?
> Does SDO_BLOCK_SIZE define the absolute maximum size of the block or
> just a segment of the block?
readNetworkDict and getReadResultNetworkDict are to be used exactly the
same way for block or segmented transfer.
You just put the last argument to 1 in readNetworkDict when you want to
use block mode.
SDO_BLOCK_SIZE is the number of segment per block. The value must be
between 1 and 127.
This has nothing to do with the total data size, it defines that the
data will be split into blocks of 7*SDO_BLOCK_SIZE bytes.
If the transfer works in standard segmented mode, it should work for any
value of SDO_BLOCK_SIZE.
Have you put SDO_MAX_LENGTH_TRANSFER to a value >= 512 ?
Mongo / fbeaulier