From: Govind V. <gov...@gm...> - 2007-07-31 08:35:01
|
Hi, I am trying to get i2c-io to work between gumstix and robostix. I am sure this has been done before, but I seem to be stuck and couldn't find an answer in the mail archives- could someone please help me with this: I have successfully configured the gumstix for i2c and uploaded i2c-load, i2c-io and uisp into it. I have also modified /etc/modules to load the required modules for i2c. I then used the gumstix-robostix ISP to load the bootloader onto the robostix using uisp. After removing the serial connection between the two, I inserted the robostix_drv.ko module so that the robostix entry shows up in /dev/. Then when I run the command: --------------------------------------------------------------------------- i2c-load --reset 0x0b Info --------------------------------------------------------------------------- it gives the expected result. I then used i2c-load to copy i2c-io.hex into the robostix: --------------------------------------------------------------------------- # i2c-load 0x0b Write /mnt/mmc/dwnlds/i2c-io.hex Detected ATMega128 Write: ## Verify: ## Verify sucessful Write sucessful, rebooting... --------------------------------------------------------------------------- My problem is that whenever I try the following command (I tried both 'info' as well as 'Info' in the command below), I only get one of the two error messages given below: --------------------------------------------------------------------------- # i2c-io 0x0b info --------------------------------------------------------------------------- ERROR: I2cTransfer: CRC failed: Rcvd: 0x00, expecting: 0xce ERROR: I2cReadBlock failed ERROR: Unable to retrieve information from i2c address 0x0b --------------------------------------------------------------------------- or --------------------------------------------------------------------------- ERROR: I2cTransfer: ioctl failed: Remote I/O error (121) ERROR: I2cReadBlock failed ERROR: Unable to retrieve information from i2c address 0x0b --------------------------------------------------------------------------- I observed that the red LED on the robostix was flashing approx: 2 times/sec. So i thought that the bootloader is running and I need to get the i2c-io.hex to run. So I entered this command: --------------------------------------------------------------------------- # i2c-load 0x0b Run Detected ATMega128 --------------------------------------------------------------------------- Now the red LED started flashing much faster. I had read in the wiki that it flashes 5 times/sec when its booting so I waited, but it jsut keeps on flashing at the same frequency(Also this flashing was not regular like the bootloader's - the flashing speed changes now and then but the pattern I think is repeated every few seconds). When I run the i2c-io info command, I still get the same error message If i just use the i2c-load reset command, the LED goes back to flashing the regular bootloader sequence. The most interesting thing is if I turn of the gumstix using the 'poweroff' command, then the red LED starts flashing twice quickly and then a pause when it stays lit - just as it is supposed to when i2c-io is running on it. Please advice on how to get i2c-io running properly. Thanks and Regards, Govind |