FNET for K60

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

FNET for K60

Jump to solution
15,500 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
7,984 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
97 Replies
1,259 Views
J2MEJediMaster
Specialist I

Do the following:

 

1) Open a Service Request (SR) by clicking on this link.

2) On the Service Request page, pick a category of Software Product Support, and topic of CodeWarrior.

3) On the next page of the SR submission process, choose Enhancement and explain what you need.

 

This way your request is formally entered into the CodeWarrior database.

 

---Tom

0 Kudos
1,259 Views
butok
NXP Employee
NXP Employee

FNET Version 1.2.0 released (http://fnet.sourceforge.net):
- Added support of the CodeWarrior Development Studio v10.2
for TWR-K60N512 (Kinetis) and M52259EVB (Kirin3) projects.
- Added support of mulicast-group joining & leaving to the socket interface.
- Added Internet Group Management Protocol (IGMP) version 1 and 2.
- Added new socket options:
      * IP_MULTICAST_TTL changes IP "time to live" (TTL) value for outgoing
         multicast datagrams.
      * IP_ADD_MEMBERSHIP joins the socket to the supplied multicast group
         on the specified interface.
      * IP_DROP_MEMBERSHIP drops membership to the given multicast
        group and interface.
- Added new configuration parameters:
      * FNET_CFG_CPU_ETH_PROMISCUOUS enables/disables the Ethernet
         interface promiscuous mode.
      * FNET_CFG_CPU_ETH_FULL_DUPLEX enables/disables the Ethernet
         interface full duplex mode.
      * FNET_CFG_MULTICAST enables/disables the multicast group support.
      * FNET_CFG_MULTICAST_MAX defines the maximum number of unique
         multicast memberships may exist at the same time in the whole system.
      * FNET_CFG_MULTICAST_SOCKET_MAX defines the maximum number
        of multicast memberships may exist at the same time per one socket.
      * FNET_CFG_IGMP enables/disables the Internet Group Management
         Protocol (IGMP) support.
      * FNET_CFG_IGMP_VERSION defines version of the Internet Group
         Management Protocol (IGMP).
      * FNET_CFG_LOOPBACK_MULTICAST enables/disables the local loopback
        of multicast datagrams.
      * FNET_CFG_LOOPBACK_BROADCAST enables/disables the local loopback
         of broadcast datagrams.
      * Old FNET_CFG_LOOP_xxx parameters renamed to FNET_CFG_LOOPBACK_xxx.
- Added possibility to choose default multicast interface for outgoing multicast packets,
  for hosts with several network interfaces, in FNET Throughput Benchmark tool.
- Fixed issues in Kinetis Flash and UART drivers.
- Many other minor changes/fixes.

 

Thank you,
Andrey Butok

0 Kudos
1,256 Views
TOMXUE
Contributor II

Dear butok:

 

I want to test the benchmark of MCF52235 based board, I add the following line in the file of fapp_user_config.h

 

/* "bench" command.*/
#define FAPP_CFG_BENCH_CMD (1)

 

but the compiler tell me need IP_ADD_MEMBERSHIP in fapp_bench.c

 

I can not find the define of IP_ADD_MEMBERSHIP.

 

Would you please give some help?

 

Many thanks,

Best regards,

Tom

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Tom,

 

>>I can not find the define of IP_ADD_MEMBERSHIP.

 

This is Socket IP-layer option that is available only when enabled the multicasting.

The FNET provides the Benchmark application only for Kirin3 and Kinetis.

But you may try to create the benchmark application for MCF52235 by yourself.

For this please reuse parameters settings (except MCF52235-specific) from fnet_user_config.h and fapp_user_config,.h of provided benchmark applications.

 

Best regards,

Andrey Butok

0 Kudos
1,256 Views
Mohsin455
Contributor IV

Hi All,

 

             Can anyone please provide me the changes required for the IAR linker file intflash.icf to work with MQX 3.8?

 

Regards,

Mohsin

 

 

0 Kudos
1,256 Views
freescale_sid
Contributor I

Hi All,

 

           I am using FNET 1.2.2 and MQX 3.8. I have noticed that the SPI clock rate is lower when I bootload (TFTP) a new application using FNET. During powercycle without TFTP the clock is at correct value.

 

Do we have to disable or reiniitlaise any clock/modules when jumping to MQX application ?

 

Thanks,

Sid

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Sid,

 

The FNET does not use SPI. So you may set-up it the way you like, without any damage to the FNET functionality.

BTW: I believe that MQX or any other OS should set all required settings/parameters in its startup code and not to rely on some default settings.

 

Best regards,

Andrey Butok

0 Kudos
1,256 Views
freescale_sid
Contributor I

Hi Butok,

 

                     Thanks for your reply. The MQX does set all the required setting and it works correctly if we run the MQX application on its own or even with FNET without TFTP i.e. without downloading a new image through TFTP.

 

So I think its to do with clock setting.

 

It might be similar to the one reported in the following

 

https://community.freescale.com/thread/109784

 

Any advise please.

 

Thanks,

Sid

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Sid,

 

Based on it, I guess, that MQX is expecting that some registers (clock ones) have default/”HW reset” values, what is not 100% true in case of using it with a boot-loader.

 

Best regards,

Andrey Butok

0 Kudos
1,256 Views
freescale_sid
Contributor I

Hi Butok,

 

                 Thanks for you reply. One thing will be useful to know is what initialisation is done when TFTP is started. This will help me narrow down the issue quickly (I can look into the code but you might know if something is initialised in a different way when TFTP is started).

 

As I said before the FNET without TFTP works fine.

 

Regards,

Sid

 

 

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Sid,

 

The TFTP does not do any HW initializations or changes :smileywink:

 

The main HW initialization is placed in application start-up code. In case of the FNET demo application, you can find it in fnet\fnet_demos\common\startup\startup_mk60n512

As you are interested in clock settings, you may look at sysinit.c and mcg.c files.

 

BTW: If you will change clock settings (to other than default), please be sure that the FNET_CFG_CPU_CLOCK_HZ set to correct value (used by Timer, UART and Eth).

 

Best regards,

Andrey Butok

0 Kudos
1,256 Views
Mohsin455
Contributor IV

Hi,

 

      I am using K60N512 and IAR 6.30.1.  and FNET 1.22. When I try to upload the image from the Target to the PC using either TFTP server or TFTP client, I am getting the following after uploading 1082 blocks

 

****default_isr entered on vector 3*****

 

I get this error only on PK60DN512VMD100 (0M33Z)

 

It works fine on a new version of Flash i.e. MK60DN512ZVMD10 (4N30D)

 

Anyone else noticed this ?

 

Thanks,

Mohsin

0 Kudos
1,256 Views
Mohsin455
Contributor IV

Hi All,

 

            Is there any way to protect the FNET bootloader so that, it can only be overwritten using the JTAG ?

 

Thanks,

Mohsin455

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Just FYI.

        The "FNET Throughput Benchmark tool" is open-source now (originally was provided with FNET as the utility application)

        The FBENCH project home-page is http://fbench.sourceforge.net

 

FBENCH 2.0.0 released (http://fbench.sourceforge.net):
- First open-source version.

- Added IPv6 support.

- Removed the IPv4 TOS parameter, as it is not functional with Windows .NET.

- Many other internal changes.

 

Best regards,

Andrey Butok

0 Kudos
1,259 Views
hmhr
Contributor I

Hi,

 

just a quick note to say thank you very much for releasing this version with Codewarrior 10.2 support so quickly. I'll start using it ASAP.

 

One additional question though. Would it be ok to use it with CW 10.1? Any specific things I should be aware of in doing so?

 

Any clarification is welcome.

 

Thanks, regards.

0 Kudos
1,259 Views
butok
NXP Employee
NXP Employee

Hi,

 

I have tested it with 10.2beta, and going to retest it with CW10.2 official release (please do not ask when - expecting soon).

It should work with CW10.1 (not tested personally, but some customers did it),

of cause if you are personally OK with 10.1 :smileywink:

 

Best regards,

Andrey Butok

0 Kudos
1,257 Views
gustavod
Contributor III

Hi Andrey,

 

At first i would like to congratulate you for this great project.

 

I'm trying to use the shell demo of FNET for the TWR-K60N512 kit on CodeWarrior 10.2. The project is compiling and shell is working. However, the only feature of TCP/IP demo working is the DHCP. DHCP works like a charm, in the same way it work in my PC. Unfortunatelly, i can not ping the board neither access the http and telnet servers.

 

All i can say is that there are a lot of RX packets and almost none TX packets. Is there any debug method that i can apply in order to verify key pointer of the stack operation?

 

Best regards,

Gustavo Denardin

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Gustavo Denardin,

 

Yesterday, I have installed the CW10.2 Final Release. And I was surprised, - none of the CW10.2 Kinetis demos do not work with CW10.2 Relaese (but worked with my CW 10.2 Beta).

Fortunately the issue is located & fixed.

I will do the FNET 1.2.2 release today/tomorrow.

 

BTW: If even after 1.2.2 release you will have the issue, please write me directly Andrey.Butok@freescale.com and we will try to investigate what is wrong in your case.

 

Thank you,

Andrey Butok

0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

FNET 1.2.2 released (http://fnet.sourceforge.net):

- Fixed wrong behavior, using CodeWarrior 10.2 Final Release for Kinetis platform.
- Fixed value of MII speed register, which may be cause of wrong PHY-address detection and wrong connection status.
- Removed the remaining platform-independent Ethernet logic from FEC driver.
- Deleted "useless" length and pad fields from the socket-address structure.
- The connect() function now returns FNET_OK instead of the FNET_ERR_AGAIN error (which is actually is not error).
- Added "cookie" parameter to the timer-event handler.
- Other internal changes.

 

FNET1.2.1 change log:
- Added new configuration parameters:
      * FNET_CFG_IP_OPTIONS enables/disables processing of IP options.
      * FNET_CFG_TCP_URGENT enables/disables TCP urgent data processing.
- Done different code-size optimizations.
- Enabled the multicast functionality for the Kinetis FEC driver.
- Moved the loopback logic from FEC driver to the Networking layer.
- Renamed fnet_ip_addr_t to fnet_ip4_addr_t.
- Added FNET_IP4_ADDR_STR_SIZE and FNET_MAC_ADDR_STR_SIZE that define maximum size of null-terminated ASCII string representing IPv4 and MAC address.
- Deleted not thread-safe fnet_strok() function. It is recommended to use fnet_strtok_r() instead of it.
- Added "FNET Demo Applications" and "Standard library API" chapters to the User Documentation.

 

P.S.
        Starting implementation of IPv6.

 

Thank you,
Andrey Butok

0 Kudos
1,256 Views
Skyhawk
Contributor I

I have a question about clock frequencies:

 

For fnet:

 

/* System frequency in Hz. */
#ifndef FNET_CFG_CPU_CLOCK_HZ
#define FNET_CFG_CPU_CLOCK_HZ (96000000)
#endif

 

on the K60 tower 96000000 is specified, while a 50Mhz clock is provided (if I'm not mistaken), while in my MQX configuration I find:

 

#define BSP_CLOCK_SRC (50000000UL)
/* reference clock frequency - must be 2-4MHz */
#define BSP_REF_CLOCK_SRC (2000000UL)

 

Everyhting looks like it's working ok, but I was wondering how this difference in configuration is explained?

Should I change the fnet config to:

 

#define FNET_CFG_CPU_CLOCK_HZ (50000000UL

 

 ?? 

Will it be slower? more stable? different somehow? I'm I missing a divider? What goes on here :smileyhappy:

 

Greetings,

 

Jan



0 Kudos
1,256 Views
butok
NXP Employee
NXP Employee

Hi Jan,

 

>> Should I change the fnet config

 

Why you want to change if it works :smileywink:

The answer is NO, - If you are using applications delivered with FNET project (without modifications).

 

The FNET uses it as the reference value for correct initialization of TIMER and UART modules.

BUT – the CPU Initialization (including its clock module) is part of application code or RTOS.  

 

You should change FNET_CFG_CPU_CLOCK_HZ in case your application has different CPU start-up code that sets different CPU clock (it is out of scope of the FNET project).

 

Best Regards,

Andrey Butok

0 Kudos