chen
2024-12-19 b19a5d05cc69239f358b43c4508f2dbffefee269
加入PA控制版本
已修改4个文件
18 ■■■■ 文件已修改
boards/mk8000_evk/driver_examples/power_cycling/keil/power_cycling.uvprojx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
boards/mk8000_evk/driver_examples/power_cycling/pin_config.c 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
boards/src/driver_examples/power_cycling/main.c 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
drivers/mk_uwb.c 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
boards/mk8000_evk/driver_examples/power_cycling/keil/power_cycling.uvprojx
@@ -52,7 +52,7 @@
          <OutputName>power_cycling</OutputName>
          <CreateExecutable>1</CreateExecutable>
          <CreateLib>0</CreateLib>
          <CreateHexFile>0</CreateHexFile>
          <CreateHexFile>1</CreateHexFile>
          <DebugInformation>1</DebugInformation>
          <BrowseInformation>1</BrowseInformation>
          <ListingPath>.\Listings\</ListingPath>
boards/mk8000_evk/driver_examples/power_cycling/pin_config.c
@@ -48,4 +48,8 @@
    io_pin_mux_set(IO_PIN_5, IO_FUNC4);
    io_pin_mux_set(IO_PIN_6, IO_FUNC4);
#endif
//    gpio_pin_set_dir(IO_PIN_10, GPIO_DIR_OUT, 0);
//    io_pull_set(IO_PIN_10, IO_PULL_DOWN, IO_PULL_UP_NONE);
//    gpio_pin_set_dir(IO_PIN_10, GPIO_DIR_OUT, 1);
}
boards/src/driver_examples/power_cycling/main.c
@@ -282,6 +282,11 @@
#endif
    gpio_open();
        //PA引脚
        io_pin_mux_set(IO_PIN_9, IO_FUNC0);
        io_pin_mux_set(IO_PIN_10, IO_FUNC0);
     gpio_pin_set_dir(IO_PIN_9, GPIO_DIR_OUT, 0);
     io_pull_set(IO_PIN_9, IO_PULL_DOWN, IO_PULL_UP_LEVEL4);
    board_led_init();
    board_configure();
@@ -363,7 +368,11 @@
            case TEST_RF_CARRIER:
                break;
            case TEST_UWB_TX:
//                                gpio_pin_set(IO_PIN_9);//测试;
//                                gpio_pin_clr(IO_PIN_10);//测试;
                uwb_blocking_tx_start(tx_payload, tx_len, 0);
//                                gpio_pin_clr(IO_PIN_9);//测试;
//                                gpio_pin_clr(IO_PIN_10);//测试;
                break;
            case TEST_UWB_RX:
                uwb_blocking_rx_start(0, NULL);
drivers/mk_uwb.c
@@ -612,7 +612,8 @@
    uint32_t elapsed_time = 0;
    uint32_t count = 0;
    uint32_t start = sys_timer_get();
            gpio_pin_set(IO_PIN_9);//测试;
            gpio_pin_clr(IO_PIN_10);//测试;
    while (flag_uwb_sw_trx_start)
    {
        while (sys_timer_get() - start < 624) // 10us