Bugfix: Gr??erer Puffer f?r CoE-Daten beim SDO upload.
--- a/master/canopen.c Mon Mar 27 15:52:08 2006 +0000
+++ b/master/canopen.c Tue Mar 28 12:38:05 2006 +0000
@@ -103,21 +103,21 @@
uint32_t *value /**< Speicher für gel. Wert */
)
{
- uint8_t data[0x0A];
+ uint8_t data[0x20];
size_t rec_size;
- EC_WRITE_U16(data, 0x2000); // Number (0), Service (SDO request)
- EC_WRITE_U8 (data + 2, 0x1 << 1 | 0x2 << 5); // Exp., Upload request
+ EC_WRITE_U16(data, 0x2000); // Number (0), Service = SDO request
+ EC_WRITE_U8 (data + 2, 0x1 << 1 | 0x2 << 5); // Expedited upload request
EC_WRITE_U16(data + 3, sdo_index);
EC_WRITE_U8 (data + 5, sdo_subindex);
if (ec_slave_mailbox_send(slave, 0x03, data, 6)) return -1;
- rec_size = 6;
+ rec_size = 0x20;
if (ec_slave_mailbox_receive(slave, 0x03, data, &rec_size)) return -1;
- if (EC_READ_U16(data ) >> 12 == 0x02 && // SDO request
- EC_READ_U8 (data + 2) >> 5 == 0x04) { // Abort SDO transf. req.
+ if (EC_READ_U16(data) >> 12 == 0x02 && // SDO request
+ EC_READ_U8 (data + 2) >> 5 == 0x04) { // Abort SDO transfer request
EC_ERR("SDO upload of 0x%04X:%X aborted on slave %i.\n",
sdo_index, sdo_subindex, slave->ring_position);
ec_canopen_abort_msg(EC_READ_U32(data + 6));
--- a/rt/msr_module.c Mon Mar 27 15:52:08 2006 +0000
+++ b/rt/msr_module.c Tue Mar 28 12:38:05 2006 +0000
@@ -225,7 +225,7 @@
//ecrt_master_debug(master, 0);
-#if 0
+#if 1
if (ecrt_master_sdo_read(master, "1", 0x100A, 1, &version)) {
printk(KERN_ERR "Could not read SSI version!\n");
goto out_deactivate;
@@ -233,7 +233,7 @@
printk(KERN_INFO "Software-version: %u\n", version);
#endif
-#if 0
+#if 1
if (ecrt_master_sdo_write(master, "1", 0x4061, 1, 0, 1) ||
ecrt_master_sdo_write(master, "1", 0x4061, 2, 1, 1) ||
ecrt_master_sdo_write(master, "1", 0x4061, 3, 1, 1) ||