1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我该如何为自己的BSP添加UART模块?15—03-18。
以上来自于百度翻译 以下为原文 hi, how can I add UART module for my own BSP? 15-03-18. |
|
相关推荐
8个回答
|
|
你能更详细地解释一下你的问题吗?如果你想为你的硬件创建一个定制的BSP,你可能想看看一个教程HTTP://MyCHIPCDeave.com/CONTION: SyeT
以上来自于百度翻译 以下为原文 Can you please explain your question in more detail? If you are looking to create a custom BSP for your hardware, you may want to look into a tutorial http://microchipdeveloper.com/harmony:new-bsp-intro Regards, SyeT |
|
|
|
嗨,可以创建BSP,但我想添加一些模块,如USAT,I2C,…在BSP.HCONFIG文件16-03-18中。
以上来自于百度翻译 以下为原文 hi, it's okay for creating BSP, but I want add some module like USART, I2C,... in bsp.hconfig file. 16-03-18. |
|
|
|
嗨,可以创建BSP,但我想添加一些模块,如USAT,I2C,…在BSP.HCONFIG文件16-03-18中。
以上来自于百度翻译 以下为原文 hi, it's okay for creating BSP, but I want add some module like USART, I2C,... in bsp.hconfig file. 16-03-18. |
|
|
|
我建议你升级到Orthy2xx,那么你就不需要BSP了:
以上来自于百度翻译 以下为原文 I suggest you upgrade to Harmony2xx, then you won't need BSP any more :) |
|
|
|
是的,我已经安装了最后一个(OrthyYV2O05Y01),但是我需要BSP来简化开发我的项目。同样的问题,我需要在UFILE(BSP.HCONFIG文件)中添加USAT
以上来自于百度翻译 以下为原文 Yes, I have installed the Last one (harmony_v2_05_01), but I need BSP to simplify developping my project. Same problem that I need add USART inside ifblock (bsp.hconfig file) |
|
|
|
我不明白为什么你需要与HV20501 BSP,BSP是如此匆忙。我使用HV20501,并可以设置所有的MHC2052没有一个BSP,包括:LED,继电器,SPI,6 UART,I2C,ADC,时钟等。
以上来自于百度翻译 以下为原文 I don't see why you need BSP with Hv20501, BSP is such a hastle. I'm using Hv20501 and can set everything with MHC2052 without a BSP, including: LEDs, Relays, SPI, 6 UART, I2C, ADC, Clock, etc. |
|
|
|
嗨,我看到你很有经验,但我是初学者。真的,这是我的第一个项目的和谐。所以,如果你能帮助我在MHCH2052工具。谢谢。
以上来自于百度翻译 以下为原文 Hi, I seen that u re so experienced, but i'm beginner. Really, this is my first project with Harmony. So, if you can help me in MHC2052 tools. Thanks. |
|
|
|
这是不容易做到这一点,相信我。项目没有BSP通过使用MHCv2.x与OrthyV2.x:1。创建一个新项目(您可以在以后编写的任何C文件中复制)。2。打开MHCV2052(在OrthyV20501下)。3。在引脚图上点击每个引脚选择其功能。试着把你认为最好的插针排列好,使插脚布局更干净。引脚分配蓝色时变为绿色。4。在PIN设置页中,为每个指定的Pi4a配置详细信息。在这里也可以选择您所选择的PGEC/PGD引脚,这样您就可以使用PIN图来创建示意图/PCB符号。4B。双击名称可以更改它。对于创建GPIOIIN /GPIOOXOUD/LeDyAL宏的PIN,用“*”完成名称是非常有用的,这样宏更容易阅读。宏将是Inc:2H05Y01AppjavaSrcStultSyroSyFig DealsStulyCyfig.Hyp:Microchip HealthV2O05Y01\PosialStudioNooSrcStRySysCyFig DealeStRySyFig。e取决于如果您为我的输出引脚创建了多个编译选项-示例生成宏,命名为“OMulCURI”和“Orayayh”,一个活动低和一个活动高:γ定义MulCulthOutGeLe()PLIB PosisSpToGoGLE(PoxsSIDID0,PosithChhanelyA,PoxsS.BiPosiPosi6)定义OrayayHyStestESET(值)PrBixPosisSpIwRITE(PosisSIDID0,PothChhannula,PosisS.BiTyPosix4,value)4E:设置其他PIN选项,如PulpLS5。定期保存,以便不松散的所有工作(点击磁盘图标)6。将时钟设置在时钟图TAB7上。如果可以通过单击表ICON8打开“ADC配置”。注意:我发现对于PIC32 MZ,当关闭/打开MHC时,一些ADC设置丢失,因此确保每次打开MHC时检查ADC设置,直到您确信它们是稳定的或需要重新配置为PIC类型。9。打开选项选项卡并设置所有需要的位,尤其是ICE/ICD。这里有太多的选择。在MHC11中保存和生成。检查并测试生成的代码。如果事情可行,则将整个项目文件夹压缩,并用一个版本和一个什么工作的描述(或者更好地使用版本控制软件,如Svn/Git…),包括AsHythCys1212b下的.MHC和.XLM文件。您选择是否保存或丢弃其他生成的文件,但在某些情况下,保留所有的东西和磁盘空间是便宜的,这些天,为什么不。添加你自己的代码14.ZIP或版本控制您的更改一次又一次地工作。选择:我发现创建具有最小定义的虚拟项目是有用的,并且使用MHC--应用程序配置-应用程序0配置-生成应用程序代码。我发现“生成应用程序代码”通常会比其他一些演示和示例创建更好的与和声版本匹配的代码。我在一个虚拟项目中做它,因为它可以改变MHC选项中其他地方的设置,并且当你的整个项目不在时更容易看到这些变化。也就是说,我有一个BSP随机启用这个过程,没有一个为我的PCB。选择一个不同的PIC可以产生不同的代码(即PIC32 MX与PIC32 MZ在生成的中断代码、ADC代码中的不同,等等)。在做MHC生成之后,通过这些和挑选出你自己项目需要的:-生成的应用程序代码(APP.H,App.c),像“超越比较”AR这样的工具。在比较整个文件夹结构和文件内容时非常有用。因此,如果您复制文件夹,然后添加MHC选项,生成,然后做比较,可以很快地看到MHC的精确更改(您仍然需要选择以找到您需要的)。-检查MHC模块中的任何更改设置,“生成应用程序代码”将被使用(即驱动器I2C FO)。R添加I2C代码,也检查像StaseService定时器那样的定时器用于许多其他事情。和声还是相对较新的,所以当一个bug出现并且它不出现在您的代码中时,检查MHC设置和MHC生成代码是否有bug。祝你们好运。保罗。
以上来自于百度翻译 以下为原文 It wasn't easy getting to this point, believe me. Project without BSP by using MHCv2.x with HarmonyV2.X: 1. Create a new project (You can copy in any C files you've written later). 2. Open MHCv2052 (under HarmonyV20501). 3. On Pin diagram click on each pin to choose its function. Try to arrange the pins where you think is best to make pin layout cleaner. Pins change blue to green when assigned. 4. On Pin Settings page configure details for each assigned pin 4a. It can be useful to also name your chosen PGEC/PGED pins here so you can use the Pin Diagram for creating Schematic/PCB symbols. 4b. Double Click on Name to Change it. For pins that create Macros like GPIO_IN/GPIO_OUT/LED_AL it is useful to finish name with "_" so the Macro is easier to read. Macros will be in C:microchipharmonyv2_05_01appProjectNamefirmwaresrcsystem_configdefaultsystem_config.h P:microchipharmonyv2_05_01_portProjectNamefirmwaresrcsystem_configdefaultsystem_config.h - First is default, second is where I put Harmony for cleaner backups - default may change depending on if you create multiple compile options - sample generated macros for my output pins named "oMcuL_" and "oRelayH_", one active low and one active high: #define oMcuL_Toggle() PLIB_PORTS_PinToggle(PORTS_ID_0, PORT_CHANNEL_A, PORTS_BIT_POS_6) #define oRelayH_StateSet(Value) PLIB_PORTS_PinWrite(PORTS_ID_0, PORT_CHANNEL_A, PORTS_BIT_POS_4, Value) 4e: Set other pin options like Pullups 5. Save regularly so not loose all the work (Click disk icon) 6. Set the clocks on Clock Diagram Tab 7. If available open the "ADC Configuration" by clicking the Table Icon 8. Note: I've found for PIC32MZ some ADC settings are lost when close/open MHC, so ensure you check ADC settings each time you open MHC until you are sure they are stable or need to be reconfigured for your PIC type. 9. Open the Options tab and set all the required bits, especially the ICE/ICD. There are just too many options here to go into. 10. save and generate in MHC 11. Examine and Test generated code. 12. If things work then zip the whole project folder and label it with a version and a description of what works (or better yet use version control software like svn/git/...). 12a. including the .mhc and .xlm files under system_config 12b. Your choice whether to save or discard the other generated files, but in some cases it is useful to keep everything and disk space is cheap these days so why not. 13. Add your own code 14. zip or version control your changes again and again as you get things working. Option: I have found it useful to create dummy projects with minimal definitions, and use the MHC - Application Configuration - Application 0 Configuration - Generate Application Code. I've found "Generate Application Code" often creates code better matched to the Harmony version than some of the demonstrations and samples elsewhere. I do it in a dummy project as it can change settings elsewhere in MHC-Options, and it is easier to see those changes when not in your full project. i.e. I've had a BSP randomly enabled by this process and there isn't one for my PCB. Selecting a different PIC may generate different code (i.e. PIC32MX vs PIC32MZ differs in generated Interrupt code, ADC code, and more). After doing MHC-Generate go through these and pick out what you need for your own project: - the generated App code (app.h, app.c), -- Tools like "Beyond Compare" are quite useful in compare whole folder structures and contents of files. So if you copy folder, then add MHC options, generate, then do Beyond Compare, the exact changes by MHC can be quickly seen (You still have to pick through to find what you need). - check for any changed settings in modules of MHC the "Generate Application Code" is expected to use (i.e. Driver I2C for adding I2C code), and also - check things like SystemServices-Timer as timers are used for many other things. Harmony is still relatively new so when a bug occurs and it doesn't appear to be in your code, then check MHC settings and MHC generated code for bugs. Good Luck. Paul |
|
|
|
只有小组成员才能发言,加入小组>>
5242 浏览 9 评论
2031 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3207 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2256 浏览 5 评论
778浏览 1评论
669浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
596浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
678浏览 0评论
577浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 17:53 , Processed in 1.444969 second(s), Total 90, Slave 74 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号