incorrect code execution on LPC2138

Guest #1172035
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
#1172036
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)
Guest #1172037
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

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.