EmbDev.net

Forum: ARM programming with GCC/GNU tools incorrect code execution on LPC2138


Author: Slawek (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello All,

Following please find description of the irrational (at least for me)
problem with a project based on LPC2138:

The main problem is that code doesn't start correctly when project is
powered up. For debugging purposes I'm testing Atmel dataflash connected
via SPI0. Dataflash doesn't respond correctly. It appears that SSEL0
remains stil on the low level and doesn't return into 1. On the other
hand when exactly the same code is downloaded to the micro via Philips
LPC2000 then everything works ok! I've tries manual reset through
push-buttom, changed reset ic (DS1818-10), implemented watch-dog reset
(just one time reset. Once done, programm process further), additional
init sequences for SPI0 and dataflash  - nothing works. Testing RSIR,
S0SPSR and PCONP registers doesn't show anything unusuall.

Roughly the same piece of code works correct in few other applications,
so I don't think the problem is there. I'm using makefile, linker script
and start-up code from Martin's gamma example. IRQ stock size is 0x400.

Does anyone know a difference in reset from Philips flash utility and
another type of reset?
Any hints are welcome.

Slawek

Author: Mh Tay (lpc2103)
Posted on:

Rate this post
0 useful
not useful
Some bugs on LPC213x MAM. MAM must be configured immediately after reset
or else SRAM cannot be accessed properly. Check philips bug-list and
appnote.
=> Do not use same LPC2124 startup file for your LPC213x

Note that once chip get into Philips' ISP, there are initialisations
done by the philips' bootloader.

Cannot think of anything else as info is not enough. (i.e. did you
migrate from LPC2124, code working in which micro before ... and etc)

Author: Slawek (Guest)
Posted on:

Rate this post
0 useful
not useful
Slawek wrote:
> Hello All,
>
> Following please find description of the irrational (at least for me)
> problem with a project based on LPC2138:
>
> The main problem is that code doesn't start correctly when project is
> powered up. For debugging purposes I'm testing Atmel dataflash connected
> via SPI0. Dataflash doesn't respond correctly. It appears that SSEL0
> remains stil on the low level and doesn't return into 1. On the other
> hand when exactly the same code is downloaded to the micro via Philips
> LPC2000 then everything works ok! I've tries manual reset through
> push-buttom, changed reset ic (DS1818-10), implemented watch-dog reset
> (just one time reset. Once done, programm process further), additional
> init sequences for SPI0 and dataflash  - nothing works. Testing RSIR,
> S0SPSR and PCONP registers doesn't show anything unusuall.
>
> Roughly the same piece of code works correct in few other applications,
> so I don't think the problem is there. I'm using makefile, linker script
> and start-up code from Martin's gamma example. IRQ stock size is 0x400.
>
> Does anyone know a difference in reset from Philips flash utility and
> another type of reset?
> Any hints are welcome.
>



just a problem with reset :(
> Slawek

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.