<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.css" type="text/css"?><rss version="2.0" xmlns:h="http://www.w3.org/1999/xhtml"><channel><title>Volio</title><description>Volio 是一本关于嵌入式开发的技术手记，记录 MCU、RTOS、通信协议、硬件、电源与调试。</description><link>https://volio.top/</link><language>zh-cn</language><h:meta name="viewport" content="width=device-width, initial-scale=1"/><h:a href="https://volio.top/">返回 Volio 首页 ↗</h:a><h:title>RSS 订阅 · Volio</h:title><h:iframe src="/feed/" title="Volio RSS 订阅"/><item><title>过采样能多换几位，换不来精度</title><link>https://volio.top/posts/adc-oversampling/</link><guid isPermaLink="true">https://volio.top/posts/adc-oversampling/</guid><description>每多 1 位分辨率需要 4 倍采样，而且输入里必须有足够的噪声。过采样能让读数更细，却无法消除失调、增益误差和基准电压的偏差。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/adc-oversampling/">阅读全文 →</h:a><category>ADC</category><category>过采样</category></item><item><title>波特率一致，CAN 仍然可能通信不上</title><link>https://volio.top/posts/can-bit-timing/</link><guid isPermaLink="true">https://volio.top/posts/can-bit-timing/</guid><description>CAN 的每一位被划分为若干时间份额，采样点落在哪里由配置决定。两个节点波特率相同、采样点相差太远，在长线或多节点时就会出现错误帧。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/can-bit-timing/">阅读全文 →</h:a><category>CAN</category><category>位时序</category></item><item><title>同样叫 CRC-32，两端算出来却不一样</title><link>https://volio.top/posts/crc-parameters/</link><guid isPermaLink="true">https://volio.top/posts/crc-parameters/</guid><description>一个 CRC 算法由宽度、多项式、初值、输入输出反转和结果异或共同决定。只说“CRC-32”是不够的，要把参数逐项写清，再用标准测试串核对校验值。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/crc-parameters/">阅读全文 →</h:a><category>CRC</category><category>校验</category></item><item><title>关中断的每一微秒，都记在别人的延迟上</title><link>https://volio.top/posts/critical-section-length/</link><guid isPermaLink="true">https://volio.top/posts/critical-section-length/</guid><description>临界区保护了共享数据，也推迟了被屏蔽的中断。临界区的最长时间会直接加到系统最坏中断延迟上，所以要测出来、压下去，能换别的手段就换。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/critical-section-length/">阅读全文 →</h:a><category>临界区</category><category>中断延迟</category></item><item><title>固件要能回答“我是谁”</title><link>https://volio.top/posts/firmware-build-info/</link><guid isPermaLink="true">https://volio.top/posts/firmware-build-info/</guid><description>现场返修的板子里跑的是哪一版代码？把版本号、提交哈希、是否有未提交改动和构建来源写进一个固定位置的结构体，调试器、Bootloader 和上位机都能读出来。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/firmware-build-info/">阅读全文 →</h:a><category>版本管理</category><category>构建</category></item><item><title>GPIO 速度档不是越快越好</title><link>https://volio.top/posts/gpio-speed-ringing/</link><guid isPermaLink="true">https://volio.top/posts/gpio-speed-ringing/</guid><description>GPIO 的输出速度设置控制的是边沿陡峭程度。边沿越陡，振铃、串扰和辐射越严重。按信号实际需要选择最低够用的档位，必要时再加源端串联电阻。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/gpio-speed-ringing/">阅读全文 →</h:a><category>GPIO</category><category>信号完整性</category></item><item><title>Flash 快满时，先读 map 文件</title><link>https://volio.top/posts/linker-map-reading/</link><guid isPermaLink="true">https://volio.top/posts/linker-map-reading/</guid><description>链接器的 map 文件记录了每个函数、每个变量落在哪个段、占了多少字节。先找出最大的那几项，再决定开优化、删功能还是换库，比盲目调编译选项有效得多。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/linker-map-reading/">阅读全文 →</h:a><category>链接器</category><category>map 文件</category></item><item><title>栅极电阻：开关快一点，还是安静一点</title><link>https://volio.top/posts/mosfet-gate-resistor/</link><guid isPermaLink="true">https://volio.top/posts/mosfet-gate-resistor/</guid><description>栅极电阻限制驱动电流，决定 MOSFET 开关的快慢。阻值小，开关损耗低但振铃与 EMI 大；阻值大，波形干净却更热。再加一个下拉电阻，避免 MCU 复位期间栅极悬空。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/mosfet-gate-resistor/">阅读全文 →</h:a><category>MOSFET</category><category>栅极驱动</category></item><item><title>互斥量不是计数为一的信号量</title><link>https://volio.top/posts/mutex-vs-semaphore/</link><guid isPermaLink="true">https://volio.top/posts/mutex-vs-semaphore/</guid><description>二值信号量和互斥量都只有“可用 / 不可用”两种状态，但互斥量有持有者、有优先级继承、只能由持有者释放。用错了，优先级反转就没有任何保护。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/mutex-vs-semaphore/">阅读全文 →</h:a><category>互斥量</category><category>信号量</category></item><item><title>NTC 测温准不准，一半在分压电阻</title><link>https://volio.top/posts/ntc-temperature/</link><guid isPermaLink="true">https://volio.top/posts/ntc-temperature/</guid><description>NTC 的阻值随温度呈指数变化，分压电阻的取值决定了哪个温度段最灵敏。再配合比例测量和查表换算，才能在关心的温度范围内拿到可靠的读数。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/ntc-temperature/">阅读全文 →</h:a><category>NTC</category><category>测温</category></item><item><title>中断优先级数字越小越优先，RTOS 却只认其中一段</title><link>https://volio.top/posts/nvic-priority-grouping/</link><guid isPermaLink="true">https://volio.top/posts/nvic-priority-grouping/</guid><description>Cortex-M 的优先级数值越小越高，STM32 只实现了高几位，还要再分成抢占与子优先级。调用 FromISR 接口的中断，优先级必须落在 RTOS 允许的那一段。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/nvic-priority-grouping/">阅读全文 →</h:a><category>NVIC</category><category>中断优先级</category></item><item><title>PWM 频率越高，占空比的台阶就越粗</title><link>https://volio.top/posts/pwm-resolution-frequency/</link><guid isPermaLink="true">https://volio.top/posts/pwm-resolution-frequency/</guid><description>定时器时钟固定时，PWM 频率与占空比分辨率此消彼长。先根据负载定频率，再算出还剩多少位分辨率；不够时考虑抖动或高分辨率定时器。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/pwm-resolution-frequency/">阅读全文 →</h:a><category>PWM</category><category>定时器</category></item><item><title>防反接：一颗二极管、一颗 P-MOS，还是一颗理想二极管</title><link>https://volio.top/posts/reverse-polarity-protection/</link><guid isPermaLink="true">https://volio.top/posts/reverse-polarity-protection/</guid><description>串联二极管最简单，但压降和发热随电流增长；高边 P-MOS 几乎没有压降，要处理好栅极钳位；理想二极管控制器还能阻止反向电流。按电流和电压选，不要一律照抄。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/reverse-polarity-protection/">阅读全文 →</h:a><category>防反接</category><category>MOSFET</category></item><item><title>环形缓冲区里，满和空长得一模一样</title><link>https://volio.top/posts/ring-buffer-full-empty/</link><guid isPermaLink="true">https://volio.top/posts/ring-buffer-full-empty/</guid><description>读写指针相等时，缓冲区可能是空的，也可能刚好写满。牺牲一格、单独计数或使用自由增长的索引，三种做法各有代价，选定之后还要讲清楚谁写谁读。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/ring-buffer-full-empty/">阅读全文 →</h:a><category>环形缓冲区</category><category>中断</category></item><item><title>SPI Flash 写完命令，不等于写进去了</title><link>https://volio.top/posts/spi-flash-busy/</link><guid isPermaLink="true">https://volio.top/posts/spi-flash-busy/</guid><description>页编程和擦除命令发出后，Flash 还要在内部忙上一段时间。拉高片选才会启动内部操作，之后要轮询忙标志、设好超时，并且不能跨页写入。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/spi-flash-busy/">阅读全文 →</h:a><category>SPI Flash</category><category>页编程</category></item><item><title>不占串口的打印：SWO 与 ITM</title><link>https://volio.top/posts/swo-itm-trace/</link><guid isPermaLink="true">https://volio.top/posts/swo-itm-trace/</guid><description>Cortex-M3 及以上的内核带 ITM 模块，可以通过调试接口上的一根 SWO 线输出日志。它不占用串口、开销很小，但只在接着调试器时可用，缓冲满了也会丢数据。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/swo-itm-trace/">阅读全文 →</h:a><category>SWO</category><category>ITM</category></item><item><title>状态机写成嵌套 switch 之前，先画成一张表</title><link>https://volio.top/posts/table-driven-fsm/</link><guid isPermaLink="true">https://volio.top/posts/table-driven-fsm/</guid><description>状态与事件交叉成一张表，每一格写明下一个状态和要执行的动作，漏处理的组合一眼可见。代码按表实现，事件逐个处理到底，状态机才容易审查和测试。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/table-driven-fsm/">阅读全文 →</h:a><category>状态机</category><category>固件架构</category></item><item><title>一对一的通知，不必每次都动用队列</title><link>https://volio.top/posts/task-notification/</link><guid isPermaLink="true">https://volio.top/posts/task-notification/</guid><description>中断只想叫醒一个任务时，任务通知比信号量和队列更轻、更快。它的限制也很明确：只有一个接收者，不能广播，也存不下多条消息。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/task-notification/">阅读全文 →</h:a><category>任务通知</category><category>FreeRTOS</category></item><item><title>波特率误差要两端一起算</title><link>https://volio.top/posts/uart-baud-error/</link><guid isPermaLink="true">https://volio.top/posts/uart-baud-error/</guid><description>分频算出的波特率误差只是一半，另一半来自时钟源本身。收发两端的误差叠加后，仍要落在接收器的容差之内，串口才能在高低温下稳定工作。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/uart-baud-error/">阅读全文 →</h:a><category>UART</category><category>波特率</category></item><item><title>一个强制类型转换，在 M0 上就是 HardFault</title><link>https://volio.top/posts/unaligned-access/</link><guid isPermaLink="true">https://volio.top/posts/unaligned-access/</guid><description>把字节缓冲区的地址强转成 uint32_t 指针再读，在 Cortex-M4 上可能正常，在 Cortex-M0 上直接 HardFault。非对齐访问要交给 memcpy 或逐字节拼装。</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/unaligned-access/">阅读全文 →</h:a><category>对齐</category><category>HardFault</category></item><item><title>ADC 读数偏低，可能是采样电容没来得及充满</title><link>https://volio.top/posts/adc-source-impedance/</link><guid isPermaLink="true">https://volio.top/posts/adc-source-impedance/</guid><description>用两颗 100 kΩ 电阻分压测电池，ADC 读数总比万用表低一截，换一个通道又不一样。问题不在 ADC 精度，而在信号源阻抗太高，采样时间内内部电容充不满。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/adc-source-impedance/">阅读全文 →</h:a><category>ADC</category><category>源阻抗</category><category>采样时间</category></item><item><title>电压慢慢掉下去时，MCU 会半醒着做错事</title><link>https://volio.top/posts/brownout-reset/</link><guid isPermaLink="true">https://volio.top/posts/brownout-reset/</guid><description>电源断开时电压往往不是一下归零，而是慢慢滑落。MCU 在这段电压不足的区间里仍在运行，会写坏 Flash、读错外设。BOR 的作用，是在电压跌破安全线时直接把芯片按在复位里。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/brownout-reset/">阅读全文 →</h:a><category>BOR</category><category>掉电</category><category>复位</category></item><item><title>同一个数，两端可能从相反的方向读</title><link>https://volio.top/posts/byte-order/</link><guid isPermaLink="true">https://volio.top/posts/byte-order/</guid><description>Cortex-M 是小端，Modbus 和大多数网络协议是大端。把收到的字节数组直接强转成结构体，在自己板子上测得通，一接对端就全错。协议字段要按字节移位拼装，不依赖主机的字节序。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/byte-order/">阅读全文 →</h:a><category>字节序</category><category>协议解析</category><category>Modbus</category></item><item><title>校验签名时，比较要花同样长的时间</title><link>https://volio.top/posts/constant-time-compare/</link><guid isPermaLink="true">https://volio.top/posts/constant-time-compare/</guid><description>用 memcmp 比较 MAC 或解锁密码，第一个字节不对就立刻返回。攻击者测量响应时间，就能一个字节一个字节地猜出正确值。安全相关的比较必须扫描全部字节，耗时与内容无关。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/constant-time-compare/">阅读全文 →</h:a><category>时序攻击</category><category>常数时间</category><category>安全</category></item><item><title>DMA 在写这一半时，CPU 只能读另一半</title><link>https://volio.top/posts/dma-double-buffer/</link><guid isPermaLink="true">https://volio.top/posts/dma-double-buffer/</guid><description>连续采样时，DMA 不会停下来等 CPU。把缓冲区分成两半，DMA 写一半、CPU 处理另一半，靠半传输和传输完成中断交替。处理时间一旦超过半个缓冲区的填充时间，数据就会被悄悄覆盖。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/dma-double-buffer/">阅读全文 →</h:a><category>DMA</category><category>双缓冲</category><category>ADC</category></item><item><title>浮点寄存器只在用到时才保存，栈却要按最坏情况留</title><link>https://volio.top/posts/fpu-lazy-stacking/</link><guid isPermaLink="true">https://volio.top/posts/fpu-lazy-stacking/</guid><description>Cortex-M4F 进入中断时，会先为浮点寄存器预留栈空间，等真正用到浮点指令才把它们写进去。省下的是时间，不是空间。一个中断里用了浮点，栈帧就从 32 字节变成 104 字节。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/fpu-lazy-stacking/">阅读全文 →</h:a><category>FPU</category><category>惰性压栈</category><category>中断</category></item><item><title>堆里剩下的内存够多，却拼不出一整块</title><link>https://volio.top/posts/heap-fragmentation/</link><guid isPermaLink="true">https://volio.top/posts/heap-fragmentation/</guid><description>设备运行几天后，申请 2 KB 失败，而剩余堆空间显示还有 8 KB。剩余的内存被切成了许多小块，没有一块足够大。嵌入式系统最稳妥的做法，是只在初始化时分配，运行中改用固定大小的内存池。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/heap-fragmentation/">阅读全文 →</h:a><category>堆</category><category>内存碎片</category><category>FreeRTOS</category></item><item><title>I²C 上拉电阻，是用总线电容和上升时间算出来的</title><link>https://volio.top/posts/i2c-pullup-sizing/</link><guid isPermaLink="true">https://volio.top/posts/i2c-pullup-sizing/</guid><description>I²C 的高电平不是驱动出来的，而是被上拉电阻慢慢拉上去的。电阻太大，上升沿跟不上时钟；太小，器件拉不低。阻值的上下限都能从规范里算出来，不必照抄 4.7 kΩ。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/i2c-pullup-sizing/">阅读全文 →</h:a><category>I²C</category><category>上拉电阻</category><category>上升时间</category></item><item><title>日志不该改变它要观察的时序</title><link>https://volio.top/posts/nonblocking-log/</link><guid isPermaLink="true">https://volio.top/posts/nonblocking-log/</guid><description>加了一行 printf，偶发的 bug 就不再出现；删掉它，问题又回来了。阻塞式串口日志每输出一行就要占用几毫秒，足以改变任务的执行顺序。日志要先进内存，再由后台慢慢送出。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/nonblocking-log/">阅读全文 →</h:a><category>日志</category><category>RTT</category><category>调试</category></item><item><title>打开优化后，空循环延时不见了</title><link>https://volio.top/posts/optimizer-delay/</link><guid isPermaLink="true">https://volio.top/posts/optimizer-delay/</guid><description>一个 for 循环写的延时，在 -O0 下好好的，切到 Release 后外设初始化失败。循环里什么都没做，编译器有权把它整个删掉。延时要依靠硬件计时，而不是依靠代码执行得有多慢。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/optimizer-delay/">阅读全文 →</h:a><category>编译优化</category><category>延时</category><category>DWT</category></item><item><title>半桥的上下管，切换时要留一段谁都不导通的时间</title><link>https://volio.top/posts/pwm-dead-time/</link><guid isPermaLink="true">https://volio.top/posts/pwm-dead-time/</guid><description>上管还没完全关断，下管就已经打开，电源会经由两个管子直接短路到地。死区时间就是两次切换之间留出的空白，它要按器件最慢的关断时间来算，而不是按经验填一个数。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/pwm-dead-time/">阅读全文 →</h:a><category>PWM</category><category>死区时间</category><category>半桥</category></item><item><title>RS-485 两端的 120 Ω，是为了不让信号弹回来</title><link>https://volio.top/posts/rs485-termination/</link><guid isPermaLink="true">https://volio.top/posts/rs485-termination/</guid><description>长线上的信号到达末端后会反射回来，与后续的边沿叠在一起。终端电阻吸收这股反射，只能放在总线两端；空闲时的电平则要靠失效保护偏置来确定。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/rs485-termination/">阅读全文 →</h:a><category>RS-485</category><category>终端电阻</category><category>失效保护</category></item><item><title>main() 之前，初值已经从 Flash 搬进了 RAM</title><link>https://volio.top/posts/startup-data-init/</link><guid isPermaLink="true">https://volio.top/posts/startup-data-init/</guid><description>全局变量的初值存放在 Flash 里，上电后由启动代码复制到 RAM，未初始化的变量再被清零，然后才进入 main()。跳过这一步，全局变量就是上一次运行留下的随机值。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/startup-data-init/">阅读全文 →</h:a><category>启动代码</category><category>链接脚本</category><category>内存布局</category></item><item><title>编译器只相信自己看到的，volatile 告诉它别人也会改</title><link>https://volio.top/posts/volatile-visibility/</link><guid isPermaLink="true">https://volio.top/posts/volatile-visibility/</guid><description>中断里置位的标志，主循环在 -O0 下能等到，开 -O2 就永远等不到。编译器以为它看见了所有修改，把读取提到了循环外面。volatile 让每次访问都真的去读内存，但它不保证原子性，也不能代替锁。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/volatile-visibility/">阅读全文 →</h:a><category>volatile</category><category>编译优化</category><category>中断</category></item><item><title>周期任务用 vTaskDelay，每一圈都会慢一点</title><link>https://volio.top/posts/vtaskdelayuntil/</link><guid isPermaLink="true">https://volio.top/posts/vtaskdelayuntil/</guid><description>vTaskDelay 从调用时刻开始计时，任务本身的执行时间和被抢占的时间都会累加进周期里，越跑越慢。周期任务要从上一次唤醒的时刻算起，用 xTaskDelayUntil，并检查它有没有错过节拍。</description><pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/vtaskdelayuntil/">阅读全文 →</h:a><category>FreeRTOS</category><category>周期任务</category><category>时间漂移</category></item><item><title>断言写给不该发生的事，不写给会发生的错</title><link>https://volio.top/posts/assert-design/</link><guid isPermaLink="true">https://volio.top/posts/assert-design/</guid><description>断言用来检查“只要程序没写错就一定成立”的条件，传感器超时、通信出错这类会发生的情况，应该正常处理。发布版也不必关掉断言，但失败时要先留下证据，再安全复位。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/assert-design/">阅读全文 →</h:a><category>断言</category><category>调试</category><category>防御式编程</category></item><item><title>参数掉电保存，至少要留两份</title><link>https://volio.top/posts/config-dual-copy/</link><guid isPermaLink="true">https://volio.top/posts/config-dual-copy/</guid><description>只有一份参数时，擦除和写入之间的任何一次掉电都会让它消失。两份副本轮流写，每份带序号和 CRC，启动时选最新的有效副本，掉电就只会丢掉这一次修改。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/config-dual-copy/">阅读全文 →</h:a><category>参数存储</category><category>掉电保护</category><category>Flash</category></item><item><title>悬空的引脚不会安分，要给它一个默认电平</title><link>https://volio.top/posts/floating-input/</link><guid isPermaLink="true">https://volio.top/posts/floating-input/</guid><description>没有接任何东西的输入脚，读到的值随手指靠近而变，还会悄悄多耗电。每一根输入脚都要有确定的电平；复位后到初始化之前的那段时间，也要靠外部电阻兜住。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/floating-input/">阅读全文 →</h:a><category>GPIO</category><category>上下拉</category><category>低功耗</category></item><item><title>上电那一瞬的电流，比稳态大得多</title><link>https://volio.top/posts/inrush-current/</link><guid isPermaLink="true">https://volio.top/posts/inrush-current/</guid><description>板子稳态只要 100 mA，插上电却把适配器打进保护、把自己拉进复位循环。原因是上电瞬间要先给大电容充电，浪涌电流由电压上升速度决定，要控制的是上升斜率。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/inrush-current/">阅读全文 →</h:a><category>浪涌电流</category><category>软启动</category><category>负载开关</category></item><item><title>SPI 两端要先约定，在哪个边沿取数</title><link>https://volio.top/posts/spi-mode-mismatch/</link><guid isPermaLink="true">https://volio.top/posts/spi-mode-mismatch/</guid><description>SPI 没有握手，也没有起始位，主从双方只靠事先约定的时钟极性与相位对齐。约定错了，数据会整体移一位，低速时偶尔还能读对，最难排查。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/spi-mode-mismatch/">阅读全文 →</h:a><category>SPI</category><category>CPOL</category><category>CPHA</category></item><item><title>计数器总会回到起点，比较时间要用减法</title><link>https://volio.top/posts/tick-wraparound/</link><guid isPermaLink="true">https://volio.top/posts/tick-wraparound/</guid><description>32 位毫秒计数约 49.7 天回绕一次。用加法算截止时间再比大小，回绕那一刻超时判断就会失效；用无符号减法算经过的时间，回绕自然被吸收。</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/tick-wraparound/">阅读全文 →</h:a><category>Tick</category><category>计数回绕</category><category>超时</category></item><item><title>固件可以永远年轻，但不能长回去</title><link>https://volio.top/posts/anti-rollback/</link><guid isPermaLink="true">https://volio.top/posts/anti-rollback/</guid><description>签名只能证明镜像来自你，不能证明它是新的。攻击者把带漏洞的旧版本刷回去，签名照样通过。防回滚要把最低安全版本写进只能单向改变的存储里，并在新版本确认后才推进。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/anti-rollback/">阅读全文 →</h:a><category>防回滚</category><category>安全启动</category><category>OTA</category></item><item><title>CAN 节点不是突然沉默的，它是被一步步关掉的</title><link>https://volio.top/posts/can-bus-off/</link><guid isPermaLink="true">https://volio.top/posts/can-bus-off/</guid><description>总线关闭不是偶发故障，而是错误计数器累积的结果。读懂 TEC、REC 与三种错误状态，才能区分是线路问题还是节点问题。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/can-bus-off/">阅读全文 →</h:a><category>CAN</category><category>总线关闭</category></item><item><title>时钟树上每根枝条都分过频，定时器那根偏偏又乘回来</title><link>https://volio.top/posts/clock-tree-apb-timer/</link><guid isPermaLink="true">https://volio.top/posts/clock-tree-apb-timer/</guid><description>STM32 的所有时钟都从一条根上长出，经 PLL 和层层预分频到达外设。APB 分频不为 1 时定时器时钟会自动翻倍，按 PCLK 计算的 PWM 频率就会差一倍。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/clock-tree-apb-timer/">阅读全文 →</h:a><category>时钟树</category><category>PLL</category><category>定时器</category></item><item><title>晶振旁的两颗电容，不能照抄负载电容的数值</title><link>https://volio.top/posts/crystal-load-capacitance/</link><guid isPermaLink="true">https://volio.top/posts/crystal-load-capacitance/</guid><description>晶振手册写的负载电容 CL 是两颗电容串联再加上杂散电容的结果。直接把 CL 填成每颗电容的值，频率会偏高；增益余量不够，低温下可能根本不起振。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/crystal-load-capacitance/">阅读全文 →</h:a><category>晶振</category><category>负载电容</category><category>起振</category></item><item><title>同一块内存，CPU 和 DMA 看到的是两副面孔</title><link>https://volio.top/posts/dcache-dma-coherency/</link><guid isPermaLink="true">https://volio.top/posts/dcache-dma-coherency/</guid><description>Cortex-M7 的数据缓存让 CPU 读到的可能是旧副本，DMA 写进内存的新数据它看不见。发送前清理、接收后作废，或者干脆把缓冲区放进不缓存的区域。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/dcache-dma-coherency/">阅读全文 →</h:a><category>D-Cache</category><category>DMA</category><category>缓存一致性</category></item><item><title>ESD 不打铠甲最厚的地方，它只找没护住的那根脚</title><link>https://volio.top/posts/esd-tvs-placement/</link><guid isPermaLink="true">https://volio.top/posts/esd-tvs-placement/</guid><description>静电只走阻抗最低的路。TVS 型号选得再好，放错位置、接地绕远，或漏掉一根外露引脚，整块板子的防护就等于没有。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/esd-tvs-placement/">阅读全文 →</h:a><category>ESD</category><category>TVS</category><category>EMC</category></item><item><title>赐福不能每走一步就点一次，Flash 也经不起每次都擦</title><link>https://volio.top/posts/flash-wear-leveling/</link><guid isPermaLink="true">https://volio.top/posts/flash-wear-leveling/</guid><description>用片内 Flash 保存参数时，擦写次数是有限的，扇区又大又慢。把写入攒起来、轮流使用多个位置，并在掉电时保证总有一份完整的旧数据可以回去。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/flash-wear-leveling/">阅读全文 →</h:a><category>Flash</category><category>磨损均衡</category><category>参数存储</category></item><item><title>代码和数据住在同一座房子里，却走不同的门</title><link>https://volio.top/posts/harvard-von-neumann/</link><guid isPermaLink="true">https://volio.top/posts/harvard-von-neumann/</guid><description>Cortex-M 的地址空间是冯·诺依曼式的统一编址，总线却是哈佛式的分开取指。把代码搬到 SRAM 里不一定更快，问题出在走了哪扇门。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/harvard-von-neumann/">阅读全文 →</h:a><category>冯·诺依曼架构</category><category>哈佛架构</category><category>总线矩阵</category></item><item><title>腐败会蔓延，所以要先给每块内存划好边界</title><link>https://volio.top/posts/mpu-guard-region/</link><guid isPermaLink="true">https://volio.top/posts/mpu-guard-region/</guid><description>一次越界写入会悄悄污染相邻的数据，直到很久以后才在别处崩溃。Cortex-M 的 MPU 能把栈底、外设和代码区各自圈起来，让越界在发生的那一刻就被抓住。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/mpu-guard-region/">阅读全文 →</h:a><category>MPU</category><category>内存保护</category><category>MemManage</category></item><item><title>读保护不是面纱，掀开它要付出整片 Flash</title><link>https://volio.top/posts/readout-protection/</link><guid isPermaLink="true">https://volio.top/posts/readout-protection/</guid><description>STM32 的读保护挡住的是调试器，不是加密。Level 1 可以回退但会擦光 Flash，Level 2 永远关上调试口；上线前要想清楚升级与返修怎么走。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/readout-protection/">阅读全文 →</h:a><category>读保护</category><category>RDP</category><category>固件安全</category></item><item><title>倒下之后先看清死因，再从赐福点起身</title><link>https://volio.top/posts/reset-cause/</link><guid isPermaLink="true">https://volio.top/posts/reset-cause/</guid><description>设备每次重启都留下了线索：复位标志寄存器记录了是上电、看门狗、软件还是欠压导致的复位。上电第一件事读出并清除它，现场问题才有迹可循。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/reset-cause/">阅读全文 →</h:a><category>复位原因</category><category>RCC_CSR</category><category>调试</category></item><item><title>从 Stop 模式回来，时钟已经不是原来的时钟</title><link>https://volio.top/posts/stop-mode-wakeup/</link><guid isPermaLink="true">https://volio.top/posts/stop-mode-wakeup/</guid><description>STM32F4 退出 Stop 模式后，系统时钟回到 HSI，PLL 与 HSE 都已关闭。唤醒后不重新配置时钟，串口波特率和定时全都会悄悄出错。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/stop-mode-wakeup/">阅读全文 →</h:a><category>低功耗</category><category>Stop 模式</category><category>时钟</category></item><item><title>每毫秒被叫醒一次的系统，不算真正睡着</title><link>https://volio.top/posts/tickless-idle/</link><guid isPermaLink="true">https://volio.top/posts/tickless-idle/</guid><description>RTOS 的系统节拍每毫秒唤醒一次 CPU，空闲时也不例外。打开 FreeRTOS 的 tickless idle，内核会算出下一次需要醒来的时刻，一次睡到那时再补齐节拍。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/tickless-idle/">阅读全文 →</h:a><category>Tickless</category><category>低功耗</category><category>FreeRTOS</category></item><item><title>无法证明它会结束，所以每一次等待都要有期限</title><link>https://volio.top/posts/timeout-everywhere/</link><guid isPermaLink="true">https://volio.top/posts/timeout-everywhere/</guid><description>图灵证明了没有通用方法判断程序是否停机。嵌入式里每一个 while 等待标志、每一个 HAL_MAX_DELAY，都是在赌它会结束；给等待加上期限和退路，才是可交付的代码。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/timeout-everywhere/">阅读全文 →</h:a><category>超时</category><category>停机问题</category><category>健壮性</category></item><item><title>I²C 总线卡死时，先把数据线要回来</title><link>https://volio.top/posts/i2c-bus-recovery/</link><guid isPermaLink="true">https://volio.top/posts/i2c-bus-recovery/</guid><description>主机复位不会让从机忘记传输。用最多九个时钟脉冲和一个 STOP 释放被拉住的 SDA，再重新初始化外设。</description><pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/i2c-bus-recovery/">阅读全文 →</h:a><category>I²C</category><category>总线恢复</category></item><item><title>高优先级任务在等的，可能不是锁</title><link>https://volio.top/posts/priority-inversion/</link><guid isPermaLink="true">https://volio.top/posts/priority-inversion/</guid><description>优先级反转让不相干的中等优先级任务插在持锁者前面。理解互斥量的优先级继承，也要知道它解决不了什么。</description><pubDate>Wed, 14 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/priority-inversion/">阅读全文 →</h:a><category>RTOS</category><category>互斥量</category></item><item><title>栈不会提醒你，它只会悄悄用完</title><link>https://volio.top/posts/stack-high-water/</link><guid isPermaLink="true">https://volio.top/posts/stack-high-water/</guid><description>栈溢出常以别处的崩溃出现。用填充图案和高水位记录每个任务真实用了多少，再决定留多少余量。</description><pubDate>Tue, 13 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/stack-high-water/">阅读全文 →</h:a><category>栈溢出</category><category>FreeRTOS</category></item><item><title>从一个字节到一帧数据：UART 接收的边界</title><link>https://volio.top/posts/uart-dma-receive/</link><guid isPermaLink="true">https://volio.top/posts/uart-dma-receive/</guid><description>DMA 搬运字节，协议定义边界。把接收缓冲、空闲事件与帧校验分开，串口通信才真正可控。</description><pubDate>Mon, 12 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/uart-dma-receive/">阅读全文 →</h:a><category>UART</category><category>DMA</category></item><item><title>中断里只做必须马上做的事</title><link>https://volio.top/posts/isr-keep-short/</link><guid isPermaLink="true">https://volio.top/posts/isr-keep-short/</guid><description>中断服务程序越长，其他中断和任务等得越久。把“记录事件”留在中断里，把“处理事件”交给任务，系统的响应时间才可预期。</description><pubDate>Sun, 11 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/isr-keep-short/">阅读全文 →</h:a><category>中断</category><category>FreeRTOS</category></item><item><title>任务会醒来，截止时间不会等待</title><link>https://volio.top/posts/rtos-task-budget/</link><guid isPermaLink="true">https://volio.top/posts/rtos-task-budget/</guid><description>从任务周期、执行预算和阻塞时间出发，给 RTOS 调度建立一张能够验证的时间表。</description><pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/rtos-task-budget/">阅读全文 →</h:a><category>RTOS</category><category>调度</category></item><item><title>电池电压不等于剩余电量</title><link>https://volio.top/posts/battery-soc/</link><guid isPermaLink="true">https://volio.top/posts/battery-soc/</guid><description>锂电池的电压曲线中段平坦、带载会下陷、随温度漂移。按电压查表、库仑计数与电量计芯片各有边界，先知道误差从哪里来。</description><pubDate>Fri, 09 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/battery-soc/">阅读全文 →</h:a><category>电池</category><category>电量估算</category></item><item><title>HardFault 之后，把现场留住</title><link>https://volio.top/posts/hardfault-evidence/</link><guid isPermaLink="true">https://volio.top/posts/hardfault-evidence/</guid><description>先保留异常上下文，再解释故障。让寄存器、堆栈和固件版本形成一条可追溯的线索。</description><pubDate>Thu, 08 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/hardfault-evidence/">阅读全文 →</h:a><category>HardFault</category><category>SWD</category></item><item><title>从 Bootloader 跳到应用之前，先把门关好</title><link>https://volio.top/posts/bootloader-jump/</link><guid isPermaLink="true">https://volio.top/posts/bootloader-jump/</guid><description>跳转只是一条指令，难的是把 Bootloader 留下的现场清理干净。中断、时钟、外设和栈指针，任何一项遗留都可能在应用里以奇怪的方式出现。</description><pubDate>Wed, 07 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/bootloader-jump/">阅读全文 →</h:a><category>Bootloader</category><category>启动流程</category></item><item><title>走线之外，还要看见回流</title><link>https://volio.top/posts/pcb-return-path/</link><guid isPermaLink="true">https://volio.top/posts/pcb-return-path/</guid><description>电流形成回路。把信号与参考平面放在一起思考，从原理图走向可验证的 PCB 设计。</description><pubDate>Tue, 06 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/pcb-return-path/">阅读全文 →</h:a><category>PCB</category><category>EMC</category></item><item><title>按一次键，为什么会触发五次</title><link>https://volio.top/posts/button-debounce/</link><guid isPermaLink="true">https://volio.top/posts/button-debounce/</guid><description>机械触点闭合时会反复弹跳。用 RC 滤波与施密特输入在硬件上削平，或用定时采样在软件里确认，关键是先测出弹跳有多长。</description><pubDate>Mon, 05 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/button-debounce/">阅读全文 →</h:a><category>按键</category><category>消抖</category></item><item><title>低功耗的第一步，是测准每一段时间</title><link>https://volio.top/posts/low-power-measurement/</link><guid isPermaLink="true">https://volio.top/posts/low-power-measurement/</guid><description>不只看休眠电流。把唤醒、计算、通信和等待放到同一条时间轴，寻找真正值得优化的部分。</description><pubDate>Sun, 04 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/low-power-measurement/">阅读全文 →</h:a><category>低功耗</category><category>电源</category></item><item><title>一次可靠的 OTA，要允许失败</title><link>https://volio.top/posts/ota-recovery-design/</link><guid isPermaLink="true">https://volio.top/posts/ota-recovery-design/</guid><description>写入成功只是开始。把镜像校验、启动确认、回滚与断电恢复作为同一套升级状态机设计。</description><pubDate>Fri, 02 Oct 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/ota-recovery-design/">阅读全文 →</h:a><category>OTA</category><category>Bootloader</category></item><item><title>去耦电容，要放在电流转弯的地方</title><link>https://volio.top/posts/decoupling-placement/</link><guid isPermaLink="true">https://volio.top/posts/decoupling-placement/</guid><description>电容值写在原理图上，效果取决于 PCB。把电源引脚、电容和地过孔组成的回路做小，去耦才真正起作用。</description><pubDate>Wed, 30 Sep 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/decoupling-placement/">阅读全文 →</h:a><category>PCB</category><category>去耦</category></item><item><title>LDO 还是 DC-DC：先把热量和噪声算清楚</title><link>https://volio.top/posts/ldo-or-dcdc/</link><guid isPermaLink="true">https://volio.top/posts/ldo-or-dcdc/</guid><description>选电源不是二选一的口号。用压差、负载电流、静态电流和噪声敏感度列一张表，答案通常自己就会出现。</description><pubDate>Mon, 28 Sep 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/ldo-or-dcdc/">阅读全文 →</h:a><category>电源</category><category>LDO</category><category>DC-DC</category></item><item><title>看门狗不该被一个定时器喂饱</title><link>https://volio.top/posts/watchdog-design/</link><guid isPermaLink="true">https://volio.top/posts/watchdog-design/</guid><description>在定时中断里喂狗，只能证明中断还活着。让每个关键任务按时报到，再由一个地方决定是否喂狗。</description><pubDate>Sat, 26 Sep 2026 00:00:00 GMT</pubDate><h:a href="https://volio.top/posts/watchdog-design/">阅读全文 →</h:a><category>看门狗</category><category>可靠性</category></item></channel></rss>