embeded/Cortex-M7 STM2024. 7. 22. 14:00

이전에 메뉴얼 뒤지다 발견한 BCM7/BCM4는 어디서 접근이 가능한지, 설정이 가능한지 찾질 못했는데

프로그램 하나 설치하니 해피하게 해결.. -_-

[링크 : https://www.st.com/resource/en/application_note/an5557-stm32h745755-and-stm32h747757-lines-dualcore-architecture-stmicroelectronics.pdf]

 

왼쪽 세번째 아이콘 OB가 Option Bytes 인데

거기서 User Configuration 항목에 BCM4 / BCM7을 발견할 수 있다.

[링크 : https://blog.naver.com/chandong83/221652968153]

[링크 : https://www.st.com/en/development-tools/stm32cubeprog.html]

[링크 : https://blog.naver.com/chcbaram/221597488638]

 

+

  HAL_FLASH_Unlock();
  HAL_FLASH_OB_Unlock();
  HAL_FLASHEx_OBGetConfig(&OBInit);

  OBInit.OptionType = OPTIONBYTE_CM7_BOOTADD;
  OBInit.BootAddr0 = 0x08010000;
  OBInit.BootConfig = OB_BOOT_ADD0;
  HAL_FLASHEx_OBProgram(&OBInit);
  HAL_FLASH_OB_Launch()

[링크 : https://community.st.com/t5/stm32-mcus-products/stm32h745-set-cm7-boot-addr0-from-cm4/td-p/654791]

 

+

void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit)
{
  pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR;

  /*Get WRP*/
  pOBInit->WRPSector = FLASH_OB_GetWRP();

  /*Get RDP Level*/
  pOBInit->RDPLevel = FLASH_OB_GetRDP();

  /*Get USER*/
  pOBInit->USERConfig = FLASH_OB_GetUser();

  /*Get BOR Level*/
  pOBInit->BORLevel = FLASH_OB_GetBOR();
}

[링크 : https://github.com/fboris/STM32Cube_FW_F4/blob/master/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c#L341]

 

typedef struct
{
  uint32_t OptionType;   /*!< Option byte to be configured.
                              This parameter can be a value of @ref FLASHEx_Option_Type */

  uint32_t WRPState;     /*!< Write protection activation or deactivation.
                              This parameter can be a value of @ref FLASHEx_WRP_State */

  uint32_t WRPSector;         /*!< Specifies the sector(s) to be write protected.
                              The value of this parameter depend on device used within the same series */

  uint32_t Banks;        /*!< Select banks for WRP activation/deactivation of all sectors.
                              This parameter must be a value of @ref FLASHEx_Banks */        

  uint32_t RDPLevel;     /*!< Set the read protection level.
                              This parameter can be a value of @ref FLASHEx_Option_Bytes_Read_Protection */

  uint32_t BORLevel;     /*!< Set the BOR Level.
                              This parameter can be a value of @ref FLASHEx_BOR_Reset_Level */

  uint8_t  USERConfig;   /*!< Program the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY. */

} FLASH_OBProgramInitTypeDef;

[링크 : https://github.com/fboris/STM32Cube_FW_F4/blob/master/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h#L106]

'embeded > Cortex-M7 STM' 카테고리의 다른 글

STM32 MPU(Memory Protection Unit)  (0) 2024.07.22
STM32 HSEM (Hardware SEMaphore)  (0) 2024.07.22
STM32CubeProgrammer  (0) 2024.07.22
stm32h757xi / stm32h757i-eval  (0) 2024.07.19
FT5336 - 정전식 터치 i2c  (0) 2021.07.06
Posted by 구차니