Exemplo n.º 1
0
static inline void efm32_itm_syslog(void)
{
  int regval;

  /* Enable Serial wire output pin
   *
   * Set location and enable output on the pin.  All pin configuration
   * information must be provided in the board.h header file.
   */

  regval  = getreg32(EFM32_GPIO_ROUTE);
  regval &= ~_GPIO_ROUTE_SWLOCATION_MASK;
  regval |= GPIO_ROUTE_SWOPEN;
  regval |= ((uint32_t)BOARD_SWOPORT_LOCATION << _GPIO_ROUTE_SWLOCATION_SHIFT);
  putreg32(regval, EFM32_GPIO_ROUTE);

  /* Enable output on pin */

  efm32_configgpio(BOARD_GPIO_SWOPORT);

  /* Enable debug clock AUXHFRCO */

  efm32_enable_auxhfrco();

  /* Then perform ARMv7-M ITM SYSLOG initialization */

  itm_syslog_initialize();
}
Exemplo n.º 2
0
static inline void rcc_itm_syslog(void)
{
  /* Enable SWO output */

  modifyreg32(STM32_DBGMCU_CR, DBGMCU_CR_TRACEMODE_MASK, DBGMCU_CR_ASYNCH |
              DBGMCU_CR_TRACEIOEN);

  itm_syslog_initialize();
}