2024-08-28 02:06 AM
I want to set XSPI2_HSLV option byte through software , is there any way to do it or i have to use stm32cubeprogrammer only to Enable it.
Device = STM32H7S3L8 .
2024-08-28 03:37 AM - edited 2024-08-28 03:38 AM
Hi @AnoopYadav
The XSPI2_HSLV can be done by user code as described in RM0477 section 5.4.3 Option byte words modification / Changing option byte words. VDDIO_HSLV option bit is also required with XSPI2_HSLV.
The flash driver provide the following HAL API that can be used.
/**
* @brief Program Option bytes.
* @param pOBInit pointer to an FLASH_OBInitStruct structure that
* contains the configuration information for the programming.
*
* @note To configure any option bytes, the option lock bit OPTLOCK must be
* cleared with the call of HAL_FLASH_OB_Unlock() function.
* @note New option bytes configuration will be taken into account in two cases:
* - after an option bytes launch through the call of HAL_FLASH_OB_Launch()
* - after a power reset (BOR reset or exit from Standby/Shutdown modes)
*
* @retval HAL Status
*/
HAL_StatusTypeDef HAL_FLASHEx_OBProgram(const FLASH_OBProgramInitTypeDef *pOBInit)
Best regards