incorrect code execution on LPC2138

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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

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.