|
#define __HAL_AFIO_REMAP_TIM2_PARTIAL_1() do{ CLEAR_BIT(AFIO->MAPR, AFIO_MAPR_TIM2_REMAP); \ SET_BIT(AFIO->MAPR, AFIO_MAPR_TIM2_REMAP_PARTIALREMAP1); \( s7 X. p5 _8 X. h% s }while(0U) CUBEMX version4.22.1 used stm32f103vct6 调试模式是sw MAPR寄存器不能直接读 直接读写回去导致sw掉线 Bits 26:24 SWJ_CFG[2:0]: Serial wire JTAG configuration& T0 i# s5 O% d These bits are write-only (when read, the value is undefined! G# h" \* q$ l' R! ^ ). They are used to configure the$ I' J8 t% `* A SWJ and trace alternate function I/Os. The SWJ (Serial Wire JTAG) supports JTAG or SWD8 F2 c! a. {* n- { access to the Cortex debug port. The default state after reset is SWJ ON without trace. This allows JTAG or SW mode to be enabled by sending a specific sequence on the JTMS /& c* e( Q# C( h9 G3 o3 ^ JTCK pin.' [) K- Q0 H2 \+ ` 000: Full SWJ (JTAG-DP + SW-DP): Reset State 001: Full SWJ (JTAG-DP + SW-DP) but without NJTRST 010: JTAG-DP Disabled and SW-DP Enabled8 n8 H8 S4 L X! M5 W8 G% ^0 o 100: JTAG-DP Disabled and SW-DP Disabled; F) d4 X3 P* N2 P! e* B: V Other combinations: no effect |
| 帮顶 |
微信公众号
手机版