Skip to content

Commit

Permalink
stm32cube/stm32u0xx/drivers: modify scripts to compile u0 serie
Browse files Browse the repository at this point in the history
  • Loading branch information
djiatsaf-st committed Jul 31, 2024
1 parent ecb803c commit a2ee916
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ extern "C" {
#define TYPEPROGRAMDATA_FASTBYTE FLASH_TYPEPROGRAMDATA_FASTBYTE
#define TYPEPROGRAMDATA_FASTHALFWORD FLASH_TYPEPROGRAMDATA_FASTHALFWORD
#define TYPEPROGRAMDATA_FASTWORD FLASH_TYPEPROGRAMDATA_FASTWORD
#define PAGESIZE FLASH_PAGE_SIZE
/* #define PAGESIZE FLASH_PAGE_SIZE */
#define TYPEPROGRAM_FASTBYTE FLASH_TYPEPROGRAM_BYTE
#define TYPEPROGRAM_FASTHALFWORD FLASH_TYPEPROGRAM_HALFWORD
#define TYPEPROGRAM_FASTWORD FLASH_TYPEPROGRAM_WORD
Expand Down
2 changes: 2 additions & 0 deletions stm32cube/stm32u0xx/drivers/include/stm32u0xx_ll_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitS
LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEBypass, LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct,
LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency);


/**
* @}
Expand Down
9 changes: 7 additions & 2 deletions stm32cube/stm32u0xx/drivers/src/stm32u0xx_ll_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
*/
static uint32_t UTILS_GetPLLOutputFrequency(uint32_t PLL_InputFrequency,
LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct);
static ErrorStatus UTILS_SetFlashLatency(uint32_t HCLKS_Frequency);
ErrorStatus UTILS_SetFlashLatency(uint32_t HCLKS_Frequency);
static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency,
LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
static ErrorStatus UTILS_PLL_IsBusy(void);
Expand Down Expand Up @@ -488,7 +488,7 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEBypass, LL_UTILS_PLLInitTyp
* - SUCCESS: Latency has been modified
* - ERROR: Latency cannot be modified
*/
static ErrorStatus UTILS_SetFlashLatency(uint32_t HCLK_Frequency)
ErrorStatus UTILS_SetFlashLatency(uint32_t HCLK_Frequency)
{
ErrorStatus status = SUCCESS;

Expand Down Expand Up @@ -558,6 +558,11 @@ static ErrorStatus UTILS_SetFlashLatency(uint32_t HCLK_Frequency)
return status;
}

ErrorStatus LL_SetFlashLatency(uint32_t HCLK_Frequency)
{
return UTILS_SetFlashLatency(HCLK_Frequency);
}

/**
* @brief Function to check that PLL can be modified
* @param PLL_InputFrequency PLL input frequency (in Hz)
Expand Down

0 comments on commit a2ee916

Please sign in to comment.