Posts by johann

    Hello,
    you are right, i have revision 1.1
    Board: armStoneA8-V1.10
    Software: armStoneA8-V1.1 (23.05.2012)
    I accidently took the version from the reference card (ArmStoneA8 GPIO Reference Card (V1.0))


    The RS232 <-> TTL Level differences i know. Thank you.


    Measuring with my oscilloscope i have following: Pin 14 (ttySAC1,TX) -> 0V; Pin 38 (ttySAC2,TX) ->3.3V directly after switching on?!?!
    Using the following code:


    calling ./a.out /dev/ttySAC0 works fine and prints a lot of 'a's on my console (clearly visible on my osci)
    calling ./a.out /dev/ttySAC1 nothing happens (on the osci)
    calling ./a.out /dev/ttySAC2 system crashes.
    What am I doing wrong?
    I already re-installed the OS, but nothing changed...


    Regard,
    Johann

    Hello,
    first of all I want to say thank you for the response.
    I have a new problem, still concerning the UART.
    When I try to open a connection to /dev/ttySAC2 the system breaks stopps and a few seconds later the following appears:



    BUG: soft lockup - CPU#0 stuck for 23s! [a.out:780]
    Modules linked in:


    Pid: 780, comm: a.out
    CPU: 0 Not tainted (3.3.7-F+S #1)
    PC is at __do_softirq+0x40/0x100
    LR is at irq_exit+0x44/0xa8
    pc : [<c0022058>] lr : [<c00224f8>] psr: 20000113
    sp : cf38dc98 ip : 00000001 fp : 00000000
    r10: c0584500 r9 : 0000000a r8 : 00000017
    r7 : c0584544 r6 : cf38c000 r5 : 00000000 r4 : 00000002
    r3 : 00000102 r2 : cf38c000 r1 : 00000001 r0 : 00000000
    Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c5387d Table: 4f394019 DAC: 00000015
    [<c0011a34>] (unwind_backtrace+0x0/0xe0) from [<c005095c>] (watchdog_timer_fn+0xe8/0x13c)
    [<c005095c>] (watchdog_timer_fn+0xe8/0x13c) from [<c00375c8>] (__run_hrtimer.isra.21+0x50/0xec)
    [<c00375c8>] (__run_hrtimer.isra.21+0x50/0xec) from [<c0037cdc>] (hrtimer_interrupt+0xf0/0x22c)
    [<c0037cdc>] (hrtimer_interrupt+0xf0/0x22c) from [<c0018bf8>] (s5p_clock_event_isr+0x10/0x18)
    [<c0018bf8>] (s5p_clock_event_isr+0x10/0x18) from [<c005120c>] (handle_irq_event_percpu+0x30/0x170)
    [<c005120c>] (handle_irq_event_percpu+0x30/0x170) from [<c0051388>] (handle_irq_event+0x3c/0x5c)
    [<c0051388>] (handle_irq_event+0x3c/0x5c) from [<c0053510>] (handle_level_irq+0xb8/0xd0)
    [<c0053510>] (handle_level_irq+0xb8/0xd0) from [<c0050c24>] (generic_handle_irq+0x2c/0x40)
    [<c0050c24>] (generic_handle_irq+0x2c/0x40) from [<c00196e0>] (s3c_irq_demux_vic_timer+0x54/0x6c)
    [<c00196e0>] (s3c_irq_demux_vic_timer+0x54/0x6c) from [<c0050c24>] (generic_handle_irq+0x2c/0x40)
    [<c0050c24>] (generic_handle_irq+0x2c/0x40) from [<c000e094>] (handle_IRQ+0x60/0x84)
    [<c000e094>] (handle_IRQ+0x60/0x84) from [<c0008548>] (vic_handle_irq+0x90/0xd4)
    [<c0008548>] (vic_handle_irq+0x90/0xd4) from [<c000d400>] (__irq_svc+0x40/0x70)
    Exception stack(0xcf38dc50 to 0xcf38dc98)
    dc40: 00000000 00000001 cf38c000 00000102
    dc60: 00000002 00000000 cf38c000 c0584544 00000017 0000000a c0584500 00000000
    dc80: 00000001 cf38dc98 c00224f8 c0022058 20000113 ffffffff
    [<c000d400>] (__irq_svc+0x40/0x70) from [<c0022058>] (__do_softirq+0x40/0x100)
    [<c0022058>] (__do_softirq+0x40/0x100) from [<c00224f8>] (irq_exit+0x44/0xa8)
    [<c00224f8>] (irq_exit+0x44/0xa8) from [<c000e098>] (handle_IRQ+0x64/0x84)
    [<c000e098>] (handle_IRQ+0x64/0x84) from [<c0008548>] (vic_handle_irq+0x90/0xd4)
    [<c0008548>] (vic_handle_irq+0x90/0xd4) from [<c000d400>] (__irq_svc+0x40/0x70)
    Exception stack(0xcf38dd10 to 0xcf38dd58)
    dd00: c053d440 60000113 cf2c5b00 00000001
    dd20: 60000113 cf3779c0 0000004c 00000000 c053d440 60000113 c053d420 00000000
    dd40: 00000000 cf38dd58 c03c6218 c03c621c 60000113 ffffffff
    [<c000d400>] (__irq_svc+0x40/0x70) from [<c03c621c>] (_raw_spin_unlock_irqrestore+0x10/0x3c)
    [<c03c621c>] (_raw_spin_unlock_irqrestore+0x10/0x3c) from [<c00521ac>] (__setup_irq+0x2fc/0x3c4)
    [<c00521ac>] (__setup_irq+0x2fc/0x3c4) from [<c0052350>] (request_threaded_irq+0xdc/0x12c)
    [<c0052350>] (request_threaded_irq+0xdc/0x12c) from [<c021d18c>] (s3c64xx_serial_startup+0x30/0x7c)
    [<c021d18c>] (s3c64xx_serial_startup+0x30/0x7c) from [<c021bb68>] (uart_startup.part.7+0x70/0x1b8)
    [<c021bb68>] (uart_startup.part.7+0x70/0x1b8) from [<c021c6b0>] (uart_open+0xd0/0x12c)
    [<c021c6b0>] (uart_open+0xd0/0x12c) from [<c0205cd4>] (tty_open+0x34c/0x4ec)
    [<c0205cd4>] (tty_open+0x34c/0x4ec) from [<c0080cbc>] (chrdev_open+0x178/0x1a0)
    [<c0080cbc>] (chrdev_open+0x178/0x1a0) from [<c007bd4c>] (__dentry_open.isra.13+0x1e4/0x2f0)
    [<c007bd4c>] (__dentry_open.isra.13+0x1e4/0x2f0) from [<c0089850>] (do_last.isra.34+0x688/0x6b8)
    [<c0089850>] (do_last.isra.34+0x688/0x6b8) from [<c0089a44>] (path_openat+0xb4/0x350)
    [<c0089a44>] (path_openat+0xb4/0x350) from [<c0089dc0>] (do_filp_open+0x2c/0x78)
    [<c0089dc0>] (do_filp_open+0x2c/0x78) from [<c007ca60>] (do_sys_open+0xd8/0x170)
    [<c007ca60>] (do_sys_open+0xd8/0x170) from [<c000d800>] (ret_fast_syscall+0x0/0x30)



    Executing the same programm with e.g. /dev/ttySAC0 works fine. Changing Baudrate and sending data is no problem here.
    What might be the reason for this?
    Part of my code:

    Code
    1. ...
    2. int fd;
    3. struct termios options;
    4. fd = open(argv[1], O_RDWR | O_NOCTTY | O_NDELAY);
    5. if(fd == -1)
    6. {
    7. printf("ERROR Open Serial Port!");
    8. }
    9. ...


    As I already mentioned in my last post, I have the armstone A8 rev1.0.
    Is the second serial device "dev/ttySAC1", with RX/TX on pins 12 and 14?


    Thank you in advance,
    Johann

    Hello,
    I have installed the armStoneA8-V1.1 package and already written a simple hello world to ensure the toolchain works. It does.
    Because I am a Linux newbie, I am already proud of what I reached so far.
    Now, I am trying to address a 3,3V serial device via rx and tx pins on the armstone A8 rev1.0. but i do not have any idea how to do this.
    I transferred the gpio example I downloaded from your site and tried to start it. It crashed.
    in your source you use:
    #define SYS_DIR "/sys/class/gpio/gpio145/direction"
    #define SYS_VAL "/sys/class/gpio/gpio145/value".
    Those directories do not exist on my system.
    There are a lot of other "gpio" directories, but none of them contains a "direction" or a "value" folder.
    Are there any other examples how to "talk" to hardware?
    The spi example does not work either.
    #define DEFAULT_ADAPTER "/dev/spidev1.0" odes not exist...


    Regards,
    Johann