Hi,
I have problem with program nrf21540 UICR EFUSE. The first time, WR-UICR was able to successfully write, and after reset the reading of reg0 displayed correctly. But the second attempt to write WR-UICR failed, and after reset, reading reg0 is the value written in the first attempt.
so,May I ask if the nrf21540 gain adjustment can only be set once?
thanks.
my code:
//1 read reg 0
data = Spi_Read(0x00);
NRF_LOG_INFO("0x%x",data);
//2 write reg 1,enable uICR
Spi_Write(0x04,0x01);
data = Spi_Read(0x01);
NRF_LOG_INFO("0x%x",data);
nrf_delay_ms(100);
Spi_Write(0xf0,0x01);
data = Spi_Read(0x01);
NRF_LOG_INFO("0x%x",data);
nrf_gpio_pin_set(LED_1);
nrf_delay_ms(100);
//3. write reg3
Spi_Write(0x04,0x03);
nrf_delay_ms(10);
data = Spi_Read(0x03);
NRF_LOG_INFO("reg3--0x%x",data);
//4.write reg 2
Spi_Write(0x81,0x02);
nrf_delay_ms(10);
data = Spi_Read(0x02);
NRF_LOG_INFO("reg2-0x%x",data);
nrf_delay_ms(10);
//5.reset
PDN_LOW;
nrf_delay_ms(100);
PDN_HIGH;