Tuesday September 28, 2010
Hello,
Yesterday, I watched a video of Massimo Banzi speak at the recent Maker Faire in NYC. At one point he was describing an early Arduino user group meeting (in 2004/2005?). He was surprised so many people showed up, because the board was not working yet!
I join leaflabsandy in congratulating and thanking the LeafLabs team on creating a very exciting (and reasonably stable) platform in such a short time.
http://forums.leaflabs.com/topic.php?id=204
Maybe Isaac Newton was right when he said he could see so far ahead because he stood on the shoulders of giants. The Maple is another successful example of the uses of open source software.
I wish the leaflabs team luck (and of course commercial success) and hope the lessons learned from developing the Maple (such as spending the extra money on 4-layer PCBs) will carry over to the Oak and future products. I applaud the brave decision to eliminate reliance on st.com code and to create libmaple from scratch. Great work Perry.
Before I commit myself to more complicated projects, I am more interested in testing the Maple and making sure the board and software are stable and work as described. Often it is much easier for an end-user who is not immersed in the details which worry the development team to find problems and mistakes. At the moment, I am also more interested in learning how to use the enhanced features of the Maple (eg 12-bit ADC) and the increased processing power (32-bit vs 8-bit and also simple raw MHz) which allow the Maple to do things not possible with the Arduino. I expect to find situations which worked on the Arduino, but do not work with the current Maple hardward/software.
On my Maple (Rev 3, summer 2010) I have always used SerialUSB. I have never tried SerialN. Why? Mainly for the convenience. I am using a mini USB cord to power the Maple and to upload sketches. Therefore, the USB cord is already there. I am also lazy. To use the Maple's USART devices would require connecting the Maple's pins (eg. D7/D8, D1/D0, or D29/D30) to the Serial port on my computer (yes, my computer has a built-in COM port!). This would require between two and five wires (for TX and RX [plus CK, CTS, and RTS]), a serial connector with male pins, and some soldering.
After trying to work through my LabVIEW/Maple problems (where I am currently using a USB powered Maple and SerialUSB functions for communications) and thinking about JoshSanders' SerialUSB problems with MATLAB/Maple I began to think about the differences between SerialUSB and SerialN.
First questions (serial communication):
Which one is more reliable or predictable (eg. less likely to have timing problems or conflicts) SerialUSB or SerialN? Are there known situations where SerialUSB or SerialN is preferred? Does setting the baud rate using SerialN.begin() make communication more stable? Remember, SerialUSB.begin() does not require a baud rate. Are there functions similar to SerialUSB.getDTR() and SerialUSB.getRTS() for use with the CTS and RTS pins (on Serial2 and Serial3)? Does the leaflabs team use SerialUSB or SerialN (with the additional wires) when they are developing projects?
The STM32F103RB has 512 bytes of dedicated SRAM which is used for USB and Can peripherals. On page 67 of "The Insider's Guide to the STM32 ARM based microcontroller" (hitex.com document 1221142709) it says
"The 512bytes of SRAM shared with the Can controller is used to store the USB packet data. During initialisation this region of memory is divided into individual buffers for each of the active endpoints. The endpoints used by isochronous pipes have a special double buffer so that data can be received into one buffer while an earlier packet is being read from a second."
Is there any leaflabs documentation which describes how these 512 bytes of memory are configured on the Maple? Are the USB buffers ring buffers? How are the USB buffers cleared? Can users manually clear the USB buffer? For example, if the USB buffer size is 256 bytes and the Maple needs to send 256 bytes of data to the system is the data more likely to be transmitted at one time if the buffer is first emptied manually?
Second set of questions (power):
Are there any known situations where the power source (LiPo battery, USB, or 2.1 mm plug) affects the behavior of the Maple. Are there any situation where one type of power is recommended over the other? I once saw an application written for the Arduino which recommended battery power for the computer (to minimize RF interference).
Third set of questions (RF shielding):
And my last question is also about RF shielding. If one uses the SerialN functions and pins D7/D8, D1/D0, or D29/D30 should the individual wires be twisted around a wire which is connected to ground. This would be similar to 80 wire IDE drive cables where every other wire is connected to ground (I believe). On the Arduino.cc forums I have seen posts which discuss the merits of shielding the entire board.
Enough rambling for one day. Thanks for your ideas!
Stephen from NYC