FNET for K60

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

FNET for K60

Jump to solution
24,622 Views
romano_r1
Contributor II

Hi.

 

I will have to take a decision about selection the microcontroller. I must choice between MCF52259 and K60. Very helpful for me will be the answer for the following question: 

- What is the estimated date when the FNET for K60 will appear?

1 Solution
17,106 Views
butok
NXP Employee
NXP Employee

Hi Gustavo,

 

>>are you intending to release a FNET demo for Codewarrior 10.1 (Kinetis K60N512)?

 

Yes, but I would wait for CW10.2.

 

Thank you,

Andrey Butok

View solution in original post

0 Kudos
Reply
97 Replies
2,335 Views
Skyhawk
Contributor I

Andrey, 

 

Thanks for your fast reply, I understand the FNET_CFG_CPU_CLOCK_HZ is not used to initialize the CPU

clock module, but since it  IS used as a reference to initialize the TIMER and UART modules why is the value

 

96Mhz and not 50MHz ? Is 96MHz, some kind of 'safely high' value? I my case my external clock frequency is 25 Mhz ,not 50 MHz, so should the value be changed to 48Mhz for me ?

 

I'm just not seeing how a 96Mhz reference frequency makes sense.

Also how come the CPU starts when the clock module is not initialized yet (ofcourse it is good that it does , otherwise initialization routine would not be executed ;| but, after reset does the CPU limp though the init code some low speed internal resonator? or is that an insult :smileyhappy:

 

Greetings,


0 Kudos
Reply
2,335 Views
butok
NXP Employee
NXP Employee

Hi Jan,

 

You may set it to whatever value you think has sense and able to provide by your application.

 

It is better to open separate thread about CPU-specific initialization and HZ numbers, if you want to get beter answer.

 

Cheers,

Andrey Butok

0 Kudos
Reply
2,335 Views
gustavod
Contributor III

Hi Andrey,

 

Fantastic job. Everything is working now.

 

Andrey, I am Gustavo from the BRTOS project, a free open-source RTOS:

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

 

We have some demos with freescale microcontrollers (HCS08, Coldfire V1 and kinetis). Now we are trying to integrate FNET stack into our RTOS. However, we don't know how to modify the FNET state machine in order to make it event driven. Are you interested in helping us?

 

FNET is already working in a BRTOS task in this kinetis demo:

http://brtos.googlecode.com/files/BRTOS%201.6x%20Kinetis%20%2B%20FNET.rar

 

Sometimes we experience some crashes in the FNET task. I think it can be due to the interrupt process. We simply encapsulate your interrupt handler in a BRTOS interrupt process. We are trying to solve this problem.

 

The most important is to make FNET event driver, cause in the way it is now, FNET occupies all the remainder CPU.

 

Best regards,

Gustavo Denardin

0 Kudos
Reply
2,335 Views
butok
NXP Employee
NXP Employee

Hi Gustavo Denardin,

 

>>Are you interested in helping us?


Personally, I am interested – it should be FUN.

So you may write me directly to Andrey.Butok@freescale.com.

 

BTW:

>>The most important is to make FNET event driver

 

The FNET TCP/IP stack is interrupt-driven (Ethernet RX and Timer (100ms period)).

 

>> cause in the way it is now, FNET occupies all the remainder CPU

 

I guess you mean user applications using FNET.

So it is fully up to applications how to occupy the CPU.

For example, you may call fnet_ poll() ( should be renamed to fnet_services_poll() ),

that handles provided FNET application layer severs/clients, not in simple loop but with some delay/timeout.

 

Or maybe even better, we can add RTOS-specific event(s) (on new connection, new data in socket buffer etc.),

that will wake up a waiting/sleeping application.

 

Thanks,

Andrey Butok

0 Kudos
Reply
2,335 Views
gustavod
Contributor III

Thank you very much for your help Andrey !!!

 

The BRTOS + FNET integration is working like a charm and it is available for download at:

http://brtos.googlecode.com/files/BRTOS%201.6x%20demo%20for%20kinetis%20plus%20FNET.rar

 

Best regards,

Gustavo

0 Kudos
Reply
2,335 Views
Skyhawk
Contributor I

Using 1.2.2 (and earylier) 

 

When I add to fnet_user_config.h:

 

#define FNET_CFG_TFTP_CLN (1)

 

no problem,so far, but when I add to  fapp_user_config.h:

 

#define FAPP_CFG_TFTP_CMD (1)

 

I get:

 

Error[Li005]: no definition for "fapp_params_boot_config" [referenced from \bootloader\fnet_demos\mk60n512\shell\iararm6.1\FLASH_512KB_PFLASH\Obj\fapp.o]

 

This can be solved by adding: 

 

 #define FAPP_CFG_PARAMS_BOOT  (1)

 

However, this should not be needed in my opinion, since fapp_config.h contains:

 

#define FAPP_CFG_PARAMS_BOOT (FAPP_CFG_SETGET_CMD_BOOT|FAPP_CFG_SETGET_CMD_DELAY|\
FAPP_CFG_SETGET_CMD_SCRIPT|FAPP_CFG_SETGET_CMD_RAW|\
FAPP_CFG_SETGET_CMD_GO)

 

Something about the include order is not correct here, I think...

 

Just my 2c.

 

Greetings,

 

 

 

0 Kudos
Reply
2,335 Views
butok
NXP Employee
NXP Employee

Hi Jan.

 

It is OK.
The FNET_CFG_TFTP_CLN parameter only enables TFTP client  API in the FNET stack.

The FAPP_CFG_<xxx> parameters define behavior of demo applications that are delivered with FNET project but are not part of the TCP/IP stack.


So by enabling FAPP_CFG_TFTP_CMD you are enabling TFTP client shell command.
This TFTP client is only used by the Bootloder– no other demo use the TFTP command.
This Bootloader application requires having Bootloader parameters - that is why you also need to set FAPP_CFG_PARAMS_BOOT in the demo application.


If you need TFT bootloader , please use provided application with already defined parameters.
If you are creating a TFP client with own application-specific logic, you may use existing demos as reference, but no guaranty that it will not brocken if you decide to use different combinations other of FAPP_ parameters.
So the application code is up to you.

You may add FAPP_CFG_TFTP_CMD to FAPP_CFG_PARAMS_BOOT (and I will do it too) but it will not change the current aproach - demo application is not library.


BTW: FNET Bug requests you may submit here:
http://sourceforge.net/tracker/?group_id=253892&atid=1126920

 

Thank you,

Andrey Butok

0 Kudos
Reply
2,335 Views
Skyhawk
Contributor I

Thanks for explaining that :smileyhappy:

 

Greetings,

0 Kudos
Reply
2,335 Views
gustavod
Contributor III

Thanks for your support Andrey.

I will contact you directly by e-mail.

 

0 Kudos
Reply
2,338 Views
Abhitechmania
Contributor IV

Any plans for providing support for Kiel ?

0 Kudos
Reply
2,338 Views
butok
NXP Employee
NXP Employee

Hi,

 

I "personally" do not have any plans about Kiel compiler, so far. 

But any contribution from community is welcome.

 

On this moment (after 1.2.0 release), the highest priority "for me" is IPv6 and MPC support.

 

Thank you,

Andrey

0 Kudos
Reply
2,338 Views
c_o
Contributor I

Hello,
What do you mean for CW10.2? I'm very interested to use FNET (realy great project) in CW10.x project but I can't find any news about CW10.2 version. Do you know for when the new upgrade is planned?
Thank you very much

Claudio

0 Kudos
Reply
2,338 Views
butok
NXP Employee
NXP Employee

Hi Claudo,

 

If you have not found any information about it, it means that it is not for public.

 

BTW:

FNET is done mainly in free time.

So if it is need something ASAP - to add new feature, to improve something or to add support of new compiler, you should ask/push Freescale (your FAE or other valuable contacts you have). My pushing does not work.

 

Thank you,

Andrey Butok

0 Kudos
Reply
2,338 Views
c_o
Contributor I

Hi Andrey,

Thank you for reply. I think I will follow your advice.
In the while I found some instructions in the FNET_and_MQX Rev1.4 document related to M52259DEMO board and MQX™ RTOS Version 3.6: I will try to apply theese instructions to Kinetis K60 and MQX™ RTOS Version 3.7 but I'm new with Kinetis, CW10.1 and the FREESCALE products in general and something is not completely clear for me.

Claudio

0 Kudos
Reply