File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 2525
2626/* SWO frequency: 1000 kHz */
2727
28- // As SWO has to be accessible everywhere, including ISRs, we can't easily
29- // communicate the dependency on clocks etc. to other components - so this
30- // function checks that things appear to be set up, and if not re-configures
31- // everything
28+ #ifndef AM_BSP_GPIO_ITM_SWO
29+ #define AM_GPIO_ITM_SWO 22
30+
31+ const am_hal_gpio_pincfg_t g_AM_GPIO_ITM_SWO =
32+ {
33+ .uFuncSel = AM_HAL_PIN_22_SWO ,
34+ .eDriveStrength = AM_HAL_GPIO_PIN_DRIVESTRENGTH_2MA
35+ };
36+ #endif
37+
38+
3239void itm_init (void )
3340{
41+ #ifdef AM_BSP_GPIO_ITM_SWO
3442 am_bsp_itm_printf_enable ();
43+ #else
44+ am_bsp_itm_printf_enable (AM_GPIO_ITM_SWO ,g_AM_GPIO_ITM_SWO );
45+ #endif
3546}
3647
3748#endif
You can’t perform that action at this time.
0 commit comments