Kinetis L: "conceptual" doubts.

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

Kinetis L: "conceptual" doubts.

968 Views
EgleTeam
Contributor V

Hi,

we are starting a project with a Kinetis L (MKL27Z256VFM4). This is our 3rd project with Kinetis: the previous two were very simple at hardware level (almost copy/paste from development boards). We use to work with PICs so many concepts of Kinetis are new to us.

I have two questions that probabby are very obvius but I don't know now:

1. Can I use a 16mhz crystal to get 48mhz for core and usb?. 8mhz crystals usually have a big encapsulate.

2. How can I access to a complete port of GPIOs?. I try to explain... we'd like to use eGUI in GPIO mode (the uC seleted doesn't have flexbus) so I guess we need to connect our frammebuffer in RAM to a complete port of GPIOs via DMA (space color is 8bpp). The problem is that I can't find how to do that in the reference manual. In fact I don't understand how the GPIOs are distributed since in the uC chosen, for example, have a PORTA that goes from PTA0-PTA5 to PTA18. I can find 8 GPIOs in a row...

Thanks,

Manuel.

Labels (2)
6 Replies

740 Views
bobpaddock
Senior Contributor III

The 'L' family is a rather low end part.  It is not really suited to such applications as Framebuffers.  That may be why you are not finding what you are looking for as it is not meant for external memory bus interface.

Also in the KL27 family I2C Repeated Start is broken. :-(

0 Kudos

740 Views
EgleTeam
Contributor V

Thanks Bob,

I thougt so: so we have changed to K22 that has flexbus. I still have the doubt about the crystal: can I use 16Mhz to get 48Mhz for USB?

Thanks,

Manuel.

0 Kudos

740 Views
EgleTeam
Contributor V

Thanks Xiangjun,

why do you recommend to use 120mhz for the core?. Ideally we'd like to use the lower possible frequency (48mhz, am I wrong?): we need to transfer around 2MB/s RAM==>DMA==>Flexbus (128x128@16bpp@60hz), for the rest there are "few things to do", so we'd like to save power comsumption (the system is powered by a 200maH battery).

Regards,

Manuel.

0 Kudos

739 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Manuel,

Of course, you can have the K22 run at 48mhz although the K22 can run at 120MHz at most so that you can save power. In the case, you can set the PLL input reference clock frequency in 2mHz by setting the PRDIV as 7(PLL input reference clock frequency=16/8=2MHz), set the VDIV as 24, the PLL output frequency is 2MHz*24=48MHz. You can use the 48MHz for both core/system and the USB modules.

Hope it can help you.

BR

Xiangjun Rong

739 Views
EgleTeam
Contributor V

Thanks Xiangjun,

all clear :-).

Regards,

Manuel.

0 Kudos

739 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose you use K22 which can run in 120Mhz for example, you can select the MK22FX512AVMC12. If you use 16MHz crystal which is connected to EXTAL0/XTAL0 pins, I think it is okay to generate 48MHz clock signal for usb module.

Assume you use PLL to get 120MHz clock signal, there is a register SIM_CLKDIV2, which can divide the 120MHz to output 48mhz signal with the configuration SIM_CLKDIV2=0x09.

USB clock frequency=(2/5)*120MHz=48MHz. It is recommended that you use PLL to get the 120mhz clock signal for the core/system/bus/flash especially USB, the PLL can output clock signal with low jitter.

BTW, the PLL input reference clock frequency is 2~4mhz, you can use PLL internal divider to get 2Mhz clock signal as the PLL reference clock signal, use PLL to multiply it to 120mhz.

I suggest you use FlexBus to access external frame buffer.

Hope it can help you.

BR

Xiangjun Rong

pastedImage_0.png

0 Kudos