TWR-K60N512-KIT demo

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

TWR-K60N512-KIT demo

2,583 Views
gustavod
Contributor III

Hi,

 

I would like to disclose our very first demo for Freescale Kinetis microcontrollers. We intended to make a functional demo with TWR-K60N512-KIT and TWR-LCD for Codewarrior 10.1 IDE. Such demo include an UART and USB terminal, graphic LCD routines (eGui), LCD touch screen, accelerometer and touch-sense.
The code is implemented with our RTOS (BRTOS), but the drivers can be used in bare metal projects.
Try our demo in your tower kit. All routines are free and open-source:

 

http://code.google.com/p/brtos/downloads/list

http://brtos.googlecode.com/files/BRTOS%201.66%20Kinetis%20-%20USB%20-%20GLCD.rar

 

Best regards,

Gustavo

 

 

0 Kudos
15 Replies

1,568 Views
gustavod
Contributor III

 

For those who downloaded the demo in the first hours i recommend to check the project properties and verify if the automatic makefiles feature is marked, as shown in the attached figure.

 

 

0 Kudos

1,568 Views
jil
Contributor I

Hi Gustavo,

Great project and thanks for posting. I just got my TWR-LCD from Freescale & connected to a TWR-K60N512-KIT but it doesn't seem to work. Is it any other settings that I need to do for beside enable the EBI (16-bit mode) communication to the LCD Display?

 

TWR-K60N512 has default jumper position and TWR-LCD is like the one recommended in "tasks.c":

// POS:   1 2 3 4 5 6 7 8
// FLEX:  1 0 1 0 1 1 1 0

 

There is one thing that I didn't get it:

// POS 4 = Enable SD card on the TWR-K60N512

Where can I find this P4

Thanks

J

 

PS

My TWR-K60N512 is a Rev C board

0 Kudos

1,568 Views
gustavod
Contributor III

Hi Jil,

 

Glad you liked the project. At first i would like to say that my TWR-K60N512-KIT is a Rev D board. So, some configs could be different.

 

The "// POS 4 = Enable SD card on the TWR-K60N512" comment was just to i remember that position 4 of SW1 from TWR-LCD must be OFF to enable the SD card function. But i think this is just true for Rev D boards. Normal jumper configuration to Rev C is indicated to be: 

// POS:   1 2 3 4 5 6 7 8

// FLEX:  1 0 1 1 1 1 1 0

 

This could be the right setup for you (i really don't know). Yet, i think that you must turn on all the switchs from SW5 in order to route the touch panel info to the K60 AD/s.

 

And the rest of the demo is working? (USB CDC class, acelerometer, touch sensing, etc)

 

Best regards,

Gustavo

0 Kudos

1,568 Views
jil
Contributor I

Thanks for answer Gustavo.

 

The accelerometer, touch sensing and others seems to work, except the LCD, but I haven't tested the USB yet.

 

Doing further researches, it seems to be some differences between K60N512 Rev C and Rev D that may influence the behavior of TWR-LCD. It is not very clear for me now what exactly should I do because I want to use only LCD not the SD card. Here is the document I'm looking at: http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf.

 

Regards,

J

0 Kudos

1,568 Views
gustavod
Contributor III

Jil,

 

Have you tested the LCD with the bare metal version of eGUI 2.1? I think your problem could be hardware too, cause at first i had some issues with the TWR-LCD module plugged into TWR-K60N512-KIT. You must have sure that all pins are well conected. It is pretty hard to conect the TWR-LCD in the first time, cause the headers are too tight.

 

Also, if you have an SD card plugged into the slot, try to remove it. In my board the reset line of the LCD is conected with the wirte protect pin of the SD card. After that I do not know what to recommend for you.

 

Regards,

Gustavo

 

0 Kudos

1,568 Views
jil
Contributor I

I haven't tested this but I think it's a really a good idea. Actually I didn't know that eGUI has a version for K60 with CW10.

Trying to compile it I'm getting an error:

make: *** [D4D/low_level_drivers/touch_screen/touch_screen_hw_interface/template/d4dtchhw_template.obj] Error 1

Do you have any idea how to fix this?

 

Thanks for advice!

 

J

0 Kudos

1,568 Views
gustavod
Contributor III

Jil,

 

I got this error due to large folders names. You can try to move the eGui folder to the root of your drive. Please, let me know if this works for you and if the TWR-LCD turned on.

 

PS.: I still thinking that could be connections problems.

 

Regards,

Gustavo

0 Kudos

1,568 Views
jil
Contributor I

Hi Gustavo,

 

I didn't get anymore that error by moving eGUI folder to the root of the drive. I think I've got some other errors because of this too.

 

Now, when I compile eGUI files for a SPI connection the LCD it's working but is not very responsive and sometimes forgets to exit from the calibration function. The "touch" function it doesn't seem to work ... yet.

 

If I try a FB16b connection the LCD is blank and I couldn't get anything from it.

 

Now one other thing I would like to try is to remove the firmware from the onboard MCF51JM128 t make sure don't have any conflict on shared LCD signals. 

 

Thanks again & regards,

J

0 Kudos

1,568 Views
gustavod
Contributor III
Hi Jil, Of course, i forgot that. You must burn a empty firmware to the coldfire of thr TWR-LCD with all I/Os as inputs. The eGui bare metal is defined to SPI in the config files (i think it is d4d_user_config.h). There you can change between spi and fb16. If this works please try again the BRTOS firmware. Regards, Gustavo
0 Kudos

1,568 Views
jil
Contributor I

Hi Gustavo,

 

Of course I've changed the configuration in d4d_user_cfg.h and rebuild the project again before trying to communicate on FB16b. I did this also after erasing the firmware on the onboard MCF51JM128 but nothing has changed and LCD didn't work.

 

Regards,

J

0 Kudos

1,568 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

 

Have you done the hardware modification? The new TWR-K60 hava a jumper to avoid the Flexbus conflict with IR receiver.

 

this is coming from uTasker demo docs:

In order to work with the TFT display on the TWR-LCD extension board via 16-bit FlexBus itis necessary to isolate the line FB_AD9 from the Infra-Red input circuitry. This can bedone by removing R14 and C2 from the board or by cutting the track CMP0_IN0 (betweenC2 and the back plane). With the circuitry connected the 100nF capacitor C2 otherwiseheavily loads the FB_AD9 line and so doesn’t allow the bus to operate correctly at normalbus frequencies.

 

 

Best Regards,

0 Kudos

1,568 Views
gustavod
Contributor III

Hi Luis,

 

I do not have to do such modification cause my board is the Rev. D. But i believe this is the problem for Jil.

 

Regards,

Gustavo

0 Kudos

1,568 Views
jil
Contributor I

Hi Guys,

 

After removing R14 and C2 from the K60 board everything works fine with FB communication but I still have one more problem, the "touch" function doesn't seem to work. 

 

If I'm using:

#define D4D_LLD_TCH  d4dtch_resistive

#define D4D_LLD_TCH_HW d4dtchhw_kinetis_adc

most of the times the LCD can't come out from calibration.

This is happening with both eGUI and BRTOS.

With the on board MCF51JM128 touch function works fine.

 

Any idea what is happening?

J

0 Kudos

1,568 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

 

I think you don't have the other switch in TWR-LCD OK.

 

SW5 : ALL ON

 

 

Best Regards,

0 Kudos

1,568 Views
jil
Contributor I

This was exactly what I need it. Everything is fine now!

 

Thanks guys

 

0 Kudos