- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone.
A design I am working on just now uses PSoC5 as the main processor.
The client would like to add basic ethernet functionality to the system. In other words, they would like to be able to connect to a server socket on the system and have a basic command and control interface. An embedded webserver is NOT required.
So, what methods have you all used for adding ethernet functionality to PSoC designs?
Should I use something like a PIC18F and connect it to the PSoC with something like I2C?
Any other suggestions / ideas?
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kenny,
As of now PSoC3/5 does not have an ethernet implementation/component. However it is possible to implement the MDIO(Magement Data Input/Output) protocol using the UDB and Data[ath tool and interface PSoC3 with an ethernet PHY chip.
-Udayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi kmmankad,
Can you describe what you are trying to do? Can you provide more information. What issue are you facing with SPI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a series of articles describing how to connect an ethernet controller to a PIC like micro. The controller is a Microchip ENC28J60 it's quite simple to connect and to manage trough SPI interface. The article also include the complete code to create a set of C functions to handle proper initialization of MAC, PHY layers (fully managed by ENC28J60) and to manage other layers, ARP, IP and TCP, ICMP. I'm going to adapt it to Cypress PSoC. After this I'll update the article and post an application note. Any help is appreciated of course.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ michelesantucci : Hows that ethernet project coming along? I finished the hardware layer(basic SPI driver functions) some time back,but havent got around to debug the networking part of the code yet,since I was using an FTK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Redpine Signals is releasing a PSoC3/5 Wi-Fi Solution soon, if you can connect that way...
http://www.redpinesignals.com/cypress/
It looks like their reference design includes both SPI and UART interfacing...
regards,
Tom Moxon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There examples of porting the uIP tcp/ip stack from Adam Dunkels, to a microcontroller.
This was specifically developed run on microcontrollers and to use up very little memory.
This code includes Apps such as dhcpc, hello-world, ntpclient, port_app_mapper,resolv, simple-httpd, smtp, telnetd, udpds, webclient, and webserver.
http://code.google.com/p/avr-uip/source/browse/trunk/#trunk%2Fdoc
or
http://code.google.com/p/uhttpd-avr/
These are designed to run on an Atmel AVR micro, but can easily be adapted to run on PSoC 3 or 5.
The Stack code can be left as is, and just the driver code needs to be modified for the PSoC SPI, and differences in type definitions and port access.
They contain dirvers for the Micrel KSZ8851 or the Microchip ENC28J60 ethernet chips. Both these chips use an SPI interface, and take up very little board space, and only a few IO pins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can look here: http://www.cypress.com/?app=forum&rID=64914 for how to connect an ENC28J60 to a PSoC3 - thanks to kmmankad for that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to expand beyond simple connectivity, or multiple ports,
Micrel has a number of solutions -
http://www.micrel.com/page.do?page=product-info/ether_over.jsp
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am unable to use this project for a PSoC 5 design. Can you advice me on the changes needed for use with PSoC 5?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just an FYI, you should be posting in POSOC 5 forum.
As far as use PSOC 3 design in PSOC 5 device, port it ?
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Dana.. this is the first time i will be doing something like changing a PSoC3 code to PSoC 5. Can you help me on how to do it? what all should i watch for? Can you point me to some documentationregarding this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To change the device the first approach will be to really do the change (under Project -> Device Selector) and watch for messages displayed. I Suppose when switching from PSoC3 to PSoC5 LP (watch the LP!) the only thing you'll have to care for is the Endianess in DMA and some of your own constructs where that might be encountered.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found a good reference here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally... ported kmmankad's code to PSoC5 🙂 ( a few days back actually) ... Webserver and UDO are working... Can someone help me with "How to share" the project here so that its useful for somebody else like me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally... ported kmmankad's code to PSoC5 🙂 ( a few days back actually) ... Webserver and UDP are working... Can someone help me with "How to share" the project here so that its useful for somebody else like me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use "Create Workspace Bundle" function in Creator file menu, and post using attach file at bottom of
post window. Chrome apparently has problems, so use IE, Mozilla.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for this work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to kmmankad in fact... he started it all 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's another spin on the ENC28J60 Ethernet chip for PSoC5.
This one is based on the lwip-1.4.1 stack by Adam Dunkels, with thanks to kmmankad for his work on the low level driver.
SPI is running at 11MHz connected to an Olimex ENC device. Datasheet says 20MHz max., I haven't been able to push the frequency any higher and my little soft-scope is starting to buckle beyond 10Mhz. Suggestions welcome.
Currently the stack is working and has both static and dynamic IP configuration through DHCP.
The only tidbit missing in the low level driver is link detect; it's currently hardwired to up.
Bonus feature: printf is routed to URT serial component through sys_stub.c
Here's the project link: github.com/lrds/lwip-psoc5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone ported Contiki to PSoC 5. It seems uIP and lwip-1.4.1 stack by Adam Dunkels are only now fully supported by having the Contiki OS.
I was able to port uIP to PSoC 5 for use with the Micrel KSZ8851SNL Ethernet Controller.
Now I am attempting to port the full Contiki but it is more of a challenge due to the existing porting documentation for Contiki.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was my ambition too,to port Contiki to the PSoC.I would be glad to work with you on that.Hows the work stand currently? I havent gotten much done in that direction,but I have a general idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hopefully you have Vargas's email address, as I would posit he may no
longer be looking at a 2 month old thread.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi pavloven,
I am using your program send.zip and not able to understand this error. "lwip-1.4.1\src\core\ipv4\ip.c:41:22: fatal error: lwip/opt.h: No such file or directory
#include "lwip/opt.h""
please help me to solve this. thank you and i am using psoc creator 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@pavloven: Sorry for not getting back to you sooner.
Looks to me like you're trying to send 1024 bytes but your send buffer is only 48 bytes long.
Either enlarge the snd_buf to 1024 or call tcp_write with a length of 48 and stick that into a loop.
Either way feel free to mail me directly if you have more questions. I don't come here on a regular schedule 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@pavloven: There's also the possibility to study the example under "contrib-1.4.1\apps\tcpecho_raw\echo.c".
That should serve as a good starting point for you. Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to complete a Product using PSoC 5 and Contiki. http://t3innovation.com/netprowler
I needed to switch dynamically between IPv4 and IPv6 modes, so I eliminated the conditional compiles with #if UIP_CONF_IPV6, and replaced it with a variable which selects between the two at runtime. This involves creating a separate uip_ip6addr_t and uip_ip4addr_t in place of uip_ipaddr_t. Also some connection structures which used uip_ipaddr_t had to be duplicated and renamed as for example uip_conn6 and uip_conn4.
One thing I found is that for IPv6 to work properly the Ethernet chip must pass all multicast addresses. This is because in addition to your own MAC address, several multicast MAC address are used for Neighbor Discover Protocol which is built into IPV6.
Also Contiki calls your Ethernet driver with a null instead of a Mac address, if the address is a Multicast Mac address. Therefore the driver needs to detect this and make up the correct destination mac address which consists of 33:33::00:00:00:00 added with the lower 4 bytes of the destination IP address.
I hope this helps someone else trying to accomplish the same thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello to All
I Am Glad to Read hear . But All The Commant is BAsed on the PSOC3/5 .
I have PSOC4 Module . and Try to communicat with Enc26j60 IC . First I want to just Set the IP To the Entehr IC . and I can Ping to The Module by my local PC IP Which is already Connected In LAN .
Then I want to Transfer the Data by The Ethernet to PC By any Protocol like TCP or UDP.
So please Help For PSOC4 Code for the Erthernet Module .
Looking for the healthy Relationship
Best Regards to all
Brijesh Gohel
+91 9033344829
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These might be of assistance (especially the 3'rd link) -
http://www.cypress.com/?app=forum&id=4749&rID=99353
https://hackaday.io/project/2538-Cheap-ENC28J60-%2B-PSoC-4-Connect-Device
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it depends on your final result,
If you are looking for a low cost final product, you probably want all your Ethernet software running on the same PSoC device, and just use SPI to interface with your Ethernet chip.
On the other hand if you just want connectivity, and cost is not an issue, using a somewhat expensive Ethernet module will work fine and get you going more quickly.
If you are cost sensitive, I would still go with a PSoC 3 , PSoC 5 or the new PSoC 4 with BLE, because they have more memory than a standard PSoC 4.
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manojr_cet thank you for sharing project. I have a question for you. When I want to build big homePage(I mean datalen>3000) it is giving error in MACWrite function. When I am reading Read TX status vectors it says "TX was interrupted". Can you help me for that ?
Thanks
Alptigin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Let me know if you need ASIC verification engineeers with expertise in PSoCs and ethernet. I have worked on PSoCs ~5 years. And Ethernet 3+years. And System Verilog /UVM for 3+ years.