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.