| 1 | --- |
| 2 | title: Target family usage notes |
| 3 | --- |
| 4 | |
| 5 | This section documents usage notes for certain target types. |
| 6 | |
| 7 | |
| 8 | ## Nordic Semiconductor |
| 9 | |
| 10 | ### nRF51 family |
| 11 | |
| 12 | See [SoftDevice](#softdevice) for notes about handling firmware containing SoftDevice images. |
| 13 | |
| 14 | ### nRF52 family |
| 15 | |
| 16 | See [SoftDevice](#softdevice) for notes about handling firmware containing SoftDevice images. |
| 17 | |
| 18 | Unlocking of flash security, also called APPROTECT, is supported. For more, see the |
| 19 | [security and protection]({% link _docs/security.md %}) documentation. |
| 20 | |
| 21 | ### SoftDevice |
| 22 | |
| 23 | The nRF51 and nRF52 series have support for so-called “SoftDevice” firmware, which implements Nordic's Bluetooth LE or |
| 24 | other wireless protocol API. When firmware containing a SoftDevice is loaded, the SoftDevice region of flash is locked. |
| 25 | In order to reprogram the flash sectors containing the SoftDevice image, a mass erase must first be performed. This can |
| 26 | potentially cause issues with flash programming if one is not aware of this requirement. |
| 27 | |
| 28 | For a development workflow with firmware using a SoftDevice, no extra steps are required. |
| 29 | |
| 30 | PyOCD will by default scan flash sectors when programming flash in order to only erase and program sectors whose |
| 31 | contents are changing. Since normally the SoftDevice sectors do not change during development, pyOCD will skip over |
| 32 | these sectors. |
| 33 | |
| 34 | In addition, a chip erased performed with a SoftDevice in flash will erase only the non-SoftDevice sectors. For example, |
| 35 | running `pyocd erase --chip` on such a device will leave the SoftDevice intact and erase all other sectors. |
| 36 | |
| 37 | However, any case where the SoftDevice sectors are being erased requires a prior mass erase. This includes |
| 38 | changing the SoftDevice variant or version, as well as switching to firmware that doesn't include a SoftDevice. |
| 39 | Mass erase is a separate operation. It mostly functions like a chip erase, but can also be used to |
| 40 | [unlock]({% link _docs/security.md %}) devices that have APPROTECT enabled. |
| 41 | |
| 42 | To perform a mass erase: |
| 43 | |
| 44 | ``` |
| 45 | pyocd erase --mass |
| 46 | ``` |
| 47 | |
| 48 | |
| 49 | ## NXP |
| 50 | |
| 51 | ### Kinetis family |
| 52 | |
| 53 | Unlocking of flash security is supported for all Kinetis targets. For more, see the |
| 54 | [security and protection]({% link _docs/security.md %}) documentation. |
| 55 | |
| 56 | |
| 57 | ## HDSC |
| 58 | |
| 59 | ### HC32L110 |
| 60 | The documentation for this chip states that no external pull-up resistors are required on the SWD lines due to the internal pull-up |
| 61 | hardware. Testing has found this to be largely inaccurate. Most debug probes will require an external 4.7kΩ pull-up resistor |
| 62 | between Ports P27/P31 and V+. |