Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - matterama

#1
ARM Cortex / FlashMagicCortex.Reset usage question
December 28, 2018, 10:23:31 AM
Hello,
We have been using the API successfully to program and verify a LPC1317 device.  We have been manually cycling power on it after programming to continue with our application code.  However, it seems like this command:  FlashMagicCortex.Reset should allow us to reset the chip.  We have tried:

FlashMagicCortex.Reset(ResetTypes.EXECUTE, 0, ResetOptions.THUMB, 500)

and

FlashMagicCortex.Reset(ResetTypes.RESET, 0, ResetOptions.THUMB, 500)

unsuccessfully.

Is this the correct API command to do what we are attempting?  If so, can you give more guidance on this function?

Thank you!
#2
We have the FlashMagic .Net libraries in our application, and incorporated it successfully on x86 machines.  Moving it to a 64 bit Win 7 machine however, results in this error (seen within Visual Studio):

'System.DllNotFoundException' occurred in FlashMagicARMCortexNET.dll

I saw in another thread that the .net assemblies are not supported on 64 bit platforms(?).  If that is the case, is this the expected error?  I have used FlashMagic (standard) successfully on the same machine...

Thanks!
#3

Hi all,

Just purchased the .NET production version, and ran into a problem trying to incorporate in a VB.net program.

UPDATE:  Have now run the stock C# example code included with the purchase and it gave me the same error.




Quick question (hopefully)...I have created a form with some of your basic calls in a VB.net application.  Everything seems very straightforward, I'm using your example as the basis. 

When I try the "connect" method however, I get this error:



"Device does not support operation.  Only COM connections supported.  (ERROR_UNSUPPORTED)"


A quick look on your forum showed Andy asking another person with a similar issue if the two .dll's were in the executable directory.  I've made sure that is the case (but this error is different from his in that it occurs under the debugger and under the executable).

The specific code that results in this error is:



Try
            Dim Options As FlashMagicARMCortexNET.COMOptions = New FlashMagicARMCortexNET.COMOptions
            Dim Baudrateconnected As Int32

            If (gComPort Is Nothing) Then
                MessageBox.Show("No comm port is open or defined.  Cannot proceed.")
                Return
            Else
                Options.port = gComPort
            End If
            Options.baudrate = 115200
            Options.halfduplex = 0
            Options.highspeed = 0
            Options.hwconfig = HardwareConfigurations.BOOTEXEC
            Options.interfacetype = Interfaces.NON
            Options.hwt1 = 240
            Options.hwt2 = 120
            Options.maxbaudrate = 115200
            Options.osc = 12.0

            Options.selecteddevice = Devices.LPC131301

            Options.usinginterface = 0
            Options.flashbank = 0
            Options.protocoloptions = ProtocolOptions.AUTOLF

            Try
                'Connect to it
                Baudrateconnected = FlashMagicCortex.Connect(Options)


            Catch ex As FMException
                MessageBox.Show(ex.ToString, Application.ProductName,MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        Catch ex As Exception

       End Try





Any ideas or help you could provide would be greatly appreciated...

Thanks
#4
ARM Cortex / LPC1313 Fail to Erase sector 0
November 27, 2011, 02:47:32 PM
Hello,
While trying to program an LPC1313 with a hex file, both Flash Magic and a separate open source utility failed to erase sector 0.  Using your terminal feature, I was able to do synchronize, unlock and prepare other sectors (like sector 1) and then erase them successfully.  I can also erase the whole chip and then write without erasing to program, though this deletes configuration data in the last sector that I want to maintain.

Using the terminal, I can prepare sector 0 ("P 0 0" returns a "0").  But when I try to erase ("E 0 0"), nothing comes back and power must be cycled to recover, which is what happens with Flash Magic GUI handling this feature also.  CRP is all disabled, etc.

the .FMD file is attached in case that helps.

Thanks for your help,
Mr. Yan