Hi Paul,
Mbed is a great concept, but the current documentation leaves a lot of questions unanswered.
Yep, I'd agree too. It's taken a lot of hard work to get to this so I'm really proud that it even *exists*, but we know there is still a lot to do. We'll be trying to document more and more of the details as we go, but it'll obviously take a while.
Asking questions like this is a great way to highlight what specifically is needed, and a great way to get the answers out. Thanks for capturing them.
For example, I have deduced that the USB serial port uses UART0 on pins 98 and 99. Am I correct?
PeripheralNames.h suggests that TIMER3 is used for a microsecond ticker. Is this so?
Yep, spot on.
Which timer(s) does the PwmOut class use?
It uses the dedicated PWM timers that the LPC1768 has.
How does the local filesystem work? What LPC1768 resources does it use?
What else is going on in the background?
The local filesystem is actually supported via semihosting calls to the mbed interface. Semihosting is a method of delegating system calls to a host, such as printf/fopen/fwrite etc. These are usually used to enable a program on a embedded device to access e.g. a filesystem, but on the host computer where a debugger is running, or a console is supported. The actual semihosting calls go via JTAG to the interface. There are therefore no resources really that are used on the LPC1768 (apart from obvious things like RAM for any stdio buffer etc). To be honest, this area is quite involved, so i'd want to spend some time writing it up as a tutorial on the concept and implementations of semihosting. It is also something that hopefully most people don't need to dive in to!
Nothing is really going on in the background in mbed. i.e. there is no monitor or bootloader.
The cookbook HTTPServer page below makes reference to HTTPRPC and HTTPFileSystemHandler, but I cannot find anything about them. A search yields nothing. Are they documented? If so, where?
I'll leave this to the people working on this cookbook project to answer (it's a cookbook project, so not an official mbed library).
Where is the Ethernet MAC address stored? How is it loaded into the Ethernet Controller registers?
The interface on the mbed has a MAC address encoded in to it as part of the serial number. This means every mbed has a unique MAC address! To get hold of it, we implemented another semihosting call, but I haven't made it public yet. But if you really want to, you can get hold of it like:
extern "C" void mbed_mac_address(char *mac);
char mac[6];
mbed_mac_address(mac); // update mac to the unique mbed mac address
Hope that helps answer some of your questions.
Simon
Mbed is a great concept, but the current documentation leaves a lot of questions unanswered.
For example, I have deduced that the USB serial port uses UART0 on pins 98 and 99. Am I correct?
PeripheralNames.h suggests that TIMER3 is used for a microsecond ticker. Is this so?
Which timer(s) does the PwmOut class use?
How does the local filesystem work? What LPC1768 resources does it use?
What else is going on in the background?
The cookbook HTTPServer page below makes reference to HTTPRPC and HTTPFileSystemHandler, but I cannot find anything about them. A search yields nothing. Are they documented? If so, where?
http://mbed.org/projects/cookbook/api/EMAC/lwip/trunk/HTTPServer/HTTPServer#addHandler
At present, documentation seems to be scattered all over the site. Finding it is a somewhat hit and miss procedure. I would like to see all the hardware and library documentation in one place. The Handbook would be a good place. I confess I am not a huge fan of online documentation. It is ok for answering specific questions, but it can often be difficult to see the bigger picture. What I would really like is a comprehensive Technical Reference Manual as a pdf document.
Paul