I have tried to configure DB2 and DB3 as GPIOs without success. The test program I made is the following:
- Code: Select all
static void TogglePort(uint32_t arg, uint8_t repetition)
{
GPIO_PinOutToggle(TIM2_PORT, TIM2_BIT);
GPIO_PinOutToggle(DB2_PORT, DB2_BIT);
GPIO_PinOutToggle(DB3_PORT, DB3_BIT);
}
void TD_USER_Setup(void)
{
// Initialize DB2 and TIM2 as outputs
GPIO_PinModeSet(TIM2_PORT, TIM2_BIT, gpioModePushPull, 0);
GPIO_PinModeSet(DB2_PORT, DB2_BIT, gpioModePushPull, 0);
GPIO_PinModeSet(DB3_PORT, DB3_BIT, gpioModePushPull, 0);
// Initialize timer with 500ms interval and infinite repetitions, callback TogglePort, Arg 0
TD_SCHEDULER_Append(0, 16384, 0, TD_SCHEDULER_INFINITE, TogglePort, 0);
}
When running this program, I can see with the oscilloscope the pulses generated in the TIM2 port but I don't see anything in the DB2 and DB3 port. I tried to run the program with the EFM32 Jlink debugger connected as well as with the debugger disconnected, and the result was the same.
So... Does anyone know what is happening and why this isn't working?
Thanks,
Miguel