站长论坛,免费永久网站空间,阿里云服务器配置,58黄页1. 这些IO的控制代码在哪里#xff1f;
还是蓝牙点灯程序#xff1a;
首先需要对pinout做一些精简#xff1a; 为了简化工程#xff0c;去掉了不必要的IO。
至于PTI接口是什么#xff0c;怎么用#xff0c;不知道#xff0c;现在不考虑#xff1a; 但是提出以下问题…1. 这些IO的控制代码在哪里
还是蓝牙点灯程序
首先需要对pinout做一些精简 为了简化工程去掉了不必要的IO。
至于PTI接口是什么怎么用不知道现在不考虑 但是提出以下问题
1. uart为什么要使能该使能代码在何处
2. 一个点灯程序与flash有什么关系这很多余吗
3. 下图这些配置是哪里来的进入编辑实际上是进入了软件组件的设置实现的机制进而如何自定义软件组件 以上问题综合考虑
提到最后一个问题的时候第一个问题就很容易了只需要修改UI配置即可用差分工具看到修改了何处Flash的CS和UART的使能都是bsp代码的一部分做成了一个软件模块对应了一些驱动代码
sl_system_init(); - -sl_service_init(); - -sl_board_configure_vcom(); - -sl_board_enable_vcom(); - -GPIO_PinModeSet(SL_BOARD_ENABLE_VCOM_PORT, SL_BOARD_ENABLE_VCOM_PIN, gpioModePushPull, 1);
源码地址 至于uart使能就是必须的因为中间的模拟开关必须打开 “Disable SPI Flash”是否一定要选择看下原理图 这个flash是在蓝牙主板上所以需要考虑一些IO复用的问题芯科这套开发板有个特点就是能用软件选通的地方绝不用硬件跳线能加模拟开关他就使劲加下图也有说明说是为了省电……原理图默认上拉所以代码就没必要控制了。
仅仅去掉此IO的配置编译出错似乎要卸载该驱动 然而上图这个驱动无法卸载可能是因为有其他模块依赖他。
那就删除整个board contrl自己手动添加使能uart模拟开关的代码。不过前级依赖很多不可能删除了。只能单独修改代码
该代码不是自动生成的而是sdk代码可以直接修改此处只需要在工程目录不包含即可。 还是有报错 目前不知道CATALOG组件是什么直接修改sdk的sl_board_init.c文件去掉此错误。
2. SWO代码如何精简干净 SWO的IO很容易去掉但是这些代码怎么清楚点击卸载是不行的前级的依赖也无法删除此处还是要搞清楚这个IDE的软件模块、UI的机制才行
结论牵扯较多依赖目前不能卸载。还是先着手解决IDE的一些配置警告吧。
3. 其他配置警告 可否直接修改这些依赖关系 修改原始SDK中的board_con.slcc可以改变这些依赖关系但是牵扯到改库现阶段不能改。
库不能改那能改的是什么
pinTool的配置 和 config文件夹中的.h是可以修改的每个工程是相互独立的其中config文件夹中的.h基本上都控制着相应的UI界面以下如何去掉最后一个配置警告 【sl_debug_swo_config.h】与配置界面
/***************************************************************************//*** file* brief SWO configuration******************************************************************************** # License* bCopyright 2020 Silicon Laboratories Inc. www.silabs.com/b********************************************************************************* SPDX-License-Identifier: Zlib** The licensor of this software is Silicon Laboratories Inc.** This software is provided as-is, without any express or implied* warranty. In no event will the authors be held liable for any damages* arising from the use of this software.** Permission is granted to anyone to use this software for any purpose,* including commercial applications, and to alter it and redistribute it* freely, subject to the following restrictions:** 1. The origin of this software must not be misrepresented; you must not* claim that you wrote the original software. If you use this software* in a product, an acknowledgment in the product documentation would be* appreciated but is not required.* 2. Altered source versions must be plainly marked as such, and must not be* misrepresented as being the original software.* 3. This notice may not be removed or altered from any source distribution.*******************************************************************************/#ifndef SL_DEBUG_SWO_CONFIG_H
#define SL_DEBUG_SWO_CONFIG_H// Use Configuration Wizard in Context Menu // hSWO Configuration// o SL_DEBUG_SWO_FREQ SWO Frequency
// i Must be 875 kHz for communication with Silicon Labs debuggers
// i Default: 875000
#define SL_DEBUG_SWO_FREQ 875000// q SL_DEBUG_SWO_SAMPLE_IRQ Enable interrupt event trace
// i Default: 0
#define SL_DEBUG_SWO_SAMPLE_IRQ 0// q SL_DEBUG_SWO_SAMPLE_PC Enable Program Counter samples
// i Default: 0
#define SL_DEBUG_SWO_SAMPLE_PC 0// o SL_DEBUG_SWO_SAMPLE_INTERVAL SWO debug sample intervals
// 64 64
// 128 128
// 192 192
// 256 256
// 320 320
// 384 384
// 448 448
// 512 512
// 576 576
// 640 640
// 704 704
// 768 768
// 832 832
// 896 896
// 960 960
// 1024 1024
// 2048 2048
// 3072 3072
// 4096 4096
// 5102 5102
// 6144 6144
// 7168 7168
// 8192 8192
// 9216 9216
// 10240 10240
// 11264 11264
// 12288 12288
// 13312 13312
// 14336 14336
// 15360 15360
//i Must be 64, 128, 192, [ n * 64 ], 1024, 2048, 3072, [ n * 1024 ] , 15360
//i Default: 15360
#define SL_DEBUG_SWO_SAMPLE_INTERVAL 15360
// /h// end of configuration section // sl:start pin_tool
// gpio signalSWV SL_DEBUG
// $[GPIO_SL_DEBUG]
// [GPIO_SL_DEBUG]$
// sl:end pin_tool #endif // SL_DEBUG_SWO_CONFIG_H这段代码就是配置为【none】的结果然而IDE还是识别到认为必须有这SL_DEBUG宏定义那到底需不需要全局搜索该宏发现代码中没有所以直接删除它警告立即消失。
// sl:start pin_tool
// gpio signalSWV SL_DEBUG
// $[GPIO_SL_DEBUG]
// [GPIO_SL_DEBUG]$
// sl:end pin_tool
删除后UI界面也消失了 这是临时的处理方式。应为目前还没法完全删除SWO组件。