UICR reading and writing issues

[Environ]

nRF Connect SDK v3.2.1
nRF9151 (Custom board)
VSCode (1.110.0)
Board target: board/nrf9151/ns

[prj.conf]

# nrfx_ Flash Access
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NRFX_NVMC=y
# TF-M platform
CONFIG_TFM_PARTITION_PLATFORM=y

The following issues occur when operating UICR.

1. After using the tfm_platform_mem_read() function, no interrupt occurs.

Used code:

	uint32_t uicrAddr = (uint32_t)&(NRF_UICR_S->OTP[readAddr]);	// readAddr = 0;
	uint32_t uicrVal = 0x1;
	uint32_t err = 0;
	enum tfm_platform_err_t plt_err;
	plt_err = tfm_platform_mem_read(&uicrVal, uicrAddr, sizeof uicrVal, &err);

The result is a successful completion with TFM_PLATFORM_ERR_SUCCESS, but no subsequent interrupts such as timers occur.

What no longer works: (Other functions unknown)

  • k_timer_start(&Timer10ms, K_NO_WAIT, K_MSEC(10));
  • Unable to transmit using uart_irq_tx_enable().
  • Unable to receive using uart_irq_rx_enable().

2. The tfm_platform_mem_write32() function fails.

Used code:

	uint32_t uicrAddr = (uint32_t)&(NRF_UICR_S->OTP[writeAddr]);	// writeAddr = 0;
	const uint32_t mask = 0xFFFFFFFF;
	uint32_t err = 0;
	// uint32_t wordVal = 20; (example)
	enum tfm_platform_err_t plt_err;
	plt_err = tfm_platform_mem_write32(uicrAddr, wordVal, mask, &err);
	// plt_err = TFM_PLATFORM_ERR_INVALID_PARAM

What could the problem be?

Best regards,
Kato.

Parents Reply
  • Thanks, your constant support.

    Is that this description?

    Added a possibility to read UICR.OTP registers through platform services.

    I understand that this is a limitation.

    It's difficult to understand. However, this is considered to be the current operating specification.
    The error codes(TFM_PLATFORM_ERR_INVALID_PARAM) are also difficult to understand.

    It's difficult to cover all the release notes.
    Please let me know if there's any other explanation beyond the release notes.

    Best regards,
    Kato.

Children
No Data
Related