Issue after enabling Flash Read Protection

Hello,

I have my BLE Gatt Peripheral application working and running.

I am developing a reader that reads BLE credential.

Application is complete. I flash the .hex file and reads the BLE credential from mobile app without power cycling.

I then added Readback protection to my application.

Once i flash this application, i verified Readback is protected (since i added WARM_RESET after enabling APPROTECT), but my BLE credential doesn't read (although reader sees advertisement).

I have to power cycle the reader and then it reads.

I want suggestion to fix this issue. I want to read the BLE credential right after flashing the application without power cycling.

Thanks.

		#ifdef ENABLE_APPROTECT
			//Check if Read Protection is Enabled
			if ((NRF_UICR->APPROTECT & UICR_APPROTECT_PALL_Msk) !=
				(UICR_APPROTECT_PALL_Enabled << UICR_APPROTECT_PALL_Pos)) 
			{
				/* Enable Access Port Protection
				* Access through debugger to CPU registers, mapped-memory and RAM will be disabled
				* To disable protection ERASEALL command must be applied. */

				//Enable HW APPROTECT
				WriteWordNrfNvmcCfg((uint32_t)&NRF_UICR->APPROTECT, 
									((NRF_UICR->APPROTECT & ~((uint32_t)UICR_APPROTECT_PALL_Msk)) | 
									 (UICR_APPROTECT_PALL_Enabled << UICR_APPROTECT_PALL_Pos)));

				//Reset to activate
				sys_reboot(SYS_REBOOT_WARM);
			}
			else
			{
				//Access Port Protection is enabled
				
			}
		#else
			// CTRL-AP ERASEALL command will be applied during Flash / Debug Process which makes Access Port Protection disabled
		#endif //ENABLE_APPROTECT

Parents
  • There seems like a bug in VScode nRF Connect extension.
    The Release Build FW has ReadBack Protection enabled.
     -> If release build fw is flashed using VScode extension, BLE credential doesn't read, unless reader is power cycled.
     -> If release build fw is flashed using Programmer application {inside nRF Connect SDK (Windows Desktop Application)}, reads without needing to power cycle
Reply
  • There seems like a bug in VScode nRF Connect extension.
    The Release Build FW has ReadBack Protection enabled.
     -> If release build fw is flashed using VScode extension, BLE credential doesn't read, unless reader is power cycled.
     -> If release build fw is flashed using Programmer application {inside nRF Connect SDK (Windows Desktop Application)}, reads without needing to power cycle
Children
No Data
Related