{"action":"created","issue":{"url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/112","labels_url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/112/comments","events_url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/112/events","html_url":"https://github.com/libopencm3/libopencm3-examples/issues/112","id":123526370,"number":112,"title":"stm32f429i-discovery/sdram not working","user":{"login":"J-Dunn","id":9969512,"avatar_url":"https://avatars.githubusercontent.com/u/9969512?v=3","gravatar_id":"","url":"https://api.github.com/users/J-Dunn","html_url":"https://github.com/J-Dunn","followers_url":"https://api.github.com/users/J-Dunn/followers","following_url":"https://api.github.com/users/J-Dunn/following{/other_user}","gists_url":"https://api.github.com/users/J-Dunn/gists{/gist_id}","starred_url":"https://api.github.com/users/J-Dunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/J-Dunn/subscriptions","organizations_url":"https://api.github.com/users/J-Dunn/orgs","repos_url":"https://api.github.com/users/J-Dunn/repos","events_url":"https://api.github.com/users/J-Dunn/events{/privacy}","received_events_url":"https://api.github.com/users/J-Dunn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-22T17:45:35Z","updated_at":"2015-12-23T07:08:28Z","closed_at":null,"body":"I built and flashed the stm32f429i-discovery/sdram demo. \r\n\r\nI get a mass storage device showing up and it auto-mounts as vfat on Fedora 23.  But if I try to do anything like cat or head on the datafile the I see on the drive I get an IO error.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/comments/166817957","html_url":"https://github.com/libopencm3/libopencm3-examples/issues/112#issuecomment-166817957","issue_url":"https://api.github.com/repos/libopencm3/libopencm3-examples/issues/112","id":166817957,"user":{"login":"J-Dunn","id":9969512,"avatar_url":"https://avatars.githubusercontent.com/u/9969512?v=3","gravatar_id":"","url":"https://api.github.com/users/J-Dunn","html_url":"https://github.com/J-Dunn","followers_url":"https://api.github.com/users/J-Dunn/followers","following_url":"https://api.github.com/users/J-Dunn/following{/other_user}","gists_url":"https://api.github.com/users/J-Dunn/gists{/gist_id}","starred_url":"https://api.github.com/users/J-Dunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/J-Dunn/subscriptions","organizations_url":"https://api.github.com/users/J-Dunn/orgs","repos_url":"https://api.github.com/users/J-Dunn/repos","events_url":"https://api.github.com/users/J-Dunn/events{/privacy}","received_events_url":"https://api.github.com/users/J-Dunn/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T07:08:28Z","updated_at":"2015-12-23T07:08:28Z","body":"Thanks. I'm working on Linux too using openOCD and gdb. We are on the same page with that. \r\n\r\nI have flashed several of the examples from this project , so the default software devices are not relevant beyond what is provided by the STLINK chip.\r\n\r\nI currently have the ramdisk demo on the board.  If I plug in just the STLINK, I get one device. It's a V2  but I don't know a means of getting the minor version numbers.\r\n\r\n```\r\n[168005.809035] usb 2-6: new full-speed USB device number 113 using ohci-pci\r\n[168006.012061] usb 2-6: New USB device found, idVendor=0483, idProduct=3748\r\n[168006.012073] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3\r\n[168006.012079] usb 2-6: Product: STM32 STLink\r\n[168006.012085] usb 2-6: Manufacturer: STMicroelectronics\r\n[168006.012090] usb 2-6: SerialNumber: xxxxxxxxxxxxxx\r\nbash-4.3#lsusb\r\nBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\r\nBus 002 Device 113: ID 0483:3748 STMicroelectronics ST-LINK/V2\r\nBus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub\r\n```\r\nNow , if I plug in the OTG: (note the for clarity I'm using a different USB port ). It is correctly detected as mass storage, no cache device. Then it starts to go wroing:\r\n```\r\n[168326.393034] usb 2-4: new full-speed USB device number 114 using ohci-pci\r\n[168326.585889] usb 2-4: New USB device found, idVendor=0483, idProduct=5741\r\n[168326.585903] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3\r\n[168326.585910] usb 2-4: Product: MSC Demo\r\n[168326.585915] usb 2-4: Manufacturer: Black Sphere Technologies\r\n[168326.585920] usb 2-4: SerialNumber: DEMO\r\n[168326.591083] usb-storage 2-4:1.0: USB Mass Storage device detected\r\n[168326.597329] scsi host23: usb-storage 2-4:1.0\r\n[168327.605922] scsi 23:0:0:0: Direct-Access     VendorID ProductID        0.00 PQ: 0 ANSI: 4\r\n[168327.609657] sd 23:0:0:0: Attached scsi generic sg3 type 0\r\n[168327.619940] sd 23:0:0:0: [sdc] 1024 512-byte logical blocks: (524 kB/512 KiB)\r\n[168327.626930] sd 23:0:0:0: [sdc] Write Protect is off\r\n[168327.626946] sd 23:0:0:0: [sdc] Mode Sense: 03 00 00 ff\r\n[168327.633926] sd 23:0:0:0: [sdc] No Caching mode page found\r\n[168327.633942] sd 23:0:0:0: [sdc] Assuming drive cache: write through\r\n[168327.684895]  sdc:\r\n[168327.721871] sd 23:0:0:0: [sdc] Attached SCSI removable disk\r\n[168358.919219] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168389.886044] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168400.227040] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168416.575052] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168416.917053] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168427.257046] usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n[168427.440297] sd 23:0:0:0: Device offlined - not ready after error recovery\r\n[168427.440331] sd 23:0:0:0: [sdc] FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK\r\n[168427.440341] sd 23:0:0:0: [sdc] CDB: Write(10) 2a 00 00 00 00 00 00 00 01 00\r\n[168427.440348] blk_update_request: I/O error, dev sdc, sector 0\r\n[168427.440355] Buffer I/O error on dev sdc, logical block 0, lost sync page write\r\n[168427.440394] sd 23:0:0:0: rejecting I/O to offline device\r\n[168427.440403] sd 23:0:0:0: killing request\r\n[168427.567226] sd 23:0:0:0: rejecting I/O to offline device\r\n[168427.567307] sd 23:0:0:0: rejecting I/O to offline device\r\n[168427.567319] FAT-fs (sdc): FAT read failed (blocknr 1)\r\n```\r\n/var/log/messages contains some more information:\r\n```\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: Attached scsi generic sg3 type 0\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: [sdc] 1024 512-byte logical blocks: (524 kB/512 KiB)\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: [sdc] Write Protect is off\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: [sdc] No Caching mode page found\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: [sdc] Assuming drive cache: write through\r\nDec 23 06:57:09 localhost kernel: sdc:\r\nDec 23 06:57:09 localhost kernel: sd 23:0:0:0: [sdc] Attached SCSI removable disk\r\nDec 23 06:57:40 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\n^[[A\r\nDec 23 06:58:11 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\nDec 23 06:58:22 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\nDec 23 06:58:38 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\nDec 23 06:58:38 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\nDec 23 06:58:49 localhost kernel: usb 2-4: reset full-speed USB device number 114 using ohci-pci\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: Device offlined - not ready after error recovery\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: [sdc] FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: [sdc] CDB: Write(10) 2a 00 00 00 00 00 00 00 01 00\r\nDec 23 06:58:49 localhost kernel: blk_update_request: I/O error, dev sdc, sector 0\r\nDec 23 06:58:49 localhost kernel: Buffer I/O error on dev sdc, logical block 0, lost sync page write\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: rejecting I/O to offline device\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: killing request\r\nDec 23 06:58:49 localhost udisksd[1630]: Mounted /dev/sdc at /run/media/user/RAMDISK on behalf of uid 1000\r\nDec 23 06:58:49 localhost org.gtk.vfs.UDisks2VolumeMonitor: disc.c:350: error opening file BDMV/index.bdmv\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: rejecting I/O to offline device\r\nDec 23 06:58:49 localhost kernel: sd 23:0:0:0: rejecting I/O to offline device\r\nDec 23 06:58:49 localhost kernel: FAT-fs (sdc): FAT read failed (blocknr 1)\r\nDec 23 06:58:49 localhost org.gtk.vfs.UDisks2VolumeMonitor: disc.c:350: error opening file BDMV/BACKUP/index.bdmv\r\n```\r\n\r\nIt looks like some kind of udisk daemon is screwing things up while auto-mounting the device or that the device is not responding correctly.\r\n"}}