Help with MQX + MCF52235 and character LCD

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Help with MQX + MCF52235 and character LCD

ソリューションへジャンプ
666件の閲覧回数
Macias
Contributor I

Hello,

I connect an character (2x16) lcd to my MCF52235 to PORTAN. I want to use it with mqx so, I wrote a additionale device driver for my lcd (attached file) but I've same problems with my driver. I'm using ioctl function to control my lcd like return to home, clear display, etc. Data to display is writing via write(..) function, please see below:

 

void Main_task(uint_32 initial_data){    if(IO_OK != _textlcd_install("lcd:"))           printf("Error opening lcd\n");             if(NULL==(lcd_file = fopen("lcd:", NULL)))           printf("Opening LCD device faild\n");   for (;;)    {           ioctl(lcd_file, TEXT_LCD_HOME, NULL);  <= this line provide problem, break curent task           write(lcd_file, "TEST", 0);              _time_delay(10);   }}

 

 

Instal and open and write function works great but I've problem with ioctl function. when I call this function the task was exited, and I don't know why.

Please help me with this.

 

Regards,

Maciek

0 件の賞賛
返信
1 解決策
457件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Maciek,

Your code and process look good to me.

Can you set a breakpoint in the switch statement to validate your IOCTL call is getting that far?

 switch(cmd)
 {
  case TEXT_LCD_HOME:
   LcdWriteCmd(0x02);          <-- SET BREAKPOINT HERE

 

Lastly make sure the BSP and PSP have been recently cleaned and compiled.

Regards,

David

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
458件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Maciek,

Your code and process look good to me.

Can you set a breakpoint in the switch statement to validate your IOCTL call is getting that far?

 switch(cmd)
 {
  case TEXT_LCD_HOME:
   LcdWriteCmd(0x02);          <-- SET BREAKPOINT HERE

 

Lastly make sure the BSP and PSP have been recently cleaned and compiled.

Regards,

David

0 件の賞賛
返信