-
极海32F030芯片读写保护时,没找到xx32F0xx Flash_OPT.FLM文件 sos
#define OB_BASE ((uint32_t)0x1FFFF800) /*!< FLASH Option Bytes base address */#define OB ((OB_TypeDef *) OB_BASE) FLASH_Status FLASH_OB_Erase(void) { uint16_t rdptmp = OB_RDP_Level_0; FLASH_Status status = FLASH_COMPLETE; /* Get the actual read protection Option Byte value */ if(FLASH_OB_GetRDP() != RESET) { rdptmp = 0x00; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT); if(status == FLASH_COMPLETE) { /* If the previous operation is completed, proceed to erase the option bytes */ FLASH->CR |= FLASH_CR_OPTER; FLASH->CR |= FLASH_CR_STRT; /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT); if(status == FLASH_COMPLETE) { /* If the erase operation is completed, disable the OPTER Bit */ FLASH->CR &= ~FLASH_CR_OPTER; /* Enable the Option Bytes Programming operation */ FLASH->CR |= FLASH_CR_OPTPG; /* Restore the last read protection Option Byte value */ OB->RDP = (uint16_t)rdptmp; /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT); if(status != FLASH_TIMEOUT) { /* if the program operation is completed, disable the OPTPG Bit */ FLASH->CR &= ~FLASH_CR_OPTPG; } } else { if (status != FLASH_TIMEOUT) { /* Disable the OPTPG Bit */ FLASH->CR &= ~FLASH_CR_OPTPG; } } } /* Return the erase status */ return status; } 请问有用过极海的读保护的吗,这个OPT.FLM文件去哪找
644浏览量 0回复量 关注量 -
请教器件手册里常有 Sourced from process XX 是啥意思?
Sourced from process XX , XX 是个数字,在好多器件手册里看到,XX 也因器件不同而不同,请教这是啥意思?
996浏览量 1回复量 关注量 -
如何将已定义的常数数组的地址重新定义为原地址减32?
51单片机,keil V4 编译器:已定义:code unsigned char C_LED7_CODE_ADDR[]={xxxxxxx}; 我现在需要重新定义一个常数数组C_LED7_CODE[],其起始地址为上述数组地址减32、不影响数组内容和其它程序,可以做到吗?
1083浏览量 1回复量 关注量