diff --git a/arch/arm/src/samv7/sam_tc.c b/arch/arm/src/samv7/sam_tc.c index 98c5347a8c..b8fd7abe41 100644 --- a/arch/arm/src/samv7/sam_tc.c +++ b/arch/arm/src/samv7/sam_tc.c @@ -702,7 +702,7 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, { /* Yes... show how many times we did it */ - tmrinfo("...[Repeats %d times]...\n", tc->ntimes); + tmrllinfo("...[Repeats %d times]...\n", tc->ntimes); } /* Save information about the new access */ @@ -737,7 +737,7 @@ static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(tc, false, regaddr, regval)) { - tmrinfo("%08x->%08x\n", regaddr, regval); + tmrllinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -761,7 +761,7 @@ static inline void sam_tc_putreg(struct sam_chan_s *chan, uint32_t regval, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(tc, true, regaddr, regval)) { - tmrinfo("%08x<-%08x\n", regaddr, regval); + tmrllinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -785,7 +785,7 @@ static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(chan->tc, false, regaddr, regval)) { - tmrinfo("%08x->%08x\n", regaddr, regval); + tmrllinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -808,7 +808,7 @@ static inline void sam_chan_putreg(struct sam_chan_s *chan, unsigned int offset, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(chan->tc, true, regaddr, regval)) { - tmrinfo("%08x<-%08x\n", regaddr, regval); + tmrllinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -845,8 +845,8 @@ static int sam_tc_interrupt(struct sam_tc_s *tc, struct sam_chan_s *chan) imr = sam_chan_getreg(chan, SAM_TC_IMR_OFFSET); pending = sr & imr; - tcllinfo("TC%d Channel %d: pending=%08lx\n", - tc->tc, chan->chan, (unsigned long)pending); + tmrllinfo("TC%d Channel %d: pending=%08lx\n", + tc->tc, chan->chan, (unsigned long)pending); /* Are there any pending interrupts for this channel? */ diff --git a/arch/arm/src/stm32/stm32_gpio.c b/arch/arm/src/stm32/stm32_gpio.c index 6426107b3b..63d09e982e 100644 --- a/arch/arm/src/stm32/stm32_gpio.c +++ b/arch/arm/src/stm32/stm32_gpio.c @@ -469,6 +469,7 @@ int stm32_configgpio(uint32_t cfgset) break; case GPIO_OUTPUT: /* General purpose output mode */ + stm32_gpiowrite(cfgset, (cfgset & GPIO_OUTPUT_SET) != 0); /* Set the initial output value */ pinmode = GPIO_MODER_OUTPUT; break; @@ -619,17 +620,9 @@ int stm32_configgpio(uint32_t cfgset) putreg32(regval, base + STM32_GPIO_OTYPER_OFFSET); - /* If it is an output... set the pin to the correct initial state. */ - - if (pinmode == GPIO_MODER_OUTPUT) - { - bool value = ((cfgset & GPIO_OUTPUT_SET) != 0); - stm32_gpiowrite(cfgset, value); - } - /* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */ - else if ((cfgset & GPIO_EXTI) != 0) + if (pinmode != GPIO_MODER_OUTPUT && (cfgset & GPIO_EXTI) != 0) { /* "In STM32 F1 the selection of the EXTI line source is performed through * the EXTIx bits in the AFIO_EXTICRx registers, while in F2 series this