Free B4 pin on Longan Nano Board

By default B4 has the JTAG NJRST signal with a pull up enabled. On the longan Nano
this PIN is broken out as a regular pin. So we just disable NJRST by default
and make it available as a regular GPIO.
This commit is contained in:
Stefan Kerkmann 2021-07-03 13:50:03 +02:00
parent 1021a7771f
commit 24ec55baa7
1 changed files with 2 additions and 0 deletions

View File

@ -44,4 +44,6 @@ void __early_init(void) {
* Board-specific initialization code. * Board-specific initialization code.
*/ */
void boardInit(void) { void boardInit(void) {
/* Free B4 pin by disabling JTAG NJTRST. */
AFIO->PCF0 |= AFIO_PCF0_SWJ_CFG_NOJNTRST;
} }