Dear Matt Parsons, Simon Ford and colleagues,
first of all, sorry about my poor English.
Your question Matt, is direct related with my current design. I am working in a system bus that I call SPI8CON. This system is based on FRDM-KL25Z and FRDM-K64F. This bus has 8 lines: miso, mosi, sclk, select, int_in, int_out, +5vdc and gnd. At boot, during the bus arbitration, the "select" line goes down and the first SPI byte is transmitted by the "master" and received by "slaves". In this byte, the 4 most significant bits, select one of 8 interfaces (slave circuit board - DIP Switch or EEPROM defined) present in the bus. The fourth bit is the parity of the last 3. The remainder 4 bits, select one of 8 SPI devices present in the interface. Again, one bit is used as parity. With this design, is possible for each "master" (KL25Z or K64F) manage up to 64 SPI devices (8/interface x 8 interfaces). After detected all interfaces, the "master" can start to retrieving and putting data in the interfaces.
At this moment, the simulation of the system is working well. There are 4 interfaces designed: [1]analog controller (AD and DA 18 bit resolution), [2]digital I/O (24 bit), [3]memory (RAM, EEPROM and Phase Change Memory - PCM) and [4]communication (UART 6, 10 and 12 Mbps - RS485).
Everything looks great, but every day there are users asking for new interfaces: DA 20 bit resolution, AD 24 bit resolution, temperature, etc. This system is going to be used in a Synchrotron installation. The number of interfaces will reach 4000 units. If I need to change the "master" software each time that I install a new interface, I will get crazy.
So, I am thinking about to install the software of each new interface inside the interface (Plug&Play - I hope not to be Plug&Pray). During the bus arbitration, the manager software could "download" the software for that kind of interface (device driver). If possible, this system will be very modular and dynamic.
Matt and/or Simon, do you have any idea about how can I do this using the MBED compiler? I am learning about the structure of MBED application for KL25Z and K64F and ARM software/firmware, but it is a hard way. Any help will be welcome.
Thanks,
Gfranco (www.lnls.br (Sirius))
Hi all,
I have a bit of a Ninja code question.
I was thinking about the lack of RAM on the NXP, and the lovely huge Flash on the mbed board, and though that it should be quite easy to have sections of code, modules if you will, that can be loaded on demand during run time, and then flushed/replaced with another module once the task has been completed.
It seems that the mbed complier and support libraries would support this, the only thing required, as far as I can tell, is to be able to build code in the compiler that is position independent... Is this possible? any thoughts before I waste an evening hacking away at this idea? :)