Hi Sara Stout-Grandy,
Now let me tell you the details:
TPM_BWR_CONF_CSOO(tpmbase, 0);
TPM_WR_CONF_CSOO(tpmbase, 0);
All the above code is used to set the CSOO bit to a new value.
(1)TPM_WR_CONF_CSOO(tpmbase, 0);
#define TPM_WR_CONF_CSOO(base, value) (TPM_WR_CONF(base, (TPM_RD_CONF(base) & ~TPM_CONF_CSOO_MASK) | TPM_CONF_CSOO(value)))
#define TPM_WR_CONF(base, value) (TPM_CONF_REG(base) = (value))
Use normal C code to define the TPMx_CONF[CSOO] bit to a new value.
(2)TPM_WR_CONF_CSOO(tpmbase, 0);
#define TPM_BWR_CONF_CSOO(base, value) (BME_BFI32(&TPM_CONF_REG(base), ((uint32_t)(value) << TPM_CONF_CSOO_SHIFT), TPM_CONF_CSOO_SHIFT, TPM_CONF_CSOO_WIDTH))
#define BME_BFI32(addr, wdata, bit, width) (*(volatile uint32_t*)((uintptr_t)addr | BME_BFI_MASK(bit,width)) = wdata)
Use the BME code BFI function to define TPMx_CONF[CSOO] bit to a new value.
Normally, use BME code will caused less time than the Normal C code, you can run the KL25 BME code find the detail difference:
http://www.nxp.com/assets/downloads/data/en/lab-test-software/KL25_SC.exe
Folder: kl25_sc_rev10\klxx-sc-baremetal\build\iar\LQRUG_bme_ex1

You can find, use the normally C, the same function will caused 0x1b systick counts, but use the BFI code, it only caused 0x16 sysick counts.
In conclusion, BME code save cpu execution time.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------