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 25
25
26
26
/* SWO frequency: 1000 kHz */
27
27
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
+
32
39
void itm_init (void )
33
40
{
41
+ #ifdef AM_BSP_GPIO_ITM_SWO
34
42
am_bsp_itm_printf_enable ();
43
+ #else
44
+ am_bsp_itm_printf_enable (AM_GPIO_ITM_SWO ,g_AM_GPIO_ITM_SWO );
45
+ #endif
35
46
}
36
47
37
48
#endif
You can’t perform that action at this time.
0 commit comments