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

Messages - 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
Thank you Andy, the installer missed that one.  That fixed it.
#3
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!
#4
Andy has pointed out that Windows sometimes finds old versions of the .dll's.  Find and remove them first...
Thanks Andy!
#5

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
#6
ARM Cortex / Re: LPC1313 Fail to Erase sector 0
November 30, 2011, 10:46:57 AM
Unfortunately, I tested 3 different units.  And I'd guess that static damage would result in code not running correctly, but once programmed, these parts all do what they are supposed to...
#7
ARM Cortex / Re: LPC1313 Fail to Erase sector 0
November 29, 2011, 08:26:19 AM
Hi Andy,

I know it sounds like that, but it isn't.  I have read the CRP memory location (both with SWD and directly using the ISP read memory command) and while it isn't 0, it isn't any of the CRP codes.  Flash Magic also confirms no CRP is enabled.  On top of all that I can still debug via SWD (CRP 1 kills that).

All that aside though, if I erase all sectors of the chip using (P 0 7) and then (E 0 7), I get a success and the chip is erased successfully (verified that all locations have a 0x5F written).  However, if I now erase just sector 0, it still fails to do this.  So the chip is totally blank, but it still fails with a (P 0 0) and (E 0 0) command.

I can erase sections like 0 to 1 or 0 to 5 or 0 to 7, just not 0 to 0.

It might be something with this part, as it has a sister variant that does USB on board and looks like a flash drive when blank.  Anyway, I've submitted a request to NXP, we'll see what they have to say about it...

Thanks Andy...
Mr. Yan
 
#8
ARM Cortex / Re: LPC1313 Fail to Erase sector 0
November 28, 2011, 10:01:59 PM
Hi Andy,

Although I have checked the CRP and it says it is disabled, I can program the whole chip if I choose "erase all + code protect" option instead of the "erase ll used by hex". 

However, even if I blank the chip in this manner and then try to erase sector 0, I get the same failure, so I do not believe it is a CRP issue.  But can you tell me what the difference is in the actual ISP commands between these two options?

Thanks,
Mr. Yan
#9
ARM Cortex / Re: LPC1313 Fail to Erase sector 0
November 28, 2011, 08:54:51 AM
Thanks Andy, at least I'm not crazy.  Do you have a recommended contact at NXP that I can relay this to, or should I just send it up the generic issue chain?
Thanks again...
#10
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