I've made the title somewhat generic so that others might use the thread in case my question gets lost in the noise or too detailed for anyone to care. In my specific case I'm using
- at90usb1286 running at 16MHz (ext clock)
- u-SD card (SDHC 8GB) connected trough SPI.
- Windows 10
- JTAG programmer
- LUFA 151115
- Chan's fatfs r0.12b (http://elm-chan.org/fsw/ff/00ind...)
I downloaded a LUFA demo project for dataflash from within AS7, using Tools->Extensions and updates, then download LUFA. After that I did File->New->Example project. Selected FourWalledCubicle, Mass storage Host Demo (Class driver APIs) AVR8 architecture.
My real project is in another AS7 setup, so I then simply copied the files to my project together with the defined gcc symbols (Project-properties-Toolchain-AVR Gnu C compiler-Symbols).
After some initial gotcha's (disable all LED driving is a good thing if your platform is already connected to those io:s) I get happy Windows sound when I connect but, at best, an empty drive (0 byte sized).
I can see that Windows requests (and gets) the size. But it looks like it stalls after reading 1 block at sector 0 (1 block is 16 bytes here if I understood sdcardmanager right). Not that the SDcardmanager locks up or anything, the read function exits ok and I see the sector information in the buffers. But Windows is not happy. It looks like nothing happens for a while, then it resets the connection.
Anybody else seen this?