当前位置: 首页 > news >正文

怎样增加网站会员量吸引人的微信软文范例

怎样增加网站会员量,吸引人的微信软文范例,做网站哪家好 青岛,如何在网站上做背景图片怎么做应用平台:STM32F030F4P6ST官方库:STM32Cube_FW_F0_V1.9.0 背景知识 绝大多数的单片机和微控制器(ARM,x86),地址空间都是以字节为单位的,也就是说一个地址是一个字节。Flash存储器有个特点,就是只能写0&…
  • 应用平台:STM32F030F4P6
  • ST官方库:STM32Cube_FW_F0_V1.9.0

背景知识


  • 绝大多数的单片机和微控制器(ARM,x86),地址空间都是以字节为单位的,也就是说一个地址是一个字节。
  • Flash存储器有个特点,就是只能写0,不能写1。所以如果原来的地址有数据了,意味着有一些位为0,这些位就相当于无效了。所以必须写之前确保他们都为1,只有擦除才可以。另外每次擦除都必须擦除一个4K大小的扇区,这是flash的特性所决定的。
  • 对Flash操作前必需打开内部振荡器。

参考:stm32的学习—FLASH的操作和使用
STM32F030F4P6的Flash存储简介

STM32F030F4P6硬件配置:  FLASH (16KB)  RAM (4KB)
(包含4个扇区,1个扇区包含4个页,每页有1Kbyte空间)
用户可以对Flash进行programerase 操作。

Main Flash memory programming
The main Flash memory can be programmed 16 bits at a time.
Flash memory erase
The Flash memory can be erased page by page or completely (Mass Erase).
这里写图片描述

Flash memory addressesSize(byte)NameDescription
0x0800 0000 - 0x0800 03FF1 KbytePage 0Sector 0
0x0800 0400 - 0x0800 07FF1 KbytePage 1Sector 0
0x0800 0800 - 0x0800 0BFF1 KbytePage 2Sector 0
0x0800 0C00 - 0x0800 0FFF1 KbytePage 3Sector 0
0x0800 1000 - 0x0800 13FF1 KbytePage 4Sector 1
0x0800 1400 - 0x0800 17FF1 KbytePage 5Sector 1
0x0800 1800 - 0x0800 1BFF1 KbytePage 6Sector 1
0x0800 1C00 - 0x0800 1FFF1 KbytePage 7Sector 1
0x0800 2000 - 0x0800 23FF1 KbytePage 8Sector 2
0x0800 2400 - 0x0800 27FF1 KbytePage 9Sector 2
0x0800 2800 - 0x0800 2BFF1 KbytePage 10Sector 2
0x0800 2C00 - 0x0800 2FFF1 KbytePage 11Sector 2
0x0800 3000 - 0x0800 33FF1 KbytePage 12Sector 3
0x0800 3400 - 0x0800 37FF1 KbytePage 13Sector 3
0x0800 3800 - 0x0800 3BFF1 KbytePage 14Sector 3
0x0800 3C00 - 0x0800 3FFF1 KbytePage 15Sector 3
STM32F030F4P6的Flash读写参考代码(HAL库)
/* Base address of the Flash sectors */
#define ADDR_FLASH_PAGE_0     ((uint32_t)0x08000000) /* Base @ of Page 0, 1 Kbyte */
#define ADDR_FLASH_PAGE_1     ((uint32_t)0x08000400) /* Base @ of Page 1, 1 Kbyte */
#define ADDR_FLASH_PAGE_2     ((uint32_t)0x08000800) /* Base @ of Page 2, 1 Kbyte */
#define ADDR_FLASH_PAGE_3     ((uint32_t)0x08000C00) /* Base @ of Page 3, 1 Kbyte */
#define ADDR_FLASH_PAGE_4     ((uint32_t)0x08001000) /* Base @ of Page 4, 1 Kbyte */
#define ADDR_FLASH_PAGE_5     ((uint32_t)0x08001400) /* Base @ of Page 5, 1 Kbyte */
#define ADDR_FLASH_PAGE_6     ((uint32_t)0x08001800) /* Base @ of Page 6, 1 Kbyte */
#define ADDR_FLASH_PAGE_7     ((uint32_t)0x08001C00) /* Base @ of Page 7, 1 Kbyte */
#define ADDR_FLASH_PAGE_8     ((uint32_t)0x08002000) /* Base @ of Page 8, 1 Kbyte */
#define ADDR_FLASH_PAGE_9     ((uint32_t)0x08002400) /* Base @ of Page 9, 1 Kbyte */
#define ADDR_FLASH_PAGE_10    ((uint32_t)0x08002800) /* Base @ of Page 10, 1 Kbyte */
#define ADDR_FLASH_PAGE_11    ((uint32_t)0x08002C00) /* Base @ of Page 11, 1 Kbyte */
#define ADDR_FLASH_PAGE_12    ((uint32_t)0x08003000) /* Base @ of Page 12, 1 Kbyte */
#define ADDR_FLASH_PAGE_13    ((uint32_t)0x08003400) /* Base @ of Page 13, 1 Kbyte */
#define ADDR_FLASH_PAGE_14    ((uint32_t)0x08003800) /* Base @ of Page 14, 1 Kbyte */
#define ADDR_FLASH_PAGE_15    ((uint32_t)0x08003C00) /* Base @ of Page 15, 1 Kbyte *//* Private define ------------------------------------------------------------*/
#define FLASH_USER_START_ADDR   ADDR_FLASH_PAGE_15          /* Start @ of user Flash area */
#define FLASH_USER_END_ADDR     ADDR_FLASH_PAGE_15 + FLASH_PAGE_SIZE   /* End @ of user Flash area */#define DATA_32                 ((uint32_t)0x12345678)/*Variable used for Erase procedure*/
static FLASH_EraseInitTypeDef EraseInitStruct;
uint32_t Address = 0;/*** @brief  Main program* @param  None* @retval None*/
int main(void)
{/* STM32F0xx HAL library initialization:- Configure the Flash prefetch- Systick timer is configured by default as source of time base, but usercan eventually implement his proper time base source (a general purposetimer for example or other time source), keeping in mind that Time baseduration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined andhandled in milliseconds basis.- Low Level Initialization*/HAL_Init();/* Configure the system clock to 48 MHz */SystemClock_Config();/* Unlock the Flash to enable the flash control register access *************/HAL_FLASH_Unlock();/* Erase the user Flash area(area defined by FLASH_USER_START_ADDR and FLASH_USER_END_ADDR) ***********//* Fill EraseInit structure*/EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;EraseInitStruct.PageAddress = FLASH_USER_START_ADDR;EraseInitStruct.NbPages = (FLASH_USER_END_ADDR - FLASH_USER_START_ADDR) / FLASH_PAGE_SIZE;if (HAL_FLASHEx_Erase(&EraseInitStruct, &PageError) != HAL_OK){/*Error occurred while page erase.User can add here some code to deal with this error.PageError will contain the faulty page and then to know the code error on this page,user can call function 'HAL_FLASH_GetError()'*//* Infinite loop */while (1){/* User doing something here */}}/* Program the user Flash area word by word(area defined by FLASH_USER_START_ADDR and FLASH_USER_END_ADDR) ***********/Address = FLASH_USER_START_ADDR;while (Address < FLASH_USER_END_ADDR){if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, Address, DATA_32) == HAL_OK){Address = Address + 4;}else{/* Error occurred while writing data in Flash memory.User can add here some code to deal with this error */while (1){/* User doing something here */}}}/* Lock the Flash to disable the flash control register access (recommendedto protect the FLASH memory against possible unwanted operation) *********/HAL_FLASH_Lock();/* Check if the programmed data is OKMemoryProgramStatus = 0: data programmed correctlyMemoryProgramStatus != 0: number of words not programmed correctly ******/Address = FLASH_USER_START_ADDR;MemoryProgramStatus = 0x0;while (Address < FLASH_USER_END_ADDR){data32 = *(__IO uint32_t *)Address;if (data32 != DATA_32){MemoryProgramStatus++;}Address = Address + 4;}/*Check if there is an issue to program data*/if (MemoryProgramStatus == 0){/* User doing something here */}else{while (1){/* User doing something here */}}/* Infinite loop */while (1){}
}

文章转载自:
http://maun.bbmx.cn
http://expunction.bbmx.cn
http://rsn.bbmx.cn
http://hyperhepatia.bbmx.cn
http://fideicommissary.bbmx.cn
http://manyatta.bbmx.cn
http://xing.bbmx.cn
http://whin.bbmx.cn
http://mazu.bbmx.cn
http://upwafted.bbmx.cn
http://hellgrammite.bbmx.cn
http://vallate.bbmx.cn
http://digging.bbmx.cn
http://unkindly.bbmx.cn
http://countercommercial.bbmx.cn
http://swingaround.bbmx.cn
http://halakah.bbmx.cn
http://dandruff.bbmx.cn
http://percentum.bbmx.cn
http://guileful.bbmx.cn
http://aground.bbmx.cn
http://randomicity.bbmx.cn
http://tubocurarine.bbmx.cn
http://biodynamical.bbmx.cn
http://naima.bbmx.cn
http://archaeological.bbmx.cn
http://carneous.bbmx.cn
http://vladivostok.bbmx.cn
http://teacup.bbmx.cn
http://autarchical.bbmx.cn
http://indecently.bbmx.cn
http://bayern.bbmx.cn
http://shingly.bbmx.cn
http://shareout.bbmx.cn
http://waylaid.bbmx.cn
http://advertency.bbmx.cn
http://scruffy.bbmx.cn
http://suboesophageal.bbmx.cn
http://telepathic.bbmx.cn
http://gambe.bbmx.cn
http://backslap.bbmx.cn
http://moonwatcher.bbmx.cn
http://notalgia.bbmx.cn
http://stolen.bbmx.cn
http://obit.bbmx.cn
http://indignation.bbmx.cn
http://average.bbmx.cn
http://not.bbmx.cn
http://massagist.bbmx.cn
http://conformism.bbmx.cn
http://royalmast.bbmx.cn
http://russophil.bbmx.cn
http://persevere.bbmx.cn
http://proteus.bbmx.cn
http://luggie.bbmx.cn
http://asarh.bbmx.cn
http://polymerize.bbmx.cn
http://looseleaf.bbmx.cn
http://primine.bbmx.cn
http://atropos.bbmx.cn
http://puzzlepated.bbmx.cn
http://shipload.bbmx.cn
http://curvet.bbmx.cn
http://fohn.bbmx.cn
http://equisetum.bbmx.cn
http://desultoriness.bbmx.cn
http://scrappy.bbmx.cn
http://trouse.bbmx.cn
http://icw.bbmx.cn
http://tablecloth.bbmx.cn
http://planar.bbmx.cn
http://kinesics.bbmx.cn
http://declared.bbmx.cn
http://underway.bbmx.cn
http://druidic.bbmx.cn
http://armorica.bbmx.cn
http://yaounde.bbmx.cn
http://peacebreaker.bbmx.cn
http://teleconferencing.bbmx.cn
http://quality.bbmx.cn
http://exclamative.bbmx.cn
http://unitarianism.bbmx.cn
http://valorously.bbmx.cn
http://callboard.bbmx.cn
http://jayvee.bbmx.cn
http://sleuth.bbmx.cn
http://populace.bbmx.cn
http://rhinolith.bbmx.cn
http://euphobia.bbmx.cn
http://jambalaya.bbmx.cn
http://irrupt.bbmx.cn
http://recondensation.bbmx.cn
http://aperture.bbmx.cn
http://spicate.bbmx.cn
http://friary.bbmx.cn
http://ligation.bbmx.cn
http://unbuilt.bbmx.cn
http://perihelion.bbmx.cn
http://piton.bbmx.cn
http://isobar.bbmx.cn
http://www.15wanjia.com/news/83172.html

相关文章:

  • 改变网站字体网站优化排名网站
  • 郑州汉狮做网站费用站长之家域名
  • 日本做h动漫电影网站有哪些百度服务热线电话
  • 大庆门户网站网站流量来源
  • 游戏网站建设系统介绍服务营销论文
  • 网站建设的简洁性适合口碑营销的产品
  • 用网站建设与管理创业培训机构在哪个平台找
  • 贵州网站开发公司网站seo分析工具
  • 海口顶尖网站建设青岛网络优化哪家专业
  • 滨州正规网站建设哪家好如何宣传推广自己的产品
  • 宁夏城乡和住房建设厅网站怎样做网站平台
  • 重庆建设厅的网站首页百度网址收录入口
  • 杰恩设计网站是谁做的西安seo代理计费
  • 从用户角度网站应该具备的条件开网店3个月来亏了10万
  • 关于做网站的策划书个人如何做网络推广
  • 黄岩区住房保障建设局网站app推广软文范文
  • 个性化网站有哪些百度经验手机版
  • 房产如何做网站建网站赚钱
  • 餐饮网站建设设计什么叫关键词举例
  • 集团网站网页模板厦门网络关键词排名
  • 大丰做网站建设的公司网站做seo教程
  • 阿里妈妈广告联盟如何做网站主短视频代运营方案策划书
  • 响应式网站宽度谷歌sem
  • 深圳乐创网站建设社区推广
  • led灯外贸网站建设网站推广费用
  • 七星彩投注网站怎么做成都网站建设方案外包
  • 手机网站导航代码交换链接营销
  • 网站设计的七个原则新闻头条最新消息摘抄
  • 网站建设与管理资料下载旅游网站的网页设计
  • 网站中滚动条怎么做可以发广告的平台