Author Topic: Reset device using the flash magic dll  (Read 5186 times)

Daniel.L

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Reset device using the flash magic dll
« on: August 23, 2012, 02:35:53 am »
Hi,

I'm using the flash magic dll functions, LPC925 device, and need to reset the device after programming.

Can anyone help me with the fm_reset function arguments? (didn't find any documetation..)

Thanks in advance,
Daniel

Daniel.L

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Reset device using the flash magic dll
« Reply #1 on: August 23, 2012, 05:04:52 am »
i tried the following line code:
presults = fm_reset(FM_RESET,0x00000000,0);

and i keep getting "Device does not support operation. (reset)"

Thanks,
Daniel

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2114
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Reset device using the flash magic dll
« Reply #2 on: August 24, 2012, 01:25:47 am »
It's not supported because the bootloader in the device does not have a command to reset the device. Please see the user manual from NXP for the LPC900 family.

The only way to reset it is to use DTR and RTS to control VDD and RST by adding supporting hardware such as can be found on the Keil MCB900 board. Flash Magic will then automatically reset the device just before closing the COM port.

fm_reset is fully documented in FMPSCManual.pdf, section 4.18.

Andy
« Last Edit: August 24, 2012, 01:28:10 am by Andy Ayre »
Embedded Systems Academy, Inc.
support at esacademy dot com

Daniel.L

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Reset device using the flash magic dll
« Reply #3 on: August 25, 2012, 12:50:05 am »
Hi Andy,

Thank you for your reply.

Just to be sure, If i don't have the supporting hardware on the board (Its a medical device so its forbidden), i can't reset the device using sofware?

Is there any way to change the bootloader to reset the device?

Thanks in advance,
Daniel

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2114
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Reset device using the flash magic dll
« Reply #4 on: August 28, 2012, 12:57:12 am »
You could write your own bootloader cloned from NXP's that resets the device when Flash Magic finishes verifying, for example.

Other than that, no, I don't know of a way.

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

Daniel.L

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Reset device using the flash magic dll
« Reply #5 on: September 02, 2012, 07:18:19 am »
ok, i will implement the reset by hardware.

Thank you Andy for your help!