Author Topic: ICSP programming  (Read 297 times)

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
ICSP programming
« on: December 17, 2017, 02:05:02 PM »
Am I correct in assuming that if I connect up the In Circuit Serial Programming pins like I would a standard ARM processor that it programs the same way?

Want to verify before I send the boards out, thanks

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #1 on: December 18, 2017, 08:21:07 PM »
No help here?  Can't really make boards that I can't verify.

Please?

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #2 on: December 18, 2017, 08:46:58 PM »
How did you prototype the board without knowing the answer?
There is no AVR ICSP.
Uses RS232 TTL RFduino programming using Arduino IDE.
Otherwise low level is programmed using JTAG SWD pins. Check the documentation for nRF51822.

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #3 on: December 19, 2017, 05:06:19 AM »
How did you prototype the board without knowing the answer?
Otherwise low level is programmed using JTAG SWD pins. Check the documentation for nRF51822.

I used USB serial interface for one of the SparkFun modules which has a boot loader installed.  I didn't think chips from the foundry came with a boot loader, am I wrong?

I don't want to put a USB connector on my finished product.  Having some serial output would be nice though.  I'll grope around for the documentation you mention.

Why am I questioning my judgement for using this product and this forum now?  This is no way to treat customers.

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #4 on: December 19, 2017, 05:43:37 AM »
The USB programmer is just a USB to serial converter. It does not have a bootloader. The bootloader is built into the RFduino module. Have you found the documentation at RFduino.com? The JTAG SWD is only used if you want to blow away the RFduino/Arduino builtin bootloader and program at the lowest level.. which would be ARM Cortex M0.
« Last Edit: December 19, 2017, 05:46:28 AM by tolson »

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #5 on: December 19, 2017, 05:56:09 AM »
Now we're talking!  I may need to reclaim the space used by the loader for my application.

I'll dig into this later today.  I owe you a thank you!

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #6 on: December 19, 2017, 11:55:54 AM »
And if you blow away the RFduino/Simblee firmware you are basically on your own. Might as well be programming with Nordics API or MBED at that point. Good luck and have fun!


MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #7 on: December 19, 2017, 11:59:42 AM »
Guess I'm still missing something, all you are blowing away is the boot loader right?

Or are all the libraries you link with (SimbleeForMobile.drawText for example) in there too?  Thanks

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #8 on: December 19, 2017, 01:20:31 PM »
Let me put this another way:  Does SparkFun just buy your chips and solder them onto their Simblee BLE Breakout board?  This is SKU WRL-13632 https://www.sparkfun.com/products/13632

If that is true then I'm with you 99%.  Just give the board serial I/O and burn the code in from the Arduino IDE.

So one more question:  What does all this ancillary circuitry do in the above SF board?  Taking signals from the serial DTR pin?  Thanks

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #9 on: December 19, 2017, 03:46:20 PM »
I am not an employee of RFdigital. Just a community user who happens to be a moderator.

The bootloader firmware is programmed into the nRF51822 read protected flash by RFdigital. They keep secret the actual  bootloading code and exactly where that loads into the nRF51822. So if you blow away their bootloader using JTAG/SWD to install your own ARM code or MBED, or Nordic libraries you won't be able to reload RFdigitals bootloader as they don' make that binary/hex available. I guess they figure if they made that available then everyone would install that on their hardware too and perhaps not buy their SOCs. That is why I say if you decide to go with installing MBED or Nordic firmware via JTAG you will loose all Arduino IDE, and SimbleeForMobile, for example, features.

The advantage of still using the Simblee SOC or the RFduino Module in your designs, if you go with custom low level programming,  is that it is the best packaging of the nRF51822 and assorted bits and pieces.. like the crystals and antenna. If I was running the company I would be selling boocoo of the chips and not care what people put on it. The money is in the condensed complete system on chips. And make the firmware open source so the community can fix and improves things mucho faster. And make the chips so cheap no one would want to waste their time designing in the nRF and support components on their own.


« Last Edit: December 19, 2017, 03:51:23 PM by tolson »

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #10 on: December 19, 2017, 03:49:30 PM »
Let me put this another way:  Does SparkFun just buy your chips and solder them onto their Simblee BLE Breakout board?  This is SKU WRL-13632 https://www.sparkfun.com/products/13632

If that is true then I'm with you 99%.  Just give the board serial I/O and burn the code in from the Arduino IDE.

So one more question:  What does all this ancillary circuitry do in the above SF board?  Taking signals from the serial DTR pin?  Thanks

Yes, the Simblee SOC is bought from RFdigital and mounted on the sparkfun board. Sparkfun has really good documentation on how things work.

The schematic you show is a manual reset button in conjunction with the DTR through a capacitor. The DTR line is used to by the Arduino IDE to reset the Simblee/RFduino to tell the bootloader to go into programming mode or run mode.
« Last Edit: December 19, 2017, 04:04:37 PM by tolson »

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #11 on: December 20, 2017, 05:22:49 AM »
Yes, the Simblee SOC is bought from RFdigital and mounted on the sparkfun board. Sparkfun has really good documentation on how things work.

The schematic you show is a manual reset button in conjunction with the DTR through a capacitor. The DTR line is used to by the Arduino IDE to reset the Simblee/RFduino to tell the bootloader to go into programming mode or run mode.

OK so here is my summary:

1. RF Digital puts the boot loader in all chips as part of the manufacturing process
2. Most designs can just use the serial port to load firmware into the Simblee
3. The RESET circuit should have a differentiator circuit like the one above to go between prog mode and run mode using DTR
4. The firmware is protected by default because there is no way to read it out

Look OK?

tolson

  • Global Moderator
  • *****
  • Posts: 877
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: ICSP programming
« Reply #12 on: December 20, 2017, 07:04:52 AM »
You don't really need a reset button. Just a capacitor between the DTR line and the RESET line is needed. Look at the schematic for the RFduino USB shield.

MaMikee

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #13 on: December 20, 2017, 07:08:59 AM »
Yeah I left the reset button out, just power cycle like you do with Windows(r)  ( - :

Thanks for your help and hopefully this can aid others.

If it needs to be moved to another forum area I'm OK with that

Wayne

  • RFduino Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: ICSP programming
« Reply #14 on: December 22, 2017, 07:04:29 AM »
Another set of facts is the Simblee is FCC, CE, RED and bunch of others approved.  If you change any firmware etc, it no longer is a Simblee device.
UL and FCC and others would want to retest the device.
At my work, I have used Teensy devices with software to interface with Medical devices. If I change the software enough, I would need to send out the system for a retest of over $15,000.  That will not happen, so I do a little change that simply lites an LED or not.
Current devices now on the Simblee has been qualified for UL/FCC/FDA of our foot switch wireless upgrade.  In fact, the resolve of the only one failure was easy and was easier than our 2 previous models.