Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Module Firmware


  • Please log in to reply
5 replies to this topic

#1 Billy Propes

Billy Propes

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • LocationVincent, OH, USA

Posted 12 June 2012 - 05:26 PM

Hey Chris, I am interested in learning how to develop custom modules for the Netduino Go and was wondering if the source code for the actual firmware running on the ST8 for the RGBLED and Potentiometer is available anywhere. I found the source code for the NETMF drivers in the WIKI, but not the actual firmware for the ST8 on the module I would like to be able to see how the firmware for the module and the code for the driver interact with each other and it would help with the learning process. Also, a couple more questions: 1) I saw that you guys are planning on being able to flash the ST8 directly from the Netduino. How's that coming along? 2) I also saw a "ProtoModule" for developing module prototypes. Is there anywhere I can order this? Thanks in advance.

#2 ItsDan

ItsDan

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 12 June 2012 - 06:24 PM

http://wiki.netduino...le-RGB-LED.ashx If you look under 'attachments' in the top right the .net drivers and firmware are there. A standard firmware is forthcoming. The Protomodule is now on sale at http://variablelabs.com.
Follow the adventures of the Box of Crappy Surplus

Total BOCS Traveled Distance: 9708 miles | States Visited: 5
Track the Box

#3 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 12 June 2012 - 06:39 PM

Hey Chris,

I am interested in learning how to develop custom modules for the Netduino Go and was wondering if the source code for the actual firmware running on the ST8 for the RGBLED and Potentiometer is available anywhere.

I found the source code for the NETMF drivers in the WIKI, but not the actual firmware for the ST8 on the module

I would like to be able to see how the firmware for the module and the code for the driver interact with each other and it would help with the learning process.

Also, a couple more questions:
1) I saw that you guys are planning on being able to flash the ST8 directly from the Netduino. How's that coming along?
2) I also saw a "ProtoModule" for developing module prototypes. Is there anywhere I can order this?

Thanks in advance.


Currently the GoBus protocol is not finalized and big changes are in the works, so learning from the existing firmware would likely be a detriment more than it would help. The ProtoModule is available at Variable Labs.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#4 Billy Propes

Billy Propes

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • LocationVincent, OH, USA

Posted 12 June 2012 - 10:33 PM

Hey guys. Thanks for the location to get the ProtoBoard. I know the GoBus protocol is not finalized yet. But, I would still like to get a peek at some firmware samples for the various modules (the simpler the modules, the better). It will give me a jump start on understanding how the NETMF Drivers and Firmware communicate with each other over the SPI bus. Dan, I went to the WIKI page you referenced, and I see the NETMF Drivers and Schematics. However, I don't see any actual firmware for the STM8 chip that's on the module boards themselves. I checked the pages for the RGBLED and Potentiometer and neither of them seem to have the Firmware itself included in the zip files. The ShieldBase page does. However, I am looking for something that's a little simpler so that I can more easily understand it. Thanks for the great replies, and again, any help is greatly appreciated.

#5 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 13 June 2012 - 07:03 PM

It will give me a jump start on understanding how the NETMF Drivers and Firmware communicate with each other over the SPI bus.


Unfortunately this is the part that is going to be changing, I absolutely understand wanting to get going but I think it's best to wait until after the firmware update that is coming soon.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#6 Matt Isenhower

Matt Isenhower

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSan Diego, CA

Posted 13 June 2012 - 07:59 PM

As Arron and Dan have said, there will be a "standard firmware" for the STM8 (and a few other microcontrollers) in the coming months. Currently, the protocol between the Netduino Go mainboard and modules like the RGB LED and Potentiometer is fairly simple: The mainboard sends out an enumeration request to the module, the module responds with its unique ID (a 128-bit GUID), and if the GUID matches the one the mainboard is looking for, the port is opened and further communication with the module can begin. The "further communication" part is the part that is less defined at the moment -- both the RGB LED and Potentiometer modules are using very simple SPI messages to send and receive data, where each message is 18 bytes long (and the 18th byte is the CRC8 value for the message).

(I haven't mentioned the Button module here because it doesn't actually have a microcontroller -- it uses a simple shift register for identification and uses the GPIO pin on the Go bus to indicate the button state. Also, the shield base currently uses UART for communication but it will soon be changing over to SPI. All microcontroller-based modules made for the Go bus will ultimately use SPI for communication.)

When the standard firmware is released, it will handle all of the actual SPI communication between the Go mainboard and modules. This firmware will provide several standard ways to send and receive data from your module and will, to some degree, allow you to control its behavior from the mainboard. You will still be able to (and in many cases, need to) write your own STM8 firmware based on the standard firmware, but the communication layer between your module and the mainboard will be managed in a standard way. (Using the standard firmware or a custom firmware based on it will actually be a requirement for modules to be fully GO!Bus compliant and use the "G" logo.)

If you're interested in writing your own firmware at this point, I would strongly suggest getting a logic analyzer so you can analyze the protocol used in the existing modules and debug the protocol you implement on your own. The Saleae Logic is an excellent choice, and I really wouldn't consider writing your own firmware without this or a similar device.

Unfortunately, we do not have the RGB LED or Potentiometer module firmware to give out at this point. Chris may be able to help you further there, but it is definitely possible to write your own firmware with just the information you can gather from a logic analyzer. (As an example, the firmware on my Seven Segment Display Module is completely custom.)

If you have previous microcontroller experience, all of this will be a bit easier, so you might want to start out with some smaller projects first. Forum member Nevyn has made several posts on his blog at http://blog.mark-stevens.co.uk/ about working with the STM8. CW2 has put a few tips on the wiki here: http://wiki.netduino...evelopment.ashx and there is more information about the electrical specs here: http://wiki.netduino...ders-Guide.ashx

While ultimately a lot of the communication methods will change, I definitely wouldn't say it's a waste of time to start learning how it works now as it will give you a head start for making all the pieces work together later. The standard firmware will make communication with the Go much easier, but it won't eliminate the need to write at least some custom STM8 code for a lot of modules.

Let us know if you have any other questions! :)
Komodex Labs
Follow me on Twitter: @mattisenhower




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.