diff options
Diffstat (limited to 'pyecsca/codegen')
| -rw-r--r-- | pyecsca/codegen/client.py | 4 | ||||
| -rw-r--r-- | pyecsca/codegen/hal/stm32f3/stm32f3_hal_lowlevel.c | 26 |
2 files changed, 16 insertions, 14 deletions
diff --git a/pyecsca/codegen/client.py b/pyecsca/codegen/client.py index 07feb93..2b74f7a 100644 --- a/pyecsca/codegen/client.py +++ b/pyecsca/codegen/client.py @@ -234,8 +234,10 @@ class ImplTarget(SimpleSerialTarget): self.send_cmd(SMessage.from_raw(cmd_set_trigger(actions)), self.timeout) self.trigger = actions - def disconnect(self): + def quit(self): self.write(b"x\n") + + def disconnect(self): super().disconnect() diff --git a/pyecsca/codegen/hal/stm32f3/stm32f3_hal_lowlevel.c b/pyecsca/codegen/hal/stm32f3/stm32f3_hal_lowlevel.c index 6eb1999..362f3ab 100644 --- a/pyecsca/codegen/hal/stm32f3/stm32f3_hal_lowlevel.c +++ b/pyecsca/codegen/hal/stm32f3/stm32f3_hal_lowlevel.c @@ -114,6 +114,19 @@ uint32_t HAL_RCC_GetPCLK1Freq(void) } /** + * @brief Returns the PCLK2 frequency + * @note Each time PCLK2 changes, this function must be called to update the + * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect. + * @retval PCLK2 frequency + */ +uint32_t HAL_RCC_GetPCLK2Freq(void) +{ + /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/ + //return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> POSITION_VAL(RCC_CFGR_PPRE2)]); + return 7372800U; +} + +/** * @brief Initializes the RCC Oscillators according to the specified parameters in the * RCC_OscInitTypeDef. * @param RCC_OscInitStruct pointer to an RCC_OscInitTypeDef structure that @@ -617,19 +630,6 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, ui return HAL_OK; } -/** - * @brief Returns the PCLK2 frequency - * @note Each time PCLK2 changes, this function must be called to update the - * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect. - * @retval PCLK2 frequency - */ -uint32_t HAL_RCC_GetPCLK2Freq(void) -{ - /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/ - //return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> POSITION_VAL(RCC_CFGR_PPRE2)]); - return 7372800; -} - #define GPIO_MODE (0x00000003U) |
