完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我发现了很多模式和STA寄存器位。我还没有找到UTXIN和URXIN。我使用RS 485通信。有时A和B线反向连接。如果没有得到预期的响应,我会扫描其他配置、奇偶校验、波特率等等。我也检查反向A和B Lin。使用UTXIN和URXIV有效地交换软件中的A/B线。我想使用“和谐批准”的方式来改变这些位而不破坏和谐。当使用MLA时,我设置了比特并重新初始化UART。这是一个私有函数,不应该被应用程序直接调用。看起来,它们都调用了一个我不能看到的PLIB函数。
以上来自于百度翻译 以下为原文 I find many of the Mode and STA register bits. I have yet to find UTXINV and URXINV. I use RS 485 communications. Sometimes the A and B lines get connected in reverse. If I do not get an expected response I scan for other configurations, parity, baud rate and so on. I also check for reversed A and B lines. Using UTXINV and URXINV effectively swaps the A/B lines in software. I would like to use a "HARMony approved" way to change these bits without breaking Harmony. When using the MLA I set the bits and re initialize the uart. At the moment it looks like I will have to modify DRV_USART_LINE_CONTROL_SET_RESULT DRV_USART_LineControlSet ( DRV_HANDLE handle, DRV_USART_LINE_CONTROL lineControlMode ) and void _DRV_USART_HardwareSetup(USART_MODULE_ID plibID, DRV_USART_INIT * init) despite the comment
It looks to me they both call a plib function I can not see into. |
|
相关推荐
5个回答
|
|
Oracle USAT驱动程序目前不提供极性配置。可以使用PLIB API来配置。在应用程序中,可以在打开驱动程序之前调用这些函数。在这些调用中,必须直接使用外围ID(U.AtARTHARIDID2),而不是驱动实例ID(Ex.DVVI)。USATARI索引X0),您也可以选择使用由驱动程序生成的外围实例宏(Ex.DrviUsARTHEARTURALALIDIDIX0)到SytSysCopig .h示例,
以上来自于百度翻译 以下为原文 Harmony USART driver doesn't provide polarity configuration as of now. You can use PLIB APIs to configure this. PLIB_USART_TransmitterIdleIsLowEnable/Disable PLIB_USART_ReceiverIdleStateLowEnable/Disable In your application, you can call these functions before opening the driver. You have to use the peripheral ID directly (Ex. USART_ID_2) in these calls instead of driver instance ID (Ex. DRV_USART_INDEX_0), you may also choose to use peripheral instance macro (Ex. DRV_USART_PERIPHERAL_ID_IDX0) generated by driver into system_config.h. Example below, PLIB_USART_TransmitterIdleIsLowEnable(USART_ID_2); |
|
|
|
图腾,谢谢你。我还没有找到这些功能。我不知道这些会通过打开驱动程序“生存/坚持”。这些设置是否证明了“生存/坚持”打开驱动程序?这些设置中的任何一个“生存/坚持”通过“DrviUsARTITIONITALITY”吗??
以上来自于百度翻译 以下为原文 Totem, Thank you. I had not found these functions. I was not aware these would "survive/persist" through opening the driver. Are the settings documented that "survive/persist" opening the driver ? Do any of these settings "survive/persist" through "DRV_USART_Initalize" ? _ ? |
|
|
|
大部分是的。外围设备在SytSyPrimeI化中初始化,所以大多数硬件设置是在打开驱动程序之前完成的。在打开驱动程序时,大多数情况下只能启用外围设备或中断。因此,在初始化和打开之间添加扩展的外围设备设置。在大多数情况下,司机都是安全的。相反,我会说,通过这样做,您可以扩展驱动程序初始化。
以上来自于百度翻译 以下为原文 Mostly YES. Peripherals are initialized in the system_initialize, so most of the hardware setup is done before opening the driver. While opening the driver, in most cases only enabling peripheral or interrupts would happen. Hence adding your extended peripheral setup in between initialize and opening the driver will be safe in most of the cases. Rather I would say, by doing so you extend the driver initialization. |
|
|
|
你使用“大多数情况下的保险箱”给了我一些令人担忧的理由。我认为这意味着我必须在打开USAT之后使用USAT之前读取寄存器并确认这些比特是我需要的。我能正确地理解你的评论吗?
以上来自于百度翻译 以下为原文 Your use of "safe in most of the cases" gives me some cause for concern. I take this to mean I must read the registers and confirm the bits are as I need them before making use of the USART after I open the USART. Do I understand your comments correctly ? |
|
|
|
我认为他说最好的地方是在驱动程序初始化之后(SysSinit),但在启动之前,你可能想在调用驱动程序后把它放好。但在APP中我的工作
以上来自于百度翻译 以下为原文 I think he is saying the best place to do is after the Driver is initialized (sys_init), But before it is started. You may want to put it right after the call to init the driver. But in app init my work |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 17:03 , Processed in 1.371279 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号