AnsweredAssumed Answered

DFU Upload only working when MAX_BLOCK_SIZE is not a multiple of CONTROL_MAX_PACKET_SIZE

Question asked by Gabriel Harrison on Aug 3, 2015
Latest reply on Oct 5, 2015 by Gabriel Harrison

Hi,

 

We are using the DFU class in USB 4.1.1 library successfully to update our device but have had to create a work-around for this issue.

 

The device is a MK60F15. We have used the bare-metal example code to initialize the USB-FS module.

 

I have found that if the DFU packet size (MAX_BLOCK_SIZE in usb_descriptor.h) is a multiple of USB packet size the upload hangs at the end of the first block. I've created a temporary work-around by setting MAX_BLOCK_SIZE to 499 but this then causes a bit of a headache within the code that burns each block to flash.

 

I think the issue is probably that a Zero Length Packet is not sent at the end of the final block but haven't managed to find the relevant bit of code in the stack. I'm also not entirely sure if the issue is at the Windows App end of the Kinetis MCU end.

 

Any help would be much appreciated,

 

Gabriel

 

Message was edited by: Gabriel Harrison

Outcomes