spi_sam3x/cc2520 of zephyr


Hi Sir,

I find that, the spi_sam3x driver has been merged into zephyr v1.3.0.
This means that someone is maintaining or contributing to spi_sam3x driver
of arduino_due.
This is a good thing to me, because I am using arduino_due to build 6lowpan
board router with spi_sam3x and cc2520.
But after checking the driver code, I have got some depression, because it
doesn't work.

Meanwhile, I also find that, cc2520 driver is submitted, but it is never

==> spi_sam3x_transceive can not return, and result in system exception
GPIO and SPI configured
verify_osc_stabilization enter
***** BUS FAULT *****
Executing thread ID (thread): 0x20080d04
Faulting instruction address: 0x80480488
Instruction bus error
Fatal fault in essential task ! Spinning...
==> Receiving data cannot occur without transmitting data. SAM3X
[DATASHEET]->32.7.3 Master Mode Operations
==> spi internal nCS may be unusable, instead of it with gpio.
==> it is better to transmit and receive data in fiber context.


App context Interrupt context
fiber context

Configure spi
Call spi transfer
Enable spi interrupt ----> isr
| |
| v
| Disable spi interrupt
| |
| v
| Give sem ---> spi
Transmit/Receive fiber
| |
| v
Transmit data <-----
| |
| v
Receive data |
| |
| v
Disable Spi
| |
| v
device_sync_call_wait(sync) <------


==>fifop(gpio2) triggers rx processing at rising edge, sfd(gpio4)
triggers tx completion notification, should it be falling edge?
==>linux cc2520 driver is very concise and clear, why don't port it to
==>cc2520 driver defines macro "CONFIG_NETWORKING_LEGACY_RADIO_DRIVER",
if this means how to interface cc2520 to zephyr 6lowpan stack still is a
uncompleted task,
or the interface will be changed in future.

Here I greatly appreciate huge contribution from Intel colleagues.
I specially care for spi_sam3x <==> cc2520 driver <==> 6lowpan/ieee802154
<==> ipv6.
To achieve this target, Would you have any information about its, plan or

Thank you!

Best Regards
David Dai(戴卫彬)
This message contains information that may be confidential and/or privileged and is intended only for the individual or entity named in the body of email above. If this message has been received in error, your receipt of this message is not intended to waive any applicable privilege. No one else may disclose, copy, distribute or use the contents of this message. Unauthorized use, dissemination and duplication is strictly prohibited, and may be unlawful.

Join devel@lists.zephyrproject.org to automatically receive all group messages.