麻烦使用Cosmic Compiler将两个字节OR成16位int以上来自于谷歌翻译以下为原文 Trouble ORing two bytes into a 16-bit int with Cosmic Compiler
2019-03-12 09:33
; /* ---------------------------------------------------------------- */ /* Now sum the filtered pixels together by ORing
2018-06-22 02:59
我正在插入 ADC_IN0 1x 上拉和 5x 按钮,当我按下某个按钮时,它会增加一个接地电阻并形成电压分压器......然后我读取 ADC 上的值。但是,当我按下按钮时,我的 ADC 在变量上显示 0 而不是 voltage_divider 的 Vout,例如 1V 或 0.5V。我将 CubeIDE 与默认 ADC_IN0 配置一起使用,并按如下方式制作 while(1):hadc.Instance->CHSELR |= ADC_CHSELR_CHANNEL(ADC_CHANNEL_0);HAL_ADC_Start(&hadc);HAL_ADC_PollForConversion(&hadc,10);value_adc=HAL_ADC_GetValue(&hadc);
2022-12-14 08:35
你好,我似乎不理解PSoC创建者的数据类型是如何工作的。在组合体的设置中,可以选择特征值具有什么格式。当数据类型为UIT8时,代码中的值很容易使用,但是我不能用SITT16来处理它。当服务器接收到写请求时,很容易从WReqq=(CyLay-GATSSAWReqEyReqqPARAMYT**)事件PARAMARM中提取值,其值如下:LILUNIT8值=WReq-& Gt;但这不会与StT16合作。如何从特征值中提取两个字节,并将其转换成可用于服务器代码中的比较和数学运算的数字。问候,Andris
2019-10-15 13:24
、冷启动和启停情况等典型汽车条件导致的任何输入下降期间,攫取大量的电容器电压。图2:智能二极管控制器(加上n通道MOSFET)与p通道MOSFET的性能比较图。ORing应用也需要二极管或MOSFET
2018-09-04 14:59
我正在尝试在 H753 上将 ADC3 与 BDMA 结合使用。从将 BDMA 通道 0 分配给 ADC3 的一些立方体生成的代码开始。SRAM4 中分配的内存。添加了 BDMA_Channel0 和 ADC3 的中断处理程序。当我启动 ADC3 时,我点击了默认的中断处理程序——就好像没有定义正确的处理程序一样。ICSR = 0x891这意味着活动中断是 0x91。0x91 - 16 = 129 正是 BDMA_Channel0_IRQn。还有它的处理程序。但是这个处理程序没有被命中。为什么??DMA_HandleTypeDef hdma_adc3;ADC_HandleTypeDef hadc3;void ADC3_IRQHandler(void){ HAL_ADC_IRQHandler(&hadc3);}void BDMA_Channel0_IRQHandler(void){ HAL_DMA_IRQHandler(&hdma_adc3);}我检查了清单和向量表,向量确实指向我的 BDMA_Channel0_IRQHandler。VTOR 看起来是正确的(systick 工作,默认处理程序也在那里)。当代码位于内部闪存或 AXI RAM 中时,行为相同。未启用缓存。那么默认处理程序是如何被调用的呢?是否有 STM32H7x3 的 DMA 模式 (BDMA) 中的 ADC3 示例?
2022-12-13 07:45
我在 ISM330DHCX 数据表中找不到有关 INT1 引脚输出类型的任何详细信息。从我读到的有关此引脚的寄存器配置的内容来看,我认为这将是推挽输出,但如果我配置一个外部 10K 上拉至 3.3VI,则会看到信号固定为 1.2V我已经找到了关于描述不设置任何上拉的初始化过程的说明(所以我删除了它),但这种行为不能用简单的输出引脚来解释。也许这也是供内部使用的引导程序输入?对于与 linux 驱动程序st_lsm6dsx(具有此组件的兼容)一起使用,我应该设置下拉还是仅将控件留给 ISM330DHCX?
2022-12-01 06:47
that there would not be any updates to a disabled axis. I am oring the function register with a 0x80 for a
2018-09-25 17:27
我设置一些I2C通信(虽然,快速阅读的UART和SPI组件、数据表我认为类似的问题可能存在过),我通过API的困惑。似乎所有的发送/接收功能被阻断。有没有启动传输功能,让硬件跟它在速度较慢的I2C时钟,然后让它触发一个中断?我可能会感到困惑。我认为硬件I2C收发器的想法是让它运行在时钟的缓慢而处理器做别的事情上快速的时钟?或是这种情况下通过在直接与寄存器的支持,但不支持通过API吗? 以上来自于百度翻译 以下为原文I'm setting up some I2C communications (although, quickly perusing the datasheet for the UART and SPI components, I think that analogous issues may exist there too) and I'm confused by the API. It seems that all the sending/receiving functions are blocking. Are there no functions for initiating a transfer, letting the hardware mess with it at the much slower I2C clock, and then have it trigger an interrupt? I may just be confused. I thought the idea of the hardware I2C transceiver was to allow it to operate on the slow clock while the processor does other things on the fast clock? Or is this scenario supported through messing directly with the registers, but not supported through the API?
2019-04-12 14:00
你好,我有一般的建筑问题。我正在开发一个带有主处理器和Spartan 6 FPGA的定制PCB。在正常操作期间,主机处理器通过简单的UART总线从FPGA读取数据。我希望能够绕过主机处理器并直接用我的笔记本电脑连接到FPGA。现在,我将UART信号限制为两个引脚,这些引脚被路由到调试连接器。困难在于如何使用两个源(板载处理器ORdebug电缆)驱动RX模块输入(见下图)。在pcb上,我没有任何规定来切换2:1 MUX(跳线等),所以我想避免这种情况。有没有办法让工具允许RX模块的输入由两个源驱动?我知道这不是一般的不会产生错误,但我想不出任何其他解决方法。物理短路将很困难,因为内部UART跟踪未暴露。我想的越多,我就越相信我需要一个MUX(在FPGA逻辑中)和一个硬件跳线。任何人都可以认为一个聪明的解决方案,因为我没有办法在硬件上切换MUX吗?谢谢,Ĵ以上来自于谷歌翻译以下为原文Hello, I have a general architectural question.I am bringing up a custom PCB with a host processor and Spartan 6 FPGA.During normal operation, the host processor reads data from the FPGA over a simple UART bus.I want the ability to bypass the host processor and connect to the FPGA directly with my laptop.Right now, I have the UART signals constrained to two pins that are routed to a debug connector.The difficulty is how to drive the RX module input (see diagram below) with two sources (the on board processor OR debug cable).On the pcb, I don't have any provisions to switch a 2:1 MUX (jumper, etc.) so I'd like to avoid that.Is there a way for the tools to allow the input to RX module be driven by two sources?I know this is a no no in general and generates an error but I can't think of any other workaround.A physical short circuit would be difficult because the internal UART traces a not exposed.The more I think about it the more I am convinced I need a MUX (in the FPGA logic) and a hardware jumper.Can anyone think a clever solution conidering I don't have a way in hardware to switch the MUX? Thanks,J
2019-03-05 08:36