Home arrow Support arrow Forums

Luminary Micro Forums

<< Start < Prev 1 2 3 4 5 Next > End >>

ckuecker

Expert Boarder
Click here to see the profile of this user

2008/06/26 15:00

Re:LM3S6965 crashes in hibernate

I think I've found something. In the ARM v7m reference manual, I see this description:

A6.7.42 LDR (immediate)
Load Register (immediate) calculates an address from a base register value and an immediate offset, loads
a word from memory, and writes it to a register. It can use offset, post-indexed, or pre-indexed addressing.
See Memory accesses on page A6-15 for information about memory accesses.
The register loaded can be the PC. If it is, the word loaded for the PC is treated as an address or exception
return value and a branch occurs. Bit<0> complies with the ARM architecture interworking rules for
branches to Thumb state execution and must be 1. If bit<0> is 0, a UsageFault exception occurs.


The disassembler shows this:

Code:

  HibernateClockSelect:   00000178  4904      LDR          R1, [PC#0x10]   0000017A  2304      MOVS         R3#0x4   0000017C  E000      B            ?Subroutine0   0000017E  0000      MOVS         R0R0 ?Subroutine0:   00000180  680A      LDR          R2, [R1] <<<<<   00000182  439A      BICS         R2R2R3   00000184  4302      ORRS         R2R2R0   00000186  600A      STR          R2, [R1]



LDR R2, [R1] compiles as 0x680A, where Bit<0> == 0, and the book says this causes a UsageFault, which escalates to a HardFault - ehich is where the code ends up.

Have I found something unique, or is there a mundane explanation for this?

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/06/26 15:04

Re:LM3S6965 crashes in hibernate

Did you try my suggestion 2 posts down???

login or register to reply

ckuecker

Expert Boarder
Click here to see the profile of this user

2008/06/26 15:42

Re:LM3S6965 crashes in hibernate

Looks like I was composing the last reply while you were writing yours. Crossed in space.

I put the lines you suggested into the code along
with a 1-second delay - and now I get past the fault interrupt, at least for the HibernateClockSelect()
call. Blinky is running again!

Next, I will try to bring up the hibernate module completely.

I've got a suggestion for the Luminary data sheet.
The need to set the SysCtl bit to enable the
hibernate module is not mentioned in the description
of the module, unless I missed it. Microchip has a
nice feature in their PIC data sheets - every
register that has any impact on the operation of a peripheral is listed, with the pertenent bits highlighted. That has saved me a bunch of trouble
when working with their parts.

login or register to reply

ckuecker

Expert Boarder
Click here to see the profile of this user

2008/06/26 15:47

Re:LM3S6965 crashes in hibernate

After replacing the rest of the hibernate setup code, the Blinky code still runs correctly, but I am still seeing that pesky narrow negative going pulse on the crystal - it's not oscillating.

Making progress, though! Thanks!

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/06/26 16:22

Re:LM3S6965 crashes in hibernate

We got you past the Fault Handler - please try my hibernate.h (mod) suggestion several posts back.

You may try a 1M R across the xtal - if not already there.

login or register to reply

ckuecker

Expert Boarder
Click here to see the profile of this user

2008/06/27 08:32

Re:LM3S6965 crashes in hibernate

The hibernate setup is working now - the 1M resistor fixed the oscillator.

Now working on getting the unit into hibernation mode and back...

login or register to reply
<< Start < Prev 1 2 3 4 5 Next > End >>