We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
i am using stm32f7 and for debugging ulink pro, i have tried to enable ETM but not succeeded. the connector i am using is,
trace_D0 PC0
trace_D1 PC8
trace_D2 PD2trace_D3 PC12
i downloaded 2.4.0 tried running it on the above pins, not worked. but then i changed my pins on hardware to PE3 to PE6 and removed ini file, trace started working.
i came to know from a guy on keil forum that software pack (2.4.0) supports pins PE3-PE6, and i have to disable that option if i want to use the above mentioned pins and add ini file and initialze those pins in ini file. i have tried it but it is not working.
my ini file is
/*------------------------------------------------------------------- ** Define the function to enable the trace port **-----------------------------------------------------------------*/ FUNC void EnableTPIU(void) { _WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000004); // RCC_AHB1ENR: IO port PC 1,8,12 clock enable _WDWORD(0x40021000, 0x02020008); // GPIOC_MODER: PC1,PC8,PC12 = Alternate function mode _WDWORD(0x40021008, 0x0303000C); // GPIOC_OSPEEDR: PC1,PC8 PC12 = 100 MHz speed _WDWORD(0x4002100C, 0x00000000); // GPIOC_PUPDR: PC1,PC8 PC12 = No Pull-up/Pull-down _WDWORD(0x40021020, 0x00000000); // GPIOC_AFRL: PC1,PC8 PC12 = AF0 _WDWORD(0x40021024, 0x00000000); // GPIOC_AFRH: PC1,PC8 PC12 = AF0 _WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000008); // RCC_AHB1ENR: IO port D2 clock enable _WDWORD(0x40021000, 0x00000002); // GPIOD_MODER: PD2 = Alternate function mode _WDWORD(0x40021008, 0x00000003); // GPIOD_OSPEEDR: PD2 = 100 MHz speed _WDWORD(0x4002100C, 0x00000000); // GPIOD_PUPDR: PD2 = No Pull-up/Pull-down _WDWORD(0x40021020, 0x00000000); // GPIOD_AFRL: PD2 = AF0 _WDWORD(0xE0042004, 0x000000E0); // Set 4-pin tracing via DBGMCU_CR _WDWORD(0xE000EDFC, 0x01000000); // _WDWORD(0xE00400F0, 0x00000000); // _WDWORD(0xE0040004, 0x00000008); // _WDWORD(0xE0001020, 0x002002CA); // _WDWORD(0xE0001024, 0x0000000); // _WDWORD(0xE0001028, 0x00000008); // _WDWORD(0xE0041004, 0x00000000); // _RDWORD(0xE004100C, _RDWORD(0xE004100C) | 0x00000003); // _WDWORD(0xE0041040, 0x00000002); // _WDWORD(0xE0041080, 0x00000001); // _WDWORD(0xE004108C, 0x000000FF); // _WDWORD(0xE0041004, 0x00000001); // } /*------------------------------------------------------------------- ** Invoke the function at debugger startup **-----------------------------------------------------------------*/ EnableTPIU(); /*------------------------------------------------------------------- ** Execute upon software RESET **-----------------------------------------------------------------*/ FUNC void OnResetExec(void) { EnableTPIU(); }
i have changed the core clock to 180MHz.
Where am i doing it wrong ?
Thank you
Bilal