0

I have just got the Blend Micro board. After following the getting started tutorial I can't manage to upload sketches on the board. Now, in Arduino v. 1.0.6 I see the voices

  • Blend
  • Blend Micro 3.3V/8Mhz
  • Blend Micro 3.3V/16Mhz (Overclock) as in this picture:

enter image description here

While the L Led is switch on if I upload the sketch the TX and RX leds stay off. The modified Arduino IDE says "Done uploading". As port I choose /dev/tty.Bluetooth-Serial-1 and I don't see any other port and I think this is critical.

But if I open the Android BLE application BLE Controller, after tried to upload the BLEControllerSketch (from RBL_nRF8001 libraries) it finds the board but print the error No Response from the BLE Controller sketch. If I try with SimpleChat example and the SimpleChat Android application if finds the board but prints only "Hello World" and nothing else if I send strings from the android app.

Any kind of advice?

EDIT

I am on a Mac 1.8.5. I have tried also with Codebender, but anything change: I can't see the /dev/tty.usb* in the listed ports

1

Did you follow the setup exactly? In particular, did you modify main.cpp to have this:

#if defined(BLEND_MICRO_8MHZ)
    // As the F_CPU = 8000000UL, the USB core make the PLLCSR = 0x02
    // But the external xtal is 16000000Hz, so correct it here.
    PLLCSR |= 0x10;             // Need 16 MHz xtal
    while (!(PLLCSR & (1<<PLOCK)));     // wait for lock pll
#elif defined(BLEND_MICRO_16MHZ)
    // The CPU clock in bootloader is 8MHz, change to 16MHz for sketches to run (i.e. overclock running at 3.3v).
    CLKPR = 0x80;
    CLKPR = 0;
#endif

If not, what happens is once the sketch starts the USB stops working and you can't see the serial port due to the clock speed being incorrect. This is why you can only see /dev/tty.Bluetooth-Serial-1 in the port list.

  1. Modify main.cpp according to http://redbearlab.com/getting-started-blendmicro

  2. Press the reset button on the Blend Micro, then quickly select Tools -> Serial Port in the Arduino IDE. The Blend Micro serial port should be there because the boot loader is still running. It will be named like /dev/tty.usb????????

  3. Select that serial port. Compile your code. Now press reset at the same time as pressing upload. Your sketch will upload and the serial port should now be present when the sketch is running.

Update: The Timing Tricks

Note: Blend Micro is basically the same as Arduino Leonardo.

This is the timing:

  1. The reset button is pressed.

  2. The ATMega32u4 restarts. It jumps to the bootstrap loader code.

  3. The bootstrap loader starts up the USB as a CDC device (serial port) and waits for firmware upload instructions. (Pulsing L LED)

  4. If no upload instructions are received within a certain time (8 seconds?), it jumps to the application code.

  5. The application code starts up the USB as a CDC device again.However, since the oscillator (clock) on the Blend Micro is different to the Leonardo, it requires the modifications above, otherwise the USB clock will wrong, and the USB won't work.

If the modifications above were not done, Step 3 is the only time when the USB is working and the serial port can be selected in the Arduino software.

  • yes I have replaced the correct arduino.cpp. so you can confirm that the rx and tx should blink during upload and the /dev/tty.usb* has to be in the list. ok.. can you explain me what happens during the black magic of pressing the button and suddenly click in the button? I will try this evening – nkint Nov 19 '14 at 19:17
  • so you are saying me that if I press the reset button and the L led is fading (and the boot loader isn't still running) I should see the /dev/tty.usb* listed in the available ports.. This does not happens. I also tried to ls /dev/tty.* just in case does not refresh so quickly and nothing new appears.. – nkint Nov 19 '14 at 19:25
  • Ok it works! but please explain me the timing tricks! – nkint Nov 19 '14 at 20:06
  • @nkint please see edits – geometrikal Nov 19 '14 at 22:27
1

For anyone else who is having an issue with this. What worked for me, was replacing the cable with a shorter cable. I could of been using a charging only usb cable or the cable was long enough to not upload correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.