This is the mail archive of the
mailing list for the eCos project.
Re: Support for LPC2XXX IAP interface
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Sergei Gavrikov <sg at belvok dot com>
- Cc: eCos patches list <ecos-patches at ecos dot sourceware dot org>
- Date: Thu, 27 Nov 2008 17:14:15 +0000
- Subject: Re: Support for LPC2XXX IAP interface
- Openpgp: id=A5FB74E6
- References: <20081127125253.GA20616@sg-ubuntu.local>
Sergei Gavrikov wrote:
> I saw no such a support in other HALs. And I decided to put it under the
> lpc2xxx/var tree.
> RFC: Is it a good place for the interface in lpc2xxx/var?
> +#include <cyg/infra/cyg_type.h>
> +#include <cyg/infra/testcase.h>
> +#include <cyg/hal/lpc2xxx_iap.h>
> +extern int diag_printf (char *, ...);
> +externC void
> +#ifdef CYGPKG_KERNEL
> +cyg_user_start (void)
> +cyg_start (void)
Why ifdef kernel?
> +lpc_iap_call (cyg_uint32 cmd, cyg_uint32 par0, cyg_uint32 par1,
> + cyg_uint32 par2, cyg_uint32 par3, cyg_uint32 *ret);
This would be better named something like hal_lpc2xxx_iap_call.
> +// 1) WARNING: lpc on-chip flash memory is not accessible during erase and
> +// write operations. When the user application code starts executing the
> +// interrupt vectors from the user flash area are active. The user should
> +// either disable interrupts, or ensure that user interrupt vectors are active
> +// in RAM and that the interrupt handlers reside in RAM, before making a flash
> +// erase/write IAP call. The IAP code does not use or disable interrupts.
You say the user, but below, you do disable interrupts.
It sounds like this could be a CDL option, which defaults to what you do
i.e. disabling interrupts (for safety). After all, the flash programming
would severely hamper real-time operation so many people would want to
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine