Questions: Max file size, 5V tolerant...

16 Nov 2009

I have a few questions about my newly received mbed microcontroller:

- I am very interested to know what the maximum file size I can load into the mbed. I just want to know when I should start worrying. I understand that the processor has 512k and that the drive has about 2 mb.

- Another question is the compiled code (.bin file). Loaded into the processor and then run or is it run directly from the drive portion of the mbed?

- I understand that the I/O pins are 5V tolerant. Does this mean that things like Serial/I2C/SPI/CAN are tolerant also. I'll put it this way, I have some I2C devices that are 5V can I hook them up directly or should I convert them to 3V. What is the best way to convert an I2C line knowing that one of them is bidirectional.

Thanks,
Robert

16 Nov 2009

Hi Robert,

Robert Givens wrote:
I am very interested to know what the maximum file size I can load into the mbed. I just want to know when I should start worrying. I understand that the processor has 512k and that the drive has about 2 mb.

The processor FLASH is 512k as you say, and we can load in an image up to that maximum size. The drive is 2mb and actually stored on some external flash so doesn't impact this, and was bigger to give spare space for multiple binaries, log files, input files etc.

Robert Givens wrote:
- Another question is the compiled code (.bin file). Loaded into the processor and then run or is it run directly from the drive portion of the mbed?

Yep, the binary is loaded in to the MCU FLASH whenever the newest binary on the disk is changed and you hit the reset button (you'll notice it doesn't re-program if you hit reset a second time). The program then runs direct from this internal FLASH, the same as if you'd zapped it on with a JTAG programmer or ISP bootloader etc.

Robert Givens wrote:
- I understand that the I/O pins are 5V tolerant. Does this mean that things like Serial/I2C/SPI/CAN are tolerant also. I'll put it this way, I have some I2C devices that are 5V can I hook them up directly or should I convert them to 3V. What is the best way to convert an I2C line knowing that one of them is bidirectional.

They are 5v tolerant, so you will not do damage as far as I know. I think whether you can make 5v logic work is probably very dependant on the thresholds of the logic in question, but someone may be able to give a more accurate answer. We've certainly make it work a number of times, but the "proper way" is probably a bridge.

Simon