Example for K70 + MQX 4 + eGUI 3 + TWR-LCD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example for K70 + MQX 4 + eGUI 3 + TWR-LCD

Jump to solution
2,249 Views
friederschrempf
Contributor IV

Hello,

I'm still trying to get the TWR-K70F120M to work with a TWR-LCD module (non RGB) over FlexBus or SPI.

After spending a lot of time trying SPI but without luck (TWR-LCD with eGUI (D4D) and MQX on TWR-K70F120M) I decided to try the FlexBus interface. But I'm not able to get anything on the display!

What changes are needed when I start from a basic setup of:

  • CodeWarrior 10.3
  • MQX 4.0.1
  • TWR-K70F120M
  • TWR-LCD attached
  • standard BSP with SPI2 enabled
  • eGUI 3

I modified d4d_user_config.h to use d4dlcd_ssd1289 and d4dlcdhw_mqx_fb. What else must be changed?

Has someone got a working project for this setup that he/she would like to upload?

Thanks!

0 Kudos
1 Solution
930 Views
friederschrempf
Contributor IV

First of all: Thank you very much for your efforts!

I quickly tried the executable from your project and because I only got a white screen and the "Hello" message in the terminal I had a closer look at the hardware.

I reprogrammed the bootloader s19 file to the MCF51JM128 although I've done that before and I - and this might have been the problem - attached the TWR-LCD module more tightly to the ELEV board what is very difficult because it needs a lot of pressure. It seems like I haven't attached it firm enough before.

I try to avoid thinking about how much time I have spent because of that stupid mistake.

In short: FlexBus works now, even in my own project.

Thank you very much Martin!!! You made my day!!!

View solution in original post

0 Kudos
6 Replies
930 Views
friederschrempf
Contributor IV

I'am about to give up.

I tried for days to get the display working under MQX with TWR-K70 and TWR-K40, with FlexBus and SPI, with DSPI driver and SPI PE Component, but none of the setups worked.

The closest I was, was with SPI PE Component where I got something on the display at least. But there were many wrong pixels. Now I do not even get this one working again.

Does somebody have a working project for one of these configurations, please?

That would be great! Thanks!

0 Kudos
930 Views
Martin_
NXP Employee
NXP Employee

I got it running over Flexbus. Project is attached (executable built with CW 10.3 and MQX 4.0.1). I'm not exactly sure which version of eGUI. Try to load the executable file intflash_sramdata_d.afx into your TWR-K70F120M just to see if the hardware is setup properly. I can see screen with some Design with Freescale logo.

1) TWR-LCD flexbus 16 bits through elevator: SW1 switch are set up with in follow sequence "10111110".

2) If you want to run project from TOWER (not from onboard MCF51JM128) be sure to load into onboard MCF51JM128 any empty project to avoid any conflict on shared LCD signals.

3) make sure the BSP source file:

  init_tchres.c

is in the bsp_twrk70f120m build project.

4)

change linker command file intflash_sramdata.lcf as proposed above (0xA0000000 for LCD base).

5)

clean build bsp_twrk70f120m. as post build step, this will copy the intflash_sramdata.lcf from the BSP source code folder to the LIB folder.

6)

clean build application. look in the generated xMAP to double check that symbol __EXTERNAL_LCD_BASE is at 0xA0000000.

The project is to be located in /mqx/examples/hello2. Before building this project, make sure the MQX_ROOT_DIR is configured for the installation directory of your MQX 4.0.1.

I temporarily disable touch calibration (disabled D4D_CalibrateTouchScreen() and D4D_CheckTouchScreen() application calls), because touch was not running initially and I wanted to just check that the screen is running. I can see screen on TWR-LCD now. Once you get the screen, we can figure out what is wrong with the touch and update eGUI to the latest version if it's not the case in the example project).

931 Views
friederschrempf
Contributor IV

First of all: Thank you very much for your efforts!

I quickly tried the executable from your project and because I only got a white screen and the "Hello" message in the terminal I had a closer look at the hardware.

I reprogrammed the bootloader s19 file to the MCF51JM128 although I've done that before and I - and this might have been the problem - attached the TWR-LCD module more tightly to the ELEV board what is very difficult because it needs a lot of pressure. It seems like I haven't attached it firm enough before.

I try to avoid thinking about how much time I have spent because of that stupid mistake.

In short: FlexBus works now, even in my own project.

Thank you very much Martin!!! You made my day!!!

0 Kudos
930 Views
Martin_
NXP Employee
NXP Employee

for the Flexbus setup, you need to change the linker command file symbols:

__EXTERNAL_LCD_BASE = 0x60000000;

__EXTERNAL_LCD_SIZE = 0x1FFFF;

__EXTERNAL_LCD_DC_BASE = 0x60010000;

to

__EXTERNAL_LCD_BASE = 0xA0000000;

__EXTERNAL_LCD_SIZE = 0x1FFFF;

__EXTERNAL_LCD_DC_BASE = 0xA0010000;

as the twrk70f120m BSP enables data cache, the idea is to map the flexbus lcd area to a cache inhibited memory region. Also make sure the Flexbus is configured - pins and the controller:

_bsp_flexbus_setup()

_bsp_flexbus_lcd_setup()

functions are called, or configure the flexbus manually

https://community.freescale.com/message/325015#325015

https://community.freescale.com/message/330635#330635

930 Views
williamely
Contributor IV

Thanks for this!

This also fixed my issue with the TWR-K60F120 board and TWR-LCD. The BSP for K60D100M disables cache in init_hardware() due to E2647 but the BSP for the K60F board does not.

0 Kudos
930 Views
friederschrempf
Contributor IV

Thank you!

I followed your instructions. The adresses are set as you suggested and the init functions are called.

Unfortunately I still can see nothing on the display!

0 Kudos