This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unable to connect with device through Ulink2 - STM32L475

I have been making some clocks configuration changes in C code. I verified the register values using the debugger. I have made below code changes to check the clock frequencies using oscilloscope . ie, MCO to PA8

After making the below code changes, ULINK2 is unable to connect with the device. The moment after I click "Load" I get error as "No Cortex-M Device found in JTAG chain" . It was working fine before I load this code. The uVersion I use is 5.33.

I did try setting the debug settings,

1. Connect: with Pre-reset

2. Enabled Reset after Connect

3. Rest: HW RESET

4. Enabled Stop after Reset

-------------------------------------------------------------------------------------------------------------------------

//Set the MCO to SysCLK
pRcc->CFGR |= RCC_CFGR_MCOSEL_0;

// Enable alternate function for GPIOA8
GPIOA->MODER |= GPIO_MODER_MODE8_1;

// Configure GPIOA8 to very high speed
GPIOA->OSPEEDR |= (GPIO_OSPEEDR_OSPEED8_1| GPIO_OSPEEDR_OSPEED8_0);

//Alternate function for portA-8
GPIOA->AFR[1] |= GPIO_AFRH_AFSEL8_3;

-------------------------------------------------------------------------------------------------------------------------


Can someone help me resolving the issue?

Parents Reply Children
No data