FlashSize表示内部flash的大小,也是固化在芯片内部的。 手册上讲的ChipID的基地址是0x1FFF7A10,ChipSize的基地址也是0x1FFF7A10。肯定是不对的 谷歌了半天才发现真正的ChipSize地址0x1FFF7A20。知道了地址,直接读取地址中的数据就OK了。操作相当简单 读取FlashSize uint16_t
/*读取stm32的unique id 与 flash size*//*func: unsigned int Read_UniqueID_Byte(unsigned char offset) desc: This function is used to read the unique ID in flash. parameter offset is the byte offset ,the max is 96/8= 12. return: the return value is indicated part of the unique ID.*...
flash_erase(flash, OFFSET_SECTOR_1, FLASH_SECTOR_SIZE); flash_erase(flash, OFFSET_SECTOR_2, FLASH_SECTOR_SIZE); k_sleep(K_FOREVER); return 0; } prj.conf CONFIG_LOG=y CONFIG_FLASH=y # It's important that Bluetooth is enabled, as only then flash_stm32wba_fm.c is used CONFIG_BLUETO...
背景:向stm32f401re内部flash中的sector4~7中写入数据。根据RM0368中的说明,我的电压是3.3V,而且没...
The flash size is the second part (size) of the first reg value, not the first part (address) of a nonexistent second reg value. This was introduced in #68274, and I don't understand how it has eve...
首先声明,手册上给出的FlashSize地址是错误的,正确的应该是0x1FFF7A20,取高16位。确切说应该是(0x1FFF7A23,0x1FFF7A22两个字节), 芯片的这96位ID是产品唯一身份标识。可以从特定的寄存器中读出来。FlashSize表示内部flash的大小,也是固化在芯片内部的。
/* 读取stm32的unique id 与 flash size */ /* func: unsigned int Read_UniqueID_Byte(unsigned char offset) desc: This function is used to read the unique ID in flash. parameter offset is the byte offset ,the max is 96/8= 12. return: the return value is indicated part of the unique...
STM32F10X FLASH Size SRAM Size Device Type---STM32F100x416KB4KB STM32F10X_LD_VL STM32F100x632KB4KB STM32F10X_LD_VL STM32F100x864KB8KB STM32F10X_MD_VL STM32F100xB128KB8KB STM32F10X_MD_VL STM32F100xC256KB24KB STM32F10X_HD_VL STM32F100xD384KB32KB STM32...
mcuID[2] = *(__IO u32*)(0x1FFF7A18); } 通过串口发送到PC就可以看到了。 串口发送程序; printf("CPUID IS 0X%X %X %X.\r\n", mcuID[0], mcuID[1], mcuID[2] ); printf("Flash size is %d KB\r\n",cpuGetFlashSize());
STM32F10X FLASH Size SRAM Size Device Type---STM32F100x416KB4KB STM32F10X_LD_VL STM32F100x632KB4KB STM32F10X_LD_VL STM32F100x864KB8KB STM32F10X_MD_VL STM32F100xB128KB8KB STM32F10X_MD_VL STM32F100xC256KB24KB STM32F10X_HD_VL STM32F100xD384KB32KB STM32...