Jump to content
43oh

Recommended Posts

Actually my goal was a kind of "internet of things" operating system, basically the same as what Contiki appears to be aiming for. I want to try some experiments with distributed operating system / collective sensor intelligence design as well.

 

I am currently playing with something similar. Not as ambitious as your project sounds, just a simple way of collecting information from various sensors that I can place around the house. I have been mainly focusing on the sensor side, which I envision being MSP430-based due to the very low power usage.

 

I agree that IPv6 appears to be the future, but I am not sure if it will be able to beat proprietary standards like Bluetooth and Zigbee. For that reason my next step after Ethernet was going to be to add Bluetooth Low Energy support. Now I am undecided on that.

 

IPv6 by itself does not really help sensors communicate, and for very low power things I think it is quite overkill. Most sensors won't hardly receive any data besides what is needed for configuration.

While I haven't looked into Zigbee or Bluetooth Low Energy, my first guess is that they are quite expensive to get started with. Currently I'm playing with some cheap CC2500 modules where my goal is to achieve extreme power efficiency by allowing the sensor only to power up the radio circuitry once every 5 minutes or even less frequent.

Having briefly read the IEEE 802.15.4 standard, I think it might make sense to implement parts of it on MSP430 chips using CC2500 modules. But for now I'm just playing around with some custom stuff to gain a bit of experience.

 

Oh, and maybe we should move any further wireless/sensor discussion to a new thread :-)

Link to post
Share on other sites
  • Replies 107
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi, After a couple of hours of work porting the enc26j80 driver from my own mini ipv6 stack to uip, I have my enc28j60 booster pack working with the Stellaris Launchpad. The current example code i

Ok, this took a bit longer than I had anticipated, and there is a lot of room for improvements. I extended the example as suggested by BlueHash to be able to read and toggle the GPIO-pins via a web-b

hi,  i tried enc module but froze on "wainting for ip" Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6

Posted Images

  • 2 weeks later...

Wow this looks great, and exactly what I was looking for :)

 

I have been successfully using the ENC28J60 chip with an AVR for a while, but wanted to try to get my new stellaris launchpad working.

 

It looks like the source code attached is setup to be compiled with a linux GCC toolchain, is that correct?

 

Right now I only have the CCSv5 toolchain on windows working. Can this source code be imported into a CCS project easily? Anyone have any hints or links to tutorials on that type of import / compile process?

 

Thanks in advance,

 

Sokkou

Link to post
Share on other sites

It looks like the source code attached is setup to be compiled with a linux GCC toolchain, is that correct?

 

That is correct. I ought to make it toolchain independent, as that shouldn't be too difficult. The general structure of the code is not too good at this point, as it was just a proof of concept. But I'll try to fire up CCSv5 and see what I can do about it.

Link to post
Share on other sites

Hi xpg,

Thanks. I would appreciate any info or conversion you have time for.

 

I just had a brief look at this, and I haven't quite succeeded yet. Unfortunately, I don't have more time to look at right now.

A few hints that got me some way: The TI ARM compiler does not support C99, meaning that there are a couple of invalid for-loops, where variable declaration has to be moved before the for-loop.

UIP uses vararg preprocessor macros, so the TI ARM compiler has to be told to support gcc extensions.

 

I'll have a second look at it when I get some time for it.

 

Cheers,

Paul

Link to post
Share on other sites

I've been trying to convert as well (wasted several hours). I kept getting errors about not being able to find files until I did a TON of preincludes. CCS seems to choke on common.h being included everywhere. The compiler also couldn't find the defines used by GPIOPinConfigure (although I could find them in pin_map for the correct part).

There are also issues with the time.h library used, issues with printf and debug_printf statements...

 

This one is way over my head unfortunately. Even if I did manage to find all the compile errors, I doubt I'd be able to troubleshoot effectively.

 

Maybe someone has already converted lwip or uip for CCS? I haven't had any luck yet. Even though TI includes uIP in some of the stellarisware files - specifically FreeRTOS, none of the examples are built for CCS (from what I can tell).

I found a FreeRTOS project for CCS, but it didn't include the uIP files.

Link to post
Share on other sites

I've been trying to convert as well (wasted several hours). I kept getting errors about not being able to find files until I did a TON of preincludes. CCS seems to choke on common.h being included everywhere. The compiler also couldn't find the defines used by GPIOPinConfigure (although I could find them in pin_map for the correct part).

 

There are also issues with the time.h library used, issues with printf and debug_printf statements...

 

I used include directories instead of preincludes, which worked. Also, I had to define the following macros: TARGET_IS_BLIZZARD_RA2, PART_LM4F120H5QR, and UART_BUFFERED. PART_LM4F120H5QR should fix the GPIOPinConfigure defines.

 

This one is way over my head unfortunately. Even if I did manage to find all the compile errors, I doubt I'd be able to troubleshoot effectively.

 

I actually got it compiling now. I can even make it somewhat run -- however something crashes when trying to access the web-page.

I've committed the code to github. There are two eclipse variables that must be changed in order for it to compile. When the project has been imported, go to the properties and select "Resource->Linked Resources" on the left-side pane. Edit the SW_ROOT variable such that it points to the root of the Stellaris support files (which contains the 'driverlib', 'tools̈́', etc, subdirectories)..

Still in the properties view of the project, select 'Build' in the left-side pane. Next, select the "Variables"-tab on the right-side pane. Edit the SW_ROOT variable and point it at the same directory as the other SW_ROOT variable.

Now it should compile and link. But as I said, it's not running perfectly.

 

Please let me know if it work for you

 

Maybe someone has already converted lwip or uip for CCS? I haven't had any luck yet. Even though TI includes uIP in some of the stellarisware files - specifically FreeRTOS, none of the examples are built for CCS (from what I can tell).

I found a FreeRTOS project for CCS, but it didn't include the uIP files.

 

To be honest, having a compiler than does not work with C99 is a major pain. I'll stick with GCC, that's for sure.

Link to post
Share on other sites

Yep - just found that about an hour ago. I've actually got a project running now. Now I'm running into another issue - but I'm guessing this one is hardware? I'm not getting anything back from the device - anybody know what the pin connections should be (I'm just using a simple BOB from eBay, not the booster)?

Here's what I've got:

 

CS     B5
INT     E4
SCK     B4
SI     B6
SO     B7
RST     ?
CLKOUT     ?

 

RST is active low. I know MSP430 is active high for reset, so I've got this pulled to V+ for now, assuming that putting the device on the RST pin for the board wouldn't work.

Link to post
Share on other sites

Yep - just found that about an hour ago. I've actually got a project running now. Now I'm running into another issue - but I'm guessing this one is hardware? I'm not getting anything back from the device - anybody know what the pin connections should be (I'm just using a simple BOB from eBay, not the booster)?

Here's what I've got:

 

CS B5
INT E4
SCK B4
SI B6
SO B7
RST ?
CLKOUT ?

 

RST is active low. I know MSP430 is active high for reset, so I've got this pulled to V+ for now, assuming that putting the device on the RST pin for the board wouldn't work.

 

I think MSP430 is active low same as the ENC28j60 (meaning the device is in a non-reset state when high). At least I have wired the ECN28j60 to MSP430 RST-pin on my boosterpack, and it works.

CLKOUT does not need to be connected. Have you tried changing SI and SO around? I though SO is on PB6 and SI is PB7, but I haven't double checked.

Link to post
Share on other sites

Yep - I had SO/SI swapped. I double-checked what I had written down against how it was wired - it's working now!

 

I'm not having any issues with the demo application - it's working great. I did define TARGET_IS_BLIZZARD_RA1 instead of TARGET_IS_BLIZZARD_RA2 because that's what's used in the USB demo. I also increased stack space to 1024 because it was ending up in a faulted state.

Link to post
Share on other sites

Yep - I had SO/SI swapped. I double-checked what I had written down against how it was wired - it's working now!

 

I'm not having any issues with the demo application - it's working great. I did define TARGET_IS_BLIZZARD_RA1 instead of TARGET_IS_BLIZZARD_RA2 because that's what's used in the USB demo. I also increased stack space to 1024 because it was ending up in a faulted state.

 

Great. I probably got bitten by the stack size when I tried it.

Link to post
Share on other sites

@cubeberg - can You confirm connections on "nonbooster" enc board?

CS - B5 (J1.02)
INT - E4 (J1.05)
SCK - B4 (J1.07)
SI - B6 (J2.07) - (or D0 - J3.03)
SO - B7 (J2.06) - (or D1 - J3.04)
RST - RESET (J2.05)

 

@xpg - spi memory on Your booster pack is necessary and used?

and without this the project will work?

Link to post
Share on other sites

@xpg - spi memory on Your booster pack is necessary and used?

and without this the project will work?

 

The SPI memory is not necessary on the Stellaris Launchpad. Originally, the board was made for the MSP430 Launchpad. The beefiest MSP430 G-series MCU is the MSP430G2553, which has 512 bytes of RAM.

In order to do anything nearly useful I added the SPI SRAM to be able to implement TCP.

For the example code it is not needed at all.

 

 

I am in the process of designing revision 2 of the booster pack. The plan is to make it publicly available -- not sure how, or in what form (kit, fully assembled, or partly assembled), if there is an interest in it..

The goal is to make the board a bit smaller and make the SRAM CS configurable (current assignment clashes with the CC2500 Booster Chip Select), and make it possible to have ENC28J60-reset on a GPIO-pin.

 

Any other suggestions for the second revision?

 

Cheers,

Paul

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...