Skip to content

Commit

Permalink
FIX: JTAG disable
Browse files Browse the repository at this point in the history
  • Loading branch information
r2axz committed Nov 18, 2020
1 parent 80693ef commit 98ea97f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions usb_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ void usb_cdc_reset() {
* this frees PA15, PB3, PB4 (needed for DSR inputs).
*/
RCC->APB2ENR |= RCC_APB2ENR_AFIOEN;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
RCC->AHBENR |= RCC_AHBENR_DMA1EN;
/* DSR/DCD inputs configuration */
GPIOB->CRL &= ~(GPIO_CRL_CNF4 | GPIO_CRL_CNF6 | GPIO_CRL_CNF7);
Expand Down

0 comments on commit 98ea97f

Please sign in to comment.