2008-05-13 09:52:26     writing on uart

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-05-13 09:52:26     writing on uart

Bastien Briec (FRANCE)

Message: 55782   

 

Hello, I want to send AT commands on a gsm modem via the uart (ttyBF1) but when I try to write in the uart "write( uart, command , sizeof(command));" I get an error :

 

Instruction fetch misaligned address violation

- Attempted misaligned instruction cache fetch. On a misaligned instruction fetch exception,

the return address provided in RETX is the destination address which is misaligned, rather than the address of the offending instruction.

 

CURRENT PROCESS:

 

COMM=gsm PID=31

TEXT = 0x01948000-0x019488fc  DATA = 0x004918fc-0x00491aa8

BSS = 0x00491aa8-0x004c0000   USER-STACK = 0x004dfed0

 

return address: 0x019484c6; contents of [PC-16...PC+8]:

0010 0000 200c 0020 0000 2009 0028 0000

2006 0018 0000 2003 0000 0000 915a a05b X

0052 0000 0000 0000 e519 fffe e51b ffff

 

RETE:  00000000  RETN: 01916000  RETX: 019484c6  RETS: 0194877e

IPEND: 0030  SYSCFG: 0036

SEQSTAT: 0000002a    SP: 01915f24

R0: 00000003    R1: 00491a20    R2: 00000004    R3: 018b63c0

R4: 01948878    R5: 00000003    R6: 00000020    R7: 00491a20

P0: 00000004    P1: 0194849e    P2: 00005441    P3: 00491a20

P4: 01948888    P5: 01948884    FP: 004dfe68

A0.w: 00000000    A0.x: 00000000    A1.w: 00000000    A1.x: 00000000

LB0: 0039d521  LT0: 0039d51e  LC0: 00000000

LB1: 0182c743  LT1: 0182c742  LC1: 00000000

B0: 00000000  L0: 00000000  M0: 00000000  I0: 004dfde5

B1: 00000000  L1: 00000000  M1: 00000000  I1: 000043dc

B2: 00000000  L2: 00000000  M2: 00000000  I2: 00000000

B3: 00000000  L3: 00000000  M3: 00000000  I3: 00000000

 

USP: 004dfe54   ASTAT: 02003004

DCPLB_FAULT_ADDR=00491a24

ICPLB_FAULT_ADDR=019484c6

 

 

Hardware Trace:

0 Target : <0x00004418> { _trap_c + 0x0 }

   Source : <0xffa00b50> { _exception_to_level5 + 0xb4 }

1 Target : <0xffa00a9c> { _exception_to_level5 + 0x0 }

   Source : <0xffa00a9a> { _ex_trap_c + 0x4e }

2 Target : <0xffa00a4c> { _ex_trap_c + 0x0 }

   Source : <0xffa00bf0> { _trap + 0x28 }

3 Target : <0xffa00bc8> { _trap + 0x0 }

   Source : <0x019484c4> [ /bin/gsm + 0x4c4 ]

4 Target : <0x019484c2> [ /bin/gsm + 0x4c2 ]

   Source : <0x0194849e> [ /bin/gsm + 0x49e ]

5 Target : <0x0194849e> [ /bin/gsm + 0x49e ]

   Source : <0x019484e0> [ /bin/gsm + 0x4e0 ]

6 Target : <0x019484d8> [ /bin/gsm + 0x4d8 ]

   Source : <0x0194877a> [ /bin/gsm + 0x77a ]

7 Target : <0x01948772> [ /bin/gsm + 0x772 ]

   Source : <0x00399c26> [ /lib/libuClibc-0.9.29.so + 0x19c26 ]

8 Target : <0x00399c22> [ /lib/libuClibc-0.9.29.so + 0x19c22 ]

   Source : <0x0039b8b8> [ /lib/libuClibc-0.9.29.so + 0x1b8b8 ]

9 Target : <0x0039b8ae> [ /lib/libuClibc-0.9.29.so + 0x1b8ae ]

   Source : <0x0039b8a0> [ /lib/libuClibc-0.9.29.so + 0x1b8a0 ]

10 Target : <0x0039b89a> [ /lib/libuClibc-0.9.29.so + 0x1b89a ]

   Source : <0x0039b568> [ /lib/libuClibc-0.9.29.so + 0x1b568 ]

11 Target : <0x0039b556> [ /lib/libuClibc-0.9.29.so + 0x1b556 ]

   Source : <0x0039a816> [ /lib/libuClibc-0.9.29.so + 0x1a816 ]

12 Target : <0x0039a80e> [ /lib/libuClibc-0.9.29.so + 0x1a80e ]

   Source : <0x0039a7be> [ /lib/libuClibc-0.9.29.so + 0x1a7be ]

13 Target : <0x0039a7bc> [ /lib/libuClibc-0.9.29.so + 0x1a7bc ]

   Source : <0x0039aa0a> [ /lib/libuClibc-0.9.29.so + 0x1aa0a ]

14 Target : <0x0039a9fe> [ /lib/libuClibc-0.9.29.so + 0x1a9fe ]

   Source : <0x0039a4ea> [ /lib/libuClibc-0.9.29.so + 0x1a4ea ]

15 Target : <0x0039a4e2> [ /lib/libuClibc-0.9.29.so + 0x1a4e2 ]

   Source : <0x0039a47e> [ /lib/libuClibc-0.9.29.so + 0x1a47e ]

Stack from 01915f04:

        00000000 ffa00b54 ff801988 ff801988 ff801984 00000003 004998b8 000c25ae

        019484c6 00000030 0000002a 00000000 01916000 019484c6 019484c6 0194877e

        00000003 02003004 0182c743 0039d521 0182c742 0039d51e 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 000043dc 004dfde5 004dfe54 004dfe68 01948884 01948888

Call Trace:

[<00005441>] _apply_relocate_add+0x1d/0x388

 

 

Bus error

 

How can I do to send my commands?Here is some configuration to do before writing?

 

Regards, Bastien

TranslateQuoteReplyEditDelete

 

 

2008-05-13 10:12:21     Re: writing on uart

Mike Frysinger (UNITED STATES)

Message: 55783   

 

the documentation explains how to use the trace to find the problem in your code:

http://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#analyzing_traces

QuoteReplyEditDelete

Attachments

    Outcomes