|
From: Sergei K. <so...@ya...> - 2012-09-06 08:47:47
|
Hi guys! I’m trying work with an usb_dfu example for lisa-m-1 on my Lisa M 2 board with STM32F105 on board together with stm32_mem.py on Linux Virtual Machine under Windows XP. And it doesn’t work properly. First I shold say, that stm32_mem works fine with the STM onboard sys boot dfu bootloader. But with this example upload starts, but on the 4th page (0x08004000) occurs an broken pipe usb error. If I set the stm32_mem.py only to erase pages there no broken pipe error occurs, but also no erase as well. I’ve looked on the code and found, that in the usbdfu_getstatus_complete fun “case CMD_ERASE:” is never called, and the erase wants “case 0x08:” in the “switch (prog.buf[0])”. But there is also a problem – it erases only one page with address 0x08001000 and nothing else, however stm32_mem wants to erase from 0x08002000 first. Seems to be a problem with the address receive Also as I said, by the erasing and programming the broken pipe error comes on the 4th page, however, when I set in the usb_device_descriptor variable the value bMaxPacketSize0 = 32 the broken pipe error comes on 8th page first… That is really curious. Also I have tested the same Virtual Machine under Windows 7 and there was no broken pipe error. You guys have more experience with the usb stuff, could you say if there is a problem in USB setup or in the DFU protocol itself. Thanks, Sergey |