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

营销型网站建设的费用报价单网站建设 技术 哪些方面

营销型网站建设的费用报价单,网站建设 技术 哪些方面,郑州外贸网站建设公司排名,wordpress图片不加载我使用的STM32F103VBT6这款芯片,K9F1G08U0B和 STM32F103VBT6连接接口有如下对应关系:ALE——PA1WE——PA2WP——PA3R\B——PC0RE——PC1CE——PC2CLE——PC38位IO口对应PE0——PE7下面4个函数#xff0c;对应的是读取设备的ID#xff0c;我在main函数里调用函数Nand_Flash_Re…我使用的STM32F103VBT6这款芯片,K9F1G08U0B和 STM32F103VBT6连接接口有如下对应关系:ALE——PA1WE——PA2WP——PA3R\B——PC0RE——PC1CE——PC2CLE——PC38位IO口对应PE0——PE7下面4个函数对应的是读取设备的ID我在main函数里调用函数Nand_Flash_ReadDeviceID();则会从串口打印出DeviceID ec f1 0 95 40这个设备ID号是正确的。问题在下面。/***************************写指令函数***************************/void Nand_FlashCommandLatch(uint8_t CommandTypes){Data_PortOutputMode();Flash_CE_Low;Flash_CLE_Low;Flash_ALE_Low;Flash_WE_High;Flash_CLE_High;Flash_WE_Low;Data_Output(CommandTypes);Flash_WE_High;Flash_CLE_Low;Flash_ALE_High;Flash_CE_High;}/****************************设置地址函数****************************/void Nand_Flash_Write_Address(uint32_t Address){Data_PortOutputMode();Flash_CE_Low;Flash_CLE_Low;Flash_WE_High;Flash_ALE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output((Address));Flash_WE_High;Flash_ALE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output((Address 8) 0x0f);Flash_WE_High;Flash_ALE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output((Address 12) 0xFF);Flash_WE_High;Flash_ALE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output((Address 20) 0xFF);Flash_WE_High;Flash_ALE_Low;Flash_CE_High;}/*******************************用来读设备的ID*******************************/void Nand_FlashReadData(uint8_t *pBuffer,uint32_t rd_Length){uint32_t i 0;Data_PortInputMode();Flash_CE_Low;while(rd_Length--){Flash_RE_Low;*(pBuffer i) Data_Input;Flash_RE_High;i;}Flash_RE_High;Flash_CE_High;}/*读设备ID函数*/void Nand_Flash_ReadDeviceID(void){uint8_t array[5];Nand_FlashCommandLatch(0x90);Nand_Flash_Write_Address(0x00);Nand_FlashReadData(array,5);printf(DeviceID %x %x %x %x %x\r\n,array[0],array[1],array[2],array[3],array[4]);}下面的两个函数分别是向一页中写数据的函数和从一页中读出数据我是对照K9F1G08U0D数据手册中Page Program Operation的时序和Read Operation的时序写的 虽然我用的是K9F1G08U0B但我觉得这两个应该时序上差别我在main函数里面执行红色标记的代码从串口打印出的数据如下Nand_FlashPage_Program is ErrorPage 0 data:0xff 0x1e 0xf0 0x0 0x7 0x0 0xe0 0x0 0x7 0x18而我写入的数据为 uint8_t arr[]0123456789;哪位大侠遇到过这样的问题帮小弟解决一下到底我的写错在哪里还是我的操作顺序有问题呢/****************************向某一页中写数据****************************/bool Nand_FlashPage_Program(uint32_t PageNumber,uint8_t *string){uint8_t regvalue 0;uint32_t i2048,j0;uint32_t Address PageNumber*2048;uint8_t *pBufferstring;Data_PortOutputMode();Flash_CE_Low;Flash_ALE_Low;Flash_RE_High;Flash_CLE_High;Flash_WE_Low;Data_Output(0x80);Flash_WE_High;Flash_CLE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output((Address));Flash_WE_High;Flash_WE_Low;Data_Output((Address 8) 0x0F);Flash_WE_High;Flash_WE_Low;Data_Output((Address 12) 0xFF);Flash_WE_High;Flash_WE_Low;Data_Output((Address 20) 0xFF);Flash_WE_High;Flash_ALE_Low;while(i--){Flash_WE_Low;Data_Output(*(pBuffer j));Flash_WE_High;j;}Flash_WE_Low;Flash_CLE_High;Data_Output(0x10);Flash_WE_High;Flash_Wait();Flash_WE_Low;Data_Output(0x70);Flash_WE_High;Flash_CLE_Low;Data_PortInputMode();Flash_RE_Low;regvalue Data_Input;Flash_RE_High;if(!( (1 0) regvalue)){return TRUE;}else{return FALSE;}}/*********************从一页中读出数据*********************/void Nand_Flash_ReadOnePage(uint32_t sc_address,uint8_t *string){uint32_t Address 2048*sc_address;uint32_t i2048,j0;uint8_t dat;Data_PortOutputMode();//Flash_CLE_Low;//Flash_CE_High;//Flash_WE_High;Flash_CE_Low;Flash_ALE_Low;Flash_RE_High;Flash_CLE_High;Flash_WE_Low;Data_Output(0x00);Flash_WE_Low;Flash_WE_High;Flash_CLE_Low;Flash_ALE_High;Flash_WE_Low;Data_Output(Address);Flash_WE_High;Flash_WE_Low;Data_Output((Address 8) 0x0F);Flash_WE_High;Flash_WE_Low;Data_Output((Address 12) 0xFF);Flash_WE_High;Flash_WE_Low;Data_Output((Address 20) 0xFF);Flash_WE_High;Flash_ALE_Low;Flash_CLE_High;Flash_WE_Low;Data_Output(0x30);Flash_WE_High;Flash_CLE_Low;Flash_Wait();Data_PortInputMode();while(i--){Flash_RE_Low;*(stringj) Data_Input;Flash_Delay(c_FlashDelayCnt);Flash_RE_High;Flash_Delay(c_FlashDelayCnt);}}int main(void){uint8_t array[2112],i;bool Is_ok;Init_RCC();delay_init(64);     //延时函数初始化NVIC_Configuration(); //设置NVIC中断分组2:2位抢占优先级2位响应优先级uart_init(115200);Nandflash_Init();Is_ok Nand_FlashPage_Program(0x00,arr);if(Is_okTRUE)printf(Nand_FlashPage_Program is Successful\r\n);elseprintf(Nand_FlashPage_Program is Error\r\n);while(1){Nand_Flash_ReadOnePage(0x00,array);printf(Page 0 data:);for(i0;i10;i){printf(0x%x ,array);}printf(\r\n);delay_ms(1000);}}这是我的nandflash初始化函数void Nandflash_Init(){GPIO_InitTypeDef  GPIO_InitStructure;RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA|RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOE, ENABLE);GPIO_InitStructure.GPIO_Pin GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3;GPIO_InitStructure.GPIO_Mode GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed GPIO_Speed_2MHz;GPIO_Init(GPIOA, GPIO_InitStructure);GPIO_SetBits(GPIOA,GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3);GPIO_InitStructure.GPIO_Pin GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3;GPIO_InitStructure.GPIO_Mode GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed GPIO_Speed_2MHz;GPIO_Init(GPIOC, GPIO_InitStructure);GPIO_SetBits(GPIOC,GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3);GPIO_InitStructure.GPIO_Pin GPIO_Pin_0;GPIO_InitStructure.GPIO_Mode GPIO_Mode_IPU;GPIO_Init(GPIOC, GPIO_InitStructure);GPIOE-CRL 0x33333333;Flash_WP_High;}
http://www.pierceye.com/news/34898/

相关文章:

  • 什么网站做设计可以赚钱吗常用的网页设计工具
  • 怎样做网站底部导航建设集团网站方案
  • 云建网站网址宁波网站建设公司哪家比较好
  • 网站制作怎样快速有质感的wordpress主题
  • 安陆网站建设企业网络营销是什么
  • 学院网站建设时间控制变更申请表东营网站推广
  • 网站建站管理wordpress怎样用
  • 成都网站建设开发公司哪家好php网站攻击
  • 网站开发 北京外包公司网站设计师是做什么的
  • 网站设计制作价格怎么算wordpress模板数据导入
  • 深圳网站建设小江长治网站建设收费多少
  • 低价网站建设怎么样做网站 广州
  • 建设银行的官方网站高铁纪念币确定网站推广目标
  • 宜章泰鑫建设有限公司网站wordpress悬赏
  • 网站建设项目外包合同范本免费咨询心理医生qq号
  • 知舟网站建设建设网站的网站首页
  • 网站建设横条设计网站考虑哪些因素
  • 新手如何入侵一个网站阿里云心选建站
  • 求一个手机能看的网站江宁网站建设价位
  • 广东平台网站建设找哪家广州室内设计公司排名榜
  • 织梦cms小说网站采集如何让百度收录自己信息
  • 烟台网站建设哪家服务好wppay wordpress
  • 网站高级?O置东莞企业网站制作推广运营
  • 网站建设教学点wordpress滑块验证码
  • 网站特色怎么写wordpress怎么搜索代码
  • 网页设计与网站开发网站设计实训心得
  • python 网站开发实战搭建一个网站 优帮云
  • 广州网站推广哪家好古典网站素材
  • 做淘宝店和做网站网站推广方案注意事项?
  • 网站开发 题目书签制作 小学生 一等奖