Dialog Semiconductor customer support - DA14531 OTP CS ROM https://support.dialog-semiconductor.com/resource-keywords/da14531-otp-cs-rom en DA14531 OTP CS will stuck chip if add value 'Stop' https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/da14531-otp-cs-will-stuck-chip-if-add < divclass="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above">
Forums: 

I use SmartSnippetsToolbox to test DA14531`s OTP CS. The last selection is "Stop:Indicates that the configuration script has reached the end".

But I set this,the Chip was stuck in BOOT. And I can`t connect it with SWD. The Application in the OTP wasn`t run.

I Decompile the ROM code In DA14531,and I found this:

if ( cs_data < 0x40000000 || (result = 0x5000424C, cs_data > 0x5000424C) )
sub_156C();

the ROM process 0x000 as a calibration value,which it will got stuck in sub_156C(); with a endless loop similar to ASSERT_WARINIG(0)

void __noreturn sub_156C()
{
MEMORY[0x50003302] = 8;
MEMORY[0x50003102] = 2 * (MEMORY[0x50003102] >> 1) + 1;
MEMORY[0x50003100] = 5;
while ( 1 )
;
}

and the CS will stop running in this way when value=0xFFFFFFFF

cs_data_cur = configure_script_read_next_word(cs_read_pos);
cs_data = cs_data_cur;
v8 = 0;
result = cs_data_cur + 1;
if ( !result )
break;

So, I can sure that the ROM code had a little difference between SmartSnippetsToolbox. The "Stop" selection will let some user brick their chip.

Please add the warning "CS should not be 0x00000000" into the datasheet and remove the selection in SmartSnippetsToolbox.

Device: 
2020年3月27日,星期五,15:18:44 + 0000 wanhuaqifang 349754 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/da14531-otp-cs-will-stuck-chip-if-add#comments