I try to find why i cannot remap pin PA15 but i miss something important.
I'm using my custom board based on stm32 f103c8t6. Code is following:
Code: Select all
main() {
halInit();
chSysInit();
// disable JTAG, free PA15 pin
AFIO->MAPR &= 0xF0FFFFFF;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NOJNTRST;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
chThdSleepMilliseconds(100);
palSetPadMode(IOPORT1, 15, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(IOPORT1, 15);
chThdSleepMilliseconds(100);
palSetPad(IOPORT1, 15);
...
And nothing happen, state on PA15 did not changed. What i miss?
Thanks!