Important changes to questions
We’re making some changes to Mbed Questions. From 10th December 2019 this site will be archived and new questions should be asked on our new forum site. Until that date you can continue to reply to existing questions here but can’t ask new questions.
7 years ago.
Programming the Reference Design
I'd like a reference design that lets me easily transition from a working mbed configuration to a custom PCB. The Reference design on this page has a JTAG for programming (I think). Is it possible to generata a reference design that mimics the exact functionality of the mbed? Maybe this one does and I just cant see it!
The mbed-like reference design I suggest would have a USB connector and a push-button (or maybe just a jumper). When you connect the custom PCB to a PC, it would connect up a drive (like the mbed does) that is recognizable to windows. When you do a compile, from the mbed web-compiler, and then save, the compiled .bin would go to this drive on the new PCB. When you push the pushbutton, the new PCB would load the newest .bin and go ... No JTAG, no FlashMagic and nothing new to learn ...
Is this possible and or easy to do?
Question relating to:
7 years ago.
Hello, This is what I have done, based on a LPC11U24 mbed board : On your custom board, you will need at least to implement the LPC11U24, one 12MHz crystal with the 2 capacitors, the USB port. For this port, you have to put the pull-up resistors, and preferably some protection devices. You can find both together in a single device like USBUF01 from ST. Then add a reset switch with a pull-up, and most important a push button between PIO0_1 and ground. VERY important : connect USB_VBUS pin of the processor to USB Vbus through a 100 Ohm resistor. This will tell the processor boot code that a USB is present, and that programming should be done via USB and not serial link. As power supply, you can use the power from USB, if your device does not need too much current. Take the +5V from the USB bus, add any kind of regulator (I use LD1117 from ST) to create the +3.3V. Add some decoupling capacitors on the processor Vdd pins, some capacitors next to the regulator as recommended, and .. that's all. Then you have a minimum design, purely compatible with the code you would have written for your mbed. Add all your necessary peripherals, as on you mbed developpement board.
Plug your device on a PC usb, and you should see a new mass storage device comming. Delete the firmware.bin pseudo file present on this device. Copy/paste your .bin file from mbed compiler, don't care about the file name, reset the device, and it will start on your code. If you need to reprogram, press the switch on PIO0_1, keep it pressed while resetting the de vice. It will be forced back into programming mode.
Quite simple, it works, and thanks again to the mbed team ! PP
7 years ago.
Thanks for the detailed insight ... The LPC11U24 wont work for me ... I need the LPC1768 .. Why wont this idea work there as well?
7 years ago.
You mean USB secondary bootloader instead of serial ( flashmagic ) bootloader ? If you are satisfied with LPC1768 flash holding the ( only one , not newest ) binary image of your program and running after reset and an extra key press , there may be a solution to your problem !
NXP have allready published an App note called " LPC1700 , USB secondary bootloader " that uses NXP's part of internal flash as mass storage device for firmware placement , so when you reset the device and press another key , the file placed in internal flash becomes new firmware . One of the extra features of magic chip , is that "magic chip " bootloader selects the newest firmware upon a lot of firmwares stored in an external SPI flash making life for new developers very easy !!! , but you can always use the public USB bootloader available by this app note for your production boards, if you are not interested in selecting from different firmware files ,but just one.
http://ics.nxp.com/support/documents/microcontrollers/?scope=LPC1768 look for AN10866
Have a look here , for how this is done at this video review of a 1768 board , after 21 min :00 sec
You need to log in to post a question