Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Kernel reboot using LCD

Hi all,

I am trying to use OPTREX LCD module on uclinux ( stratix II board ).

I´m using J15 connector to avoid conficts with compact flash card.

I have my own display driver designed using altera PIO component.

My display driver runs without problems on a NIOS II project.

When I put my application on uclinux the kernel reboot.

Thanks for any suggestions.

10 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm sorry, but that's not enough information for me to help... what do you mean when you say you put your application on uClinux?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello Ken,

    First I created a new 11 bit PIO and write a simple C program to run on NIOS II.

    The project has 2 files named lcd_16207.h and lcd_16207.c and I can control the LCD using this option.

    Then I created a new linux application project and put lcd_16207.* files into the new project.

    When I run the application the kernel reboot when acessing IO from LCD.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm guessing that the application compiled properly and that you got it into the filesystem on the Nios II alright. How are you doing your read and writes to the PIO in your Nios II Linux application?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello Ken,

    I´m using IORD and IOWR macros

    IOWR(PIO_LCD_0_BASE,0,0);

    IORD(PIO_LCD_0_BASE,0);

    The problem was solved :

    I put the code on lcd_16207.c file into main file application (lcd.c) and now the LCD is OK.

    Problably Eclipse is causing the problem.

    Thanks for help
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Which file do you include to using IOWR/IORD?

    So , in my view, you builde a application software instead of "linux drivers" , isn't it ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    The include files are:

    nios2_system.h

    io.h

    system.h

    lcd_16207.h

    The software is an application.

    I dont know how to make a "linux driver"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi!

    Is a special driver always necessary to use a LCD, a LED or other devices under Linux?

    Bye, Lothar.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by mtuxpe@Aug 26 2005, 03:18 PM

    hi,

    the include files are:

    nios2_system.h

    io.h

    system.h

    lcd_16207.h

    the software is an application.

    i dont know how to make a "linux driver"

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=9310)

    --- quote end ---

    --- Quote End ---

    mtuxpe,

    Can you show me how i can write an application to use the 16207 ?

    my nios2_system.h doesn&#39;t have entries on 16207 ? What do i need to do ?

    Some help would be good. thanks