Skip to content

drivers: add cc2420 support (based on #5314)#5591

Merged
kYc0o merged 9 commits intoRIOT-OS:masterfrom
kYc0o:cc2420_driver
Jul 6, 2016
Merged

drivers: add cc2420 support (based on #5314)#5591
kYc0o merged 9 commits intoRIOT-OS:masterfrom
kYc0o:cc2420_driver

Conversation

@kYc0o
Copy link
Copy Markdown
Contributor

@kYc0o kYc0o commented Jul 1, 2016

This is a reworked version of #5314 with code reorganisation and netdev2 compliant.

The code was tested in a z1 board, please feel free to test it on telosb and wsn430-v1_4.

Communication works for L2 messages with short and long addresses, but IPv6 messages are discarded, so that's why it's WIP.

One major bug is that when dev->netdev.proto = GNRC_NETTYPE_SIXLOWPAN; is enabled random messages are received from random kernel PIDs.

@kYc0o kYc0o added Area: network Area: Networking State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR Area: drivers Area: Device drivers GNRC labels Jul 1, 2016
@kYc0o kYc0o added this to the Release 2016.07 milestone Jul 1, 2016
@kYc0o kYc0o removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Jul 1, 2016
@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 1, 2016

IPv6 messages are being received now, so no more WIP. However the spurious messages still coming, but apparently they don't bother other threads.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

I tried with a Z1 and a SAMR21-Xpro. Link layer communication (unicast and broadcast) seems to work fine in both directions. 👍

However, trying to ping the Z1 running gnrc_minimal from SAMR21 with gnrc_networking doesn't work. Also, the L2 address doesn't seem unique, but probably the MSP430 doesn't provide CPUID, right?

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

After testing on wsn430-1_4 board I found that the UART0 and SPI share the same buffer, thus it conflicts while initialising the driver. An issue #5599 is open for this

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

In order to ping devices using gnrc_minimal you need to disable IPHC with something like ifconfig 7 -iphc.

For the address yes you're right, MSP430 does not provide CPUID.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

Ah, I should have known this myself. :)

Confirmed working.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

and ACK :P ?

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

Lemmy quickly look at the code.

endif

ifneq (,$(filter cc2420,$(USEMODULE)))
USEMODULE += cc2420
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, it was also used with at86rf2xx so I added it, but you're right, it's not required. Should I remove it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for the at86rf2xx USEMODULE check is that the driver is checking
for a wildcard and then adding the generic driver if it matches. The
at86rf2xx driver supports the rf231, rf233, rf212b, (possibly more), and is
written in a way that it relies on USEMODULE to tell it which hardware it
should expect.
Den 5 jul 2016 12:33 skrev "kYc0o" notifications@github.com:

In drivers/Makefile.dep
#5591 (comment):

@@ -32,6 +32,21 @@ ifneq (,$(filter cc110x,$(USEMODULE)))
endif
endif

+ifneq (,$(filter cc2420,$(USEMODULE)))

  • USEMODULE += cc2420

Oh yeah, it was also used with at86rf2xx so I added it, but you're right,
it's not required. Should I remove it?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RIOT-OS/RIOT/pull/5591/files/ffd03d77950ecaa2210bc2efb066a12ad9728cfd#r69541037,
or mute the thread
https://github.com/notifications/unsubscribe/AATYQl9hCQ81LrCAtqWHIs1iLu4Rowqzks5qSjL7gaJpZM4JDOnR
.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah once I analysed I saw that, thanks for the explanation. Now USEMODULE += cc2420 it's removed.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

Shouldn't be ece96d7 and b2def4a be squashed?

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

Apart from the minor comments: ACK.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

Yes I can squash those commits, remove wsn430-v1_4 and add it when #5599 is solved.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

Squashed and waiting for Murdock. I removed the USEMODULE += cc2420 can you check once more if everything works fine?

@kYc0o kYc0o added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 5, 2016
@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 5, 2016

Confirmed, still working. ACK holds.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 5, 2016

Murdock failed because telosb wasn't in some memory insufficient lists for some tests. Fixed and Murdock restarted.

@emmanuelsearch emmanuelsearch removed the Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR label Jul 5, 2016
@kYc0o kYc0o force-pushed the cc2420_driver branch 4 times, most recently from 3b2c136 to c89279d Compare July 5, 2016 17:36
@thomaseichinger
Copy link
Copy Markdown
Member

thomaseichinger commented Jul 6, 2016 via email

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Sorry, I restarted it too quickly... It was about the cortex_m3 family, there was "no more space left on device" while compiling some unit tests.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Same error again... @kaspar030 can you take a quick look into that? I'm afraid there's really no more space left on Murdock or something similar...

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 6, 2016
@kaspar030
Copy link
Copy Markdown
Contributor

hmm. murdock still has almost 16gig on that drive. I'll watch it a little.

@kaspar030
Copy link
Copy Markdown
Contributor

Yep, the ramdisk is getting full. Every package get's checked out ~40 times, so if more than four tests using packages get's built, there's no space left. I'll think of something.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Ups... sorry for break Murdock, if I can do something on it just let me know :)

@kaspar030
Copy link
Copy Markdown
Contributor

@kYc0o please help quicktesting #5610. :)

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Great! doing it now!

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 6, 2016
@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Let's see if #5610 works ;)

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

Yeeeeeah!!! Murdock rules! Maybe it's needed to squash the doc fix?

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 6, 2016

Yes, please squash and then merge as soon as Murdock confirms again.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jul 6, 2016

And GO!

@kYc0o kYc0o merged commit 2cbc8fb into RIOT-OS:master Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants