cancel
Showing results for 
Search instead for 
Did you mean: 

LSE failure Detection Problem

TanmayKhalas
Associate

Hi,
I am using STM32WBA52CGU6 controller.
I configure Pins of LSE_IN and LSE_OUT.
Without generating frequency at this LSE_IN Pin I got detection as LSE is on but actually LSE_IN is just open.

I attached System clock Config code below:-

/** Initializes the CPU, AHB and APB busses clocks

*/

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE

|RCC_OSCILLATORTYPE_LSE;

RCC_OscInitStruct.HSEState = RCC_HSE_ON;

RCC_OscInitStruct.HSEDiv = RCC_HSE_DIV1;

RCC_OscInitStruct.LSEState = RCC_LSE_ON;

RCC_OscInitStruct.LSIState = RCC_LSI1_ON;

RCC_OscInitStruct.LSIDiv = RCC_LSI_DIV1;

RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_ON;

RCC_OscInitStruct.PLL1.PLLSource = RCC_PLLSOURCE_HSE;

RCC_OscInitStruct.PLL1.PLLM = 2;

RCC_OscInitStruct.PLL1.PLLN = 30;

RCC_OscInitStruct.PLL1.PLLP = 14;

RCC_OscInitStruct.PLL1.PLLQ = 6;

RCC_OscInitStruct.PLL1.PLLR = 5;

RCC_OscInitStruct.PLL1.PLLFractional = 5120;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK)

{

  len_ReturnConfigStatus = HSE_CONFIG_SUCCESS;

  return len_ReturnConfigStatus;

}

else

{

  RCC_REG = *((uint32_t*)(RCC_BASE_NS));

  RCC_BDCR1 = *((uint32_t*)(RCC_BASE_NS+0x0F0));
}

Not getting LSE failure detection at OscConfig
Reading of RCC_BDCR1 register turn on bit of LSEON and LSEREADYF indicates that LSE is ready to use but LSE_IN Pin is just open.
Register reference Multiprotocol wireless Bluetooth<Sup>®</Sup> LE and IEEE802.15.4, STM32WBA5xxx Arm<Sup>®</Sup>-based 32-bit MCUs - Reference manual page 413



 

0 REPLIES 0