Hai Andrey Butok,
I am also looking for the same but using K60. Actually my application is to develop a deterministic Ethernet switch. I want to receive each Ethernet frame and check the type of frame then pass that frame or Discard according to the type of frame field in that frame..I Will not be dealing with Upper layer protocols..So I think, For me also MQX RTOS is not required. One more thing is, I need more speed for processing the frames and passing it(at least 100mb/s)..So I Worried that if I am using MQX I will not be able to get maximum utilization of controller since MQX also will be running some threads in back-end..Can i utilize the codes which you mentioned above for for K60) also..Please tell me if you have any example code for this application..
>Can i utilize the codes which you mentioned above for for K60) also..
Yes. All Kinetis MCUs use the same Ethernet module, so they share the same driver
>I want to receive each Ethernet frame and check the type of frame then pass that frame or Discard according to the type of frame field in that frame.
You may put your "filter" code to the Ethernet-driver input function:https://sourceforge.net/p/fnet/gitcode/ci/master/tree/fnet_stack/cpu/common/fnet_fec.c#l453
This file is covered by:
#if FNET_CFG_OS && FNET_CFG_OS_UCOSIII && FNET_MCF && FNET_CFG_OS_ISR
These all parameters are 0 by default. It look like you have a mess.
Anyway you may remove OS-specific files from you project.
BTW:
Please upgrade to CW10.6 and use the project from \fnet\fnet_demos\mk60n512\shell\cw10.6 as a reference to save time.
FNET is not supported by Freescale, so better to use the FNET dedicated forum:FNET - Embedded TCP/IP Stack / FNET User Forum / Discussion
Hi Andrey, Thanks very much!
If I understand I need to initialize the ethernet and the timer module for fnet. Right?
There are some examples of initialization of ethernet module on k64?
1. You can look inside Ethernet module initialization here:
FNET - Embedded TCP/IP Stack / Code / [19205a] /fnet_stack/cpu/common/fnet_fec.c
2.There is one more source for you - KSDK: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KDS_IDE
Hi Andrey,
I want to add fnet stack in my project. Wich are the configuration of fnet_user_config.h to set for kds and mk64fn1m?
The how to guide for the other parts is equal to CW?
Best Regards!
Alessio
Hi Alessio,
Use configuration parameters from existing examples for KDS, for example fnet\fnet_demos\mk64fn1m\shell\kds2.0:
#define FNET_CFG_COMP_GNUC | (1) |
#define FNET_CFG_CPU_MK64FN1 (1)
If some issues, you have always the reference.
Best regards,
Andrey
If I use the frdm and so I do a flash build with openSDA I have to activate interrupt? Which peripheral use the stack in mk64 for timer? wich other interrupt I have to activate? I have to add this on startup_MK64FN...S?
Sorry for the questions but I have to undertand how work the stack
Best regards,
Alessio
>Which peripheral use the stack in mk64 for timer?
PIT
>wich other interrupt I have to activate?
FNET uses Timer and ENET RX interrupts.
> I have to add this on startup_MK64FN...S?
Not needed. It is done by FNET ENET and Timer drivers during initialization.
You should have general startup and clock initialization (may reuse from FNET examples).
Thanks Andrey, I have two errors while build the stack:
Description | Resource | Path | Location | Type |
make: *** [K64-ETH.elf] Error 1 | K64-ETH | C/C++ Problem | ||
undefined reference to `__VECTOR_RAM' | fnet_mk_isr_inst.c | /K64-ETH/Sources/fnet_stack/cpu/mk | line 58 | C/C++ Problem |
undefined reference to `fnet_mk_irq_enable' | fnet_mk.c | /K64-ETH/Sources/fnet_stack/cpu/mk | line 75 | C/C++ Problem |
how can I solve it?
Sorry for the continuous questions but now I have this problems:
Description | Resource | Path | Location | Type |
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 266 | C/C++ Problem |
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 256 | C/C++ Problem |
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 261 | C/C++ Problem |
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 251 | C/C++ Problem |
make: *** [Sources/fnet_stack/cpu/mk/fnet_mk.o] Error 1 | K64-ETH | C/C++ Problem | ||
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 246 | C/C++ Problem |
stray '\' in program | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 241 | C/C++ Problem |
expected identifier or '(' before '.' token | fnet_comp_asm.h | /K64-ETH/Sources/fnet_stack/compiler | line 240 | C/C++ Problem |
how can I solve it?
Hi
If you configure the Ethernet controller and send data using its buffer descriptors you don't need to use any OS.
You can take existing initialisation code (also from projects using OS) as base since it has nothing to do with the OS itself.
Depending on what type of data you want to send you may need to develop a number of protocols to go on top of it though, which may take a month or two of work to achieve some basic operations to be compatible in a network. For a reasonable level of Internet protocol compatibility you may need to plan for 6 months to a year or two. During the work you may however decide to use an OS to simplify the management of the tasks and achieve reliability.
If you need just fairly simple TCP/IP you can take something like OpenTCP which doesn't include any OS or file system support: http://sourceforge.net/projects/opentcp/
You can also take LwIP without MQX and add your own scheduling and file system (if needed).
Regards
Mark