Exemple #1
0
void cmd_sequential_debug_gpio_toggling(void) {
    SerialUSB.println("Toggling all debug (JTAG/SWD) pins sequentially. "
                      "This will permanently disable debug port "
                      "functionality.");
    disableDebugPorts();

    for (int i = 0; i < N_DEBUG_PINS; i++) {
        pinMode(debugGPIOPins[i], OUTPUT);
    }

    for (int i = 0; i < N_DEBUG_PINS; i++) {
        int pin = debugGPIOPins[i];
        SerialUSB.print("Toggling pin ");
        SerialUSB.print(pin, DEC);
        SerialUSB.println("...");

        pinMode(pin, OUTPUT);
        do {
            togglePin(pin);
        } while (!SerialUSB.available());

        digitalWrite(pin, LOW);
        if (SerialUSB.read() == ESC)
            break;
    }

    for (int i = 0; i < N_DEBUG_PINS; i++) {
        digitalWrite(debugGPIOPins[i], 0);
    }
}
//Initialize functions for the board
//Starts up 
void init(void) {
    setup_flash();
    setup_clocks();
    setup_nvic();
    systick_init(SYSTICK_RELOAD_VAL);
    board_setup_gpio();
    setup_timers();
    board_setup_usb();
    series_init();
    disableDebugPorts();

}
Exemple #3
0
void cmd_debug_gpio_toggling(void) {
    SerialUSB.println("Toggling debug GPIO simultaneously. "
                      "This will permanently disable JTAG and Serial Wire "
                      "debug port functionality. "
                      "Press any key to stop.");
    disableDebugPorts();

    for (uint32 i = 0; i < N_DEBUG_PINS; i++) {
        pinMode(debugGPIOPins[i], OUTPUT);
    }

    while (!SerialUSB.available()) {
        for (uint32 i = 0; i < N_DEBUG_PINS; i++) {
            togglePin(debugGPIOPins[i]);
        }
    }

    for (uint32 i = 0; i < N_DEBUG_PINS; i++) {
        digitalWrite(debugGPIOPins[i], LOW);
    }
}
Exemple #4
0
/* Since we want the Serial Wire/JTAG pins as GPIOs, disable both SW
 * and JTAG debug support, unless configured otherwise. */
void boardInit(void) {
#ifndef CONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
    disableDebugPorts();
#endif
}
Exemple #5
0
/* Since we want the Serial Wire/JTAG pins as GPIOs, disable both SW
 * and JTAG debug support */
void boardInit(void) {
    disableDebugPorts();
}