Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Hard Coded Bootloader Options #2

Closed
microbuilder opened this issue Nov 24, 2016 · 8 comments
Closed

Implement Hard Coded Bootloader Options #2

microbuilder opened this issue Nov 24, 2016 · 8 comments

Comments

@microbuilder
Copy link
Contributor

microbuilder commented Nov 24, 2016

  • Internal pullups should be enabled on DFU and FRST at startup (and before sampling!)
  • DFU GND , FRST HIGH = Enter SERIAL Bootloader
  • DFU GND, FRST GND = Enter OTA Bootloader
  • DFU HIGH, FRST LOW = Factory Reset

The silk on the FRST pin will be updated to indicate that the pad is dual usage, but this will be rarely used (Boot into OTA or factory reset), so I'm OK with only BOOTSERIAL being available on a 0.1" pin.

@microbuilder
Copy link
Contributor Author

Since we may need an option for force OTA boot mode instead of the more common SERIAL mode, but we don't have a free pin dedicate for this, I propose to use the F.RST pad which is located on a test point on the bottom of the PCB. It won't happen commonly anyway.

We can still keep factory reset behaviour like normal (when only FRST is asserted), but asserted both DFU and FRST pins at the same time will enter OTA bootloader mode, which at least keeps the possibility even if it's more trouble than entering SERIAL bootloader mode.

@hathach
Copy link
Member

hathach commented Nov 24, 2016

What is the factory reset pin though. I don't see it in the schematics .

@microbuilder
Copy link
Contributor Author

See P0.22 here: #1

It doesn't have a 0.1" pin, it's only available as a test pad on the bottom of the PCB.

@hathach
Copy link
Member

hathach commented Nov 24, 2016

Ah I see P0.22. Forget about factory reset, will it erase the memory application as well application data right ?

@hathach
Copy link
Member

hathach commented Nov 24, 2016

Btw, I forgot about the factory reset. Let's review the memory flash a bit.

  • Our bootloader is larger starting from 0x78000 with 32KB + 8KB bootloader data ~ 40KB.
  • Softdevice + MBR currently is 104 + 4 = 108
  • Application + data is 512 - (40+104+4) = 364 KB

How much did we partition the application data, I would suggest 32KB, that leave 332 KB for dual bank --> an image is limited at 332/2 = 166KB

PS: SD 3.0.0 is larger with 120KB

image

@microbuilder
Copy link
Contributor Author

I think 166KB is fine for a SD based image with OTA update support. That's still WAY more than we have for Bluefruit on the nRF51.

@hathach
Copy link
Member

hathach commented Nov 24, 2016

ok let give 32KB for user than. Factoryreset will cause bootloader to erase

  • application code region
  • applicaticon data region

Let's wait for this, we will dot it later when having something solid.

@hathach
Copy link
Member

hathach commented Nov 25, 2016

move discussion to bootloader repo adafruit/Adafruit_nRF52_Arduino_Bootloader#1

@hathach hathach closed this as completed Nov 25, 2016
lefedor added a commit to lefedor/Adafruit_nRF52_Arduino that referenced this issue May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants