EmbDev.net

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


von Slawek (Guest)


Rate this post
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

von Mh T. (lpc2103)


Rate this post
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)

von Slawek (Guest)


Rate this post
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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.