I saw共存架构in datasheet page 159。
And I added the following to the source code to check case 3 in the 160 page:
PMU_CTRL_REG [PERIPH_SLEEP] = 0。< br / > 2。在编程块的寄存器之前,必须断言CLK_RADIO_REG[RFCU_EN]位。< br / > 3。Pxy_MODE_REG[PID] = 48 or 49 (COEX_EXT_ACT0 or COEX_EXT_ACT1),
SMART_ACT (Pxy_MODE_REG[PID] = 50)
SMART_PRI (Pxy_MODE_REG[PID] = 51)
COEX_CTRL_REG[SMART_ACT_IMPL] = 1
我在示例(rf_tools_cli)中添加了源代码。
main.c
static void system_init(void *pvParameters)
{
................
REG_CLR_BIT(CRG_TOP, PMU_CTRL_REG, PERIPH_SLEEP);
REG_SET_BIT(CRG_TOP, CLK_RADIO_REG, RFCU_ENABLE);
hw_coex_config_reset();
REG_SET_BIT(COEX, COEX_CTRL_REG, SMART_ACT_IMPL);
hw_gpio_set_pin_function(HW_GPIO_PORT_3, HW_GPIO_PIN_0, HW_GPIO_MODE_INPUT_PULLDOWN, HW_GPIO_FUNC_COEX_EXT_ACT0);
hw_gpio_set_pin_function(HW_GPIO_PORT_3, HW_GPIO_PIN_1, HW_GPIO_MODE_OUTPUT_PUSH_PULL, HW_GPIO_FUNC_COEX_SMART_ACT);
hw_gpio_set_pin_function(HW_GPIO_PORT_3, HW_GPIO_PIN_2, HW_GPIO_MODE_OUTPUT_PUSH_PULL, HW_GPIO_FUNC_COEX_SMART_PRI);
hw_gpio_set_active(3, 0);
hw_gpio_set_active(3, 1);
hw_gpio_set_active(3, 2);
..................
}
And I running ble_txstream command, I observed each pin. As a result, only Smart_Act turned high. ( I guess is that the state of smart_act, smart_pri is High).
What did I do wrong?