FM Production system + Visual Studio 2005

Started by xarion, April 06, 2010, 06:15:08 AM

Previous topic - Next topic

xarion

We bought the production system last week and are a bit dissapointed. There are no c# or vb wrappers or ocx's. You either have to use C++ or C++ not much of an option unless you want to code your own wrapper. Anyway I've gotten my head around the C++ dev IDE and seem to be having a problem with fm_connect. It seems many developers are in the same boat and have received very little support from the forums.
The issue is I am using a break detect to enter the LPC936 into ISP mode. Then I would imagine the app should send some U's to synch the baud rate with the micro. Now using the fm_connect function, I do not seen any data whatsoever being sent on the serial and therefore it doesn't connect. Am using VS2005 and the FMTest example provided.

Question 2: in order to use the fm_erase() does fm_connect need to return something valid or can you just call fm_erase if the micro is in ISP mode?

What am I missing?

Xarion

xarion

here are my options ....

  options.osc            = 6;
  options.port           = atoi(comport);
  options.baudrate       = atol(baudrate);
  options.selecteddevice = FM_89LPC936;
  options.highspeed      = 0;
  options.clocks         = 0;
  options.halfduplex     = 0;
  options.hwconfig       = FM_HWNONE;
  options.hwt1           = 200;
  options.hwt2           = 200;
  options.i2caddr        = 0;
  options.maxbaudrate    = 9600;
  options.interfacetype  = FM_INTERFACETYPE_NONE;
  options.usingicp       = 0;

  presults = fm_connect(&options, sizeof(options));

Andy Ayre

If you see a case where a person has posted a question on the forum and they don't get resolution it is usually for one of several reasons:

1. We ask them for additional information and they don't get back to us. This is by far the most common - happens in 90% of cases.

2. We take the discussion off the forum to email because it gets in-depth or complex.

We work hard to try and resolve all issues, but as always, they require detailed problem descriptions and users wishing to help us. Diagnosing problems remotely with an application that is as complex as Flash Magic can be challenging.

We are planning .NET wrappers for Flash Magic, hopefully later this year.

To send a break condition you need to call fm_start_bootloader. Functions that send ISP commands can only be sent if fm_connect was successful. So the order of function calls is:

fm_start_bootloader
fm_connect
fm_erase
fm_disconnect

Also make sure you can connect to your device using the GUI version of Flash Magic first before trying any of this. That will test your PC's hardware, cable, development board and microcontroller, leaving the only untested part your use of the DLL, making it much easier to solve any problems you might have.

If the above does not help, please send your modified FMTest application to support at esacademy dot com referencing this topic.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

xarion

#3
Hey Andy, sorry for my hasty remarks - I was a little frustrated :)
thanks for the info I'll zip up the FMtest and send it off to you. The starting of the bootloader using the break condition does work just the having issues with the fm_connect.

Great news on the .NET wrapper :)

Xarion

Andy Ayre

This was caused by a mismatch between the example application and the DLL. The current version - 5.62r2 has this fixed.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com