I am using STM32F103ZEH6 ARM.
I am running PC side application that is written in C#. The application is able to upgrade the firmware of the STM32 by using the DFU mode for this process.
Sometimes error is occurred while calling the STDFUPRT_CreateMappingFromDevice method (from STDFUPRT.DLL)
Here is the C# code of importing STDFUPRT.dll
public static extern Int32 STDFUPRT_CreateMappingFromDevice
The parameters that I am passing to CreateMappingFromDevice are:
- Device link array in ASCIIEncoding representation – holds the device path
- pMapping – pointer to a mapping structure
- numberOfAlternates - The number of memory units that are exposed for DFU operations
In "no error"case after calling this function I receive the “pMapping” and “numberOfAlternates” that are initialized and filled with the values from device.
Sometimes error is occurred the error number is - 0x12340006 or 305397766 - "Error Descriptor Building".
Is there any document that describes the STDFUPRT.dll functionality especially the STDFUPRT_CreateMappingFromDevice method with description of all Error cases?
What causes the error? In which cases it may happen?