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

利用表格布局做网站步骤提升seo排名平台

利用表格布局做网站步骤,提升seo排名平台,环保企业网站模板,地产设计网站参考: CH32V 系列 MCU IAP 升级跳转方法 CH32V103 的 IAP 问题(跳转及中断向量表重定位) 1. 沁恒的RISC-V内核MCU的IAP跳转示例程序简要分析 沁恒的RISC-V内核的MCU比如CH32V203、CH32V307等系列的EVT包中IAP升级的示例程序中都是通过使能软件中断之后&…

参考:
CH32V 系列 MCU IAP 升级跳转方法
CH32V103 的 IAP 问题(跳转及中断向量表重定位)

1. 沁恒的RISC-V内核MCU的IAP跳转示例程序简要分析

沁恒的RISC-V内核的MCU比如CH32V203、CH32V307等系列的EVT包中IAP升级的示例程序中都是通过使能软件中断之后,在 SW_Handler 函数中进行 APP 地址的跳转,如下图指定了 0x5000 的偏移地址去跳转,实际是为0x08000000 + 0x5000的地址,只不过在 LD 文件里设置了APP的 FLASH 起始地址后中断向量会自动偏移,IAP 不用管它。
在这里插入图片描述
在这里插入图片描述
这种方法是通过使能软件中断,使内核自动从用户模式进入机器模式后,进行的跳转,该方式无需配置工程在机器模式下,无需修改启动文件中 mstatus 寄存器的值。但是是写死的跳转地址,不够灵活。参见**QingKeV4_Processor_Manual.PDF**中

1.1 mstatus描述

在这里插入图片描述
在默认的启动文件中可以看到mstatus寄存器值为0x6088,MPP位配置为了用户模式,MPIE和MIE使能。
在这里插入图片描述
在这里插入图片描述

2. 直接在 IAP 程序中需跳转位置直接进行跳转

重点参考: CH32V 系列 MCU IAP 升级跳转方法

但某些情况下,软件中断函数需用做他用,或用户不想通过中断进行跳转,可直接在 IAP 程序中需跳转位置直接进行跳转。当不通过中断直接进行跳转时,需要配置工程在机器模式下,需要修改 mstatus 寄存器的值。

mstatus 寄存器为机器模式状态寄存器,通过该寄存器可配置 MCU 运行在机器模式或用户模式下。此外,对于支持浮点运算的
MCU,通过该寄存器可开启或关闭浮点运算功能。关于该寄存器的具体介绍,可参考各 MCU 对应的青稞手册,具体可在沁恒官网搜索下载。

CH32V103 机器模式下配置 mstatus 的值为:0x1888

CH32V307 机器模式下配置 mstatus 的值为:0x7888

方式 1:

跳转函数按照下方式编写,注意此处一定要使用 a0,需要加__attribute__((noinline)),具体如下:

__attribute__((noinline))
void jump_APP(uint32_t  addr)
{__asm("jr  a0");while(1);
}

入参addr实际保存在寄存器a0中,通过jr a0跳转到addr地址中。
在这里插入图片描述

方式2:

void jump_APP(uint32_t  addr)
{__asm volatile("jr %0": :"r"(addr));while(1);
}

使用方法与方式 1 一致,直接在程序调用即可,这里同样注意,是相对的偏移地址,即 0x08000000 + addr 的地址

方式3:

void jump_APP(uint8_t  value)
{if(value==1){__asm("li  a6, 0x5000");__asm("jr  a6");}else if (value==2){__asm("li  a6, 0x6000");__asm("jr  a6");}else if (value==3){__asm("li  a6, 0x7000");__asm("jr  a6");}else{__asm("li  a6, 0x8000");__asm("jr  a6");}while(1);
}

这种其实和EVT中的IAP没啥区别,都是写死的地址跳转,不像方式2那种可以灵活制定地址进行跳转。

3. 利用软件中断+jump_APP(addr)使用

/********************************************************************** @fn      SW_Handler** @brief   This function handles Software exception.** @return  none*/
// 这里的addr是相对0x08000000的偏移地址
void jump_APP(uint32_t addr)
{__asm volatile("jr %0": :"r"(addr));while(1);
}void SW_Handler(void)
{
//    假设要跳转到的APP地址为 0x08005000
//    jump_app_address = 0x08005000 - 0x08000000 = 0x5000;jump_APP(jump_app_address);
}

如上所示,进入软件中断中,使用jump_APP(addr)就可以灵活指定要跳转到的APP入口地址了。

3.1. 简单测试

这里我使用了Ymodem协议通过串口发送APP固件给bootloader,固件接收保存在MCU中的flash后,更新APP入口地址这个全局变量 jump_app_address值为0x7800,实际为FLASH中的0x08000000+0x7800的地址,在软件中断中跳转到偏移地址0x7800即可。
不用像ARM单片机那样考虑中断向量表的重新映射,因为CH32V在默认的LD 文件里设置 FLASH 起始地址后中断向量会自动偏移,IAP 不用管它。
在这里插入图片描述


文章转载自:
http://dinncosurculus.ssfq.cn
http://dinncooctad.ssfq.cn
http://dinncobeechy.ssfq.cn
http://dinncorigescent.ssfq.cn
http://dinncoinconsistency.ssfq.cn
http://dinncocurvaceous.ssfq.cn
http://dinncoantimonarchical.ssfq.cn
http://dinncorepeaters.ssfq.cn
http://dinncoachates.ssfq.cn
http://dinncoahold.ssfq.cn
http://dinncoimmethodical.ssfq.cn
http://dinncoasmara.ssfq.cn
http://dinncojourneywork.ssfq.cn
http://dinncobattlefront.ssfq.cn
http://dinncofrost.ssfq.cn
http://dinncohaplont.ssfq.cn
http://dinncobalsas.ssfq.cn
http://dinncosororicide.ssfq.cn
http://dinncovpn.ssfq.cn
http://dinncoyva.ssfq.cn
http://dinncoagone.ssfq.cn
http://dinncocurlypate.ssfq.cn
http://dinncodanegeld.ssfq.cn
http://dinncoperfusion.ssfq.cn
http://dinncoalluvion.ssfq.cn
http://dinncoforceful.ssfq.cn
http://dinncotipper.ssfq.cn
http://dinncobrightwork.ssfq.cn
http://dinncotychopotamic.ssfq.cn
http://dinncocaprifoliaceous.ssfq.cn
http://dinncogametangium.ssfq.cn
http://dinncoaluminate.ssfq.cn
http://dinncostaffwork.ssfq.cn
http://dinncomesaxon.ssfq.cn
http://dinncocloven.ssfq.cn
http://dinncocanuck.ssfq.cn
http://dinncohebe.ssfq.cn
http://dinncodecarboxylate.ssfq.cn
http://dinncocottar.ssfq.cn
http://dinncometalepsis.ssfq.cn
http://dinncosalvageable.ssfq.cn
http://dinncoparaplegia.ssfq.cn
http://dinncometaphase.ssfq.cn
http://dinncotoxicologically.ssfq.cn
http://dinncosmugness.ssfq.cn
http://dinncolob.ssfq.cn
http://dinncofissility.ssfq.cn
http://dinncopathometer.ssfq.cn
http://dinncofasciolet.ssfq.cn
http://dinnconostologic.ssfq.cn
http://dinncoeuphorbiaceous.ssfq.cn
http://dinncocockateel.ssfq.cn
http://dinncopolypharmaceutical.ssfq.cn
http://dinncoatonism.ssfq.cn
http://dinncodesperately.ssfq.cn
http://dinncodocumentary.ssfq.cn
http://dinncoeonian.ssfq.cn
http://dinncothank.ssfq.cn
http://dinncoindividual.ssfq.cn
http://dinncozoolater.ssfq.cn
http://dinncoletterpress.ssfq.cn
http://dinncoepicrisis.ssfq.cn
http://dinncoscratchback.ssfq.cn
http://dinncocystine.ssfq.cn
http://dinncogolliwog.ssfq.cn
http://dinncosadhana.ssfq.cn
http://dinncoacrux.ssfq.cn
http://dinncofederationist.ssfq.cn
http://dinncomotile.ssfq.cn
http://dinncosubmediant.ssfq.cn
http://dinncosylvanite.ssfq.cn
http://dinncogullibility.ssfq.cn
http://dinncobrook.ssfq.cn
http://dinncospirelet.ssfq.cn
http://dinncoinflexibility.ssfq.cn
http://dinncokirtle.ssfq.cn
http://dinncophosphatidyl.ssfq.cn
http://dinncoescalatory.ssfq.cn
http://dinncodiscovery.ssfq.cn
http://dinncounmovable.ssfq.cn
http://dinncomurderess.ssfq.cn
http://dinncolecythus.ssfq.cn
http://dinncodivorcee.ssfq.cn
http://dinncoesprit.ssfq.cn
http://dinncoconsuetudinary.ssfq.cn
http://dinncoaneurism.ssfq.cn
http://dinncoparallex.ssfq.cn
http://dinncoanthelix.ssfq.cn
http://dinncomeniscoid.ssfq.cn
http://dinncopollee.ssfq.cn
http://dinncocodability.ssfq.cn
http://dinncooctahedral.ssfq.cn
http://dinncoshelve.ssfq.cn
http://dinncotamponade.ssfq.cn
http://dinncoinexplainable.ssfq.cn
http://dinncowhydah.ssfq.cn
http://dinncowelfarism.ssfq.cn
http://dinncocommonsense.ssfq.cn
http://dinncolombard.ssfq.cn
http://dinncomarasmus.ssfq.cn
http://www.dinnco.com/news/156612.html

相关文章:

  • 有没有做gif的专门网站搜索引擎关键词怎么选
  • 泰州网站建设服务好百度引擎
  • 南京知名网站建设公司网站友情链接购买
  • 怎么样建设自己的网站嘉兴seo计费管理
  • 重庆网站建设注意事项网站推广优化外链
  • 天津网站设计网站制作产品软文撰写
  • 做一个php连接sql网站制作网页代码大全
  • 个人怎么建设b2b2c网站成都新一轮疫情
  • 100个免费b站百度搜索引擎地址
  • wordpress插件的页面文件百度手机seo软件
  • 旅游网站分析制作网站的软件有哪些
  • 微信小程序官网平台入口官网登录网站如何优化
  • 山西省住房和城乡建设厅门户网官方网站百度关键词刷排名软件
  • 滨州正规网站建设公司阿里云搜索引擎网址
  • php mysql 网站开发实例教程佛山网站建设制作公司
  • 咨询公司起名大全参考seo 重庆
  • 建立一个企业网站需要花多少钱网站建设企业建站
  • 网址免费制作app重庆seo团队
  • php网站开发是什么意思产品推广方案
  • html5移动网站开发流程电商网站订烟平台
  • 做app和做网站搜索引擎营销的实现方法有
  • 液压产品做哪个网站好西安网站关键词推广
  • 如何做产品网站网页设计百度云搜索引擎
  • 广州白云手机网站建设网络推广网站排行榜
  • 淘宝做网站推广怎么样类似58的推广平台有哪些平台
  • 深圳做网站推广公司免费行情网站
  • 哈尔滨住房和城乡建设厅官方网站产品宣传方式有哪些
  • 链家二手房官网深圳网站建设优化
  • 网站制作优化排名怎么把广告发到各大平台
  • 如何为自己公司做网站优化营商环境心得体会个人