mpremote doesn't connect on STM32L452CE #16241
Unanswered
Tico06
asked this question in
STM32 / Pyboard
Replies: 2 comments 1 reply
-
Check if the PLL configuration correctly generates a 48MHz USB clock from the MSI input. This is necessary for USB functionality: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi There, #if defined(STM32F4) || defined(STM32F7) || defined(STM32G4) || defined(STM32H7) || defined(STM32L4)
/**
* @brief System Clock Configuration
*
* The system Clock is configured for F4/F7 as follows:
* (HSx should be read as HSE or HSI depending on the value of MICROPY_HW_CLK_USE_HSI)
* System Clock source = PLL (HSx)
* SYSCLK(Hz) = 168000000
* HCLK(Hz) = 168000000
* AHB Prescaler = 1
* APB1 Prescaler = 4
* APB2 Prescaler = 2
* HSx Frequency(Hz) = HSx_VALUE
* PLL_M = HSx_VALUE/1000000
* PLL_N = 336
* PLL_P = 4
* PLL_Q = 7
* VDD(V) = 3.3
* Main regulator output voltage = Scale1 mode
* Flash Latency(WS) = 5
*
* The system Clock is configured for L4 as follows:
* System Clock source = PLL (MSI)
* SYSCLK(Hz) = 80000000
* HCLK(Hz) = 80000000
* AHB Prescaler = 1
* APB1 Prescaler = 1
* APB2 Prescaler = 1
* MSI Frequency(Hz) = MSI_VALUE (4000000)
* LSE Frequency(Hz) = 32768
* PLL_M = 1
* PLL_N = 40
* PLL_P = 7
* PLL_Q = 2
* PLL_R = 2 <= This is the source for SysClk, not as on F4/7 PLL_P
* Flash Latency(WS) = 4
* @param None
* @retval None
*
* PLL is configured as follows:
*
* VCO_IN
* F4/F7 = HSx / M
* L4 = MSI / M
* VCO_OUT
* F4/F7 = HSx / M * N
* L4 = MSI / M * N
* PLLCLK
* F4/F7 = HSx / M * N / P
* L4 = MSI / M * N / R
* PLL48CK
* F4/F7 = HSx / M * N / Q
* L4 = MSI / M * N / Q USB Clock is obtained over PLLSAI1
*
* SYSCLK = PLLCLK
* HCLK = SYSCLK / AHB_PRESC
* PCLKx = HCLK / APBx_PRESC
*
* Constraints on parameters:
*
* VCO_IN between 1MHz and 2MHz (2MHz recommended)
* VCO_OUT between 192MHz and 432MHz
* HSE = 8MHz
* HSI = 16MHz
* M = 2 .. 63 (inclusive)
* N = 192 ... 432 (inclusive)
* P = 2, 4, 6, 8
* Q = 2 .. 15 (inclusive)
*
* AHB_PRESC=1,2,4,8,16,64,128,256,512
* APBx_PRESC=1,2,4,8,16
*
* Output clocks:
*
* CPU SYSCLK max 168MHz
* USB,RNG,SDIO PLL48CK must be 48MHz for USB
* AHB HCLK max 168MHz
* APB1 PCLK1 max 42MHz
* APB2 PCLK2 max 84MHz
*
* Timers run from APBx if APBx_PRESC=1, else 2x APBx
*/ What I don't understand, it's said constraint on parameter N is 192...432 all inclusive. But the parameters given for L4 is PLL_N = 40. Did I miss something ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi There,
I have a simple board with STM32L452CE and an USB socket. No HSE, one LSE at 32.768Khz. The firmware is uploaded successfully, and once the board is plugged with a USB cable to a PC, the PYBLASH drive pops up with boot.py, main.py, and pybcdc.inf files. Thus I guess no issue with the board itself.
When the user tries to connect to the board with mpremote under Windows with connect auto, it says no board is found. If the COM port is provided, it results in an SerialTimeoutException: Write timeout.
I was suspecting a driver issue under Windows, but now, I think it could be the clocking issue. My config files are inspired from NUCLEO_L452RE.
my mpconfig.h
my mpconfigboard.mk
my stm32l4xx_hal_conf.h (I am not able to compile without the HSE_VALUE)
Please advise on the config or what could be wrong with this board.
Thanks,
Eric.
Beta Was this translation helpful? Give feedback.
All reactions