Hello,
during production test we wrote in the UICR a signature saying that the test has been performed succesfully.
It happens that the signature is not written correclty. Some bits are zero instead of one. THe supposed signature is 0x04 0x11 0x17 0x05 and I got 0x07 instead of 0x17.
It does not happen often, but it is annoying (roughly one chip every 100).
I have copied below the procedure we use to store the info into UICR registers.
Before running this test, the chips are erased (using the chip erase functionaltiy) with a Segger ATE programmer, so I suppose that the register content should be completed 0xFFFFed before running the code below.
https://www.segger.com/products/production/flasher/models/gang-programmer-flasher-ate/
But maybe it is not and this is the cause of the issue. Are you aware of any problem in the Segger algorythms?
Is the procedure to write UICR correct?
Thanks
Andrea
int signProductionTest(uint32_t signValue)
{
// Switch off soft device
BLE_and_SD_DEInit();
NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos);
while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
NRF_UICR->CUSTOMER[1]= signValue;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos);
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
return 0;
}
and this is the other function involved in the matter:
void BLE_and_SD_DEInit(void)
{
uint8_t sd_enabled;
sd_softdevice_is_enabled(&sd_enabled);
if (sd_enabled)
{
kippy_ble_adv_stop();
sd_clock_hfclk_release();
softdevice_handler_sd_disable();
sd_softdevice_disable();
}
}