Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wovo committed Jan 8, 2021
1 parent ca5d2c0 commit 5ab3039
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/targets/hwlib-stm32f1xx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,13 @@ namespace stm32f1xx {
}

// b04 = NJTRST
if(( port_number == 1 ) && ( pin_number == 04 )){
if(( port_number == 1 ) && ( pin_number == 4 )){
// https://electronics.stackexchange.com/questions/318115/stm32f103-how-to-use-pb4-as-normal-gpio-njtrst-remap-not-working
//MODIFY_REG(AFIO->MAPR, AFIO_MAPR_SWJ_CFG, AFIO_MAPR_SWJ_CFG_NOJNTRST)

RCC->APB2ENR |=1; // Enable AFIO clock
AFIO->MAPR |= (1<<26);
// this bricks the device??
// RCC->APB2ENR |=1; // Enable AFIO clock
// AFIO->MAPR |= (1<<26);
}
}

Expand Down

0 comments on commit 5ab3039

Please sign in to comment.