问题标签 [nucleo]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
stm32 - STM32F7:ADC DMA 传输只工作一次
我想连续读取 ADC 值并使用 DMA 将它们写入数组。我使用的开发板是带有 STM32F767ZI 的 Nucleo 开发板。
为了保持简单的输出数据之类的东西,我将 Arduino IDE 与 STM32 板包一起使用。
我能够让 ADC 在连续模式下工作,但是当我添加 DMA 时它将无法工作。似乎只转移了一个值。包含要传输的数据量的 NDTR 寄存器保持在我将其设置为负一的值。
这是小程序:
我在 STM32F3 上成功使用了 ADC+DMA,但我无法让它在这个 F7 上工作。
GPIOA 的时钟启用,PA3 设置为模拟输入。ADC 的时钟被启用。ADC 设置为具有 DMA 模式和连续 DMA 请求的连续模式。输入为 PA3。ADC 转换开始。DMA 流 4 设置为 ADC1 的正确通道(通道 0)。设置输入和输出地址以及要传输的数据数量,并启用内存增量模式。然后流被启用。
我不确定我在这里错过了什么。
我将衷心感谢您的帮助!
编辑#2
我不小心将通道误认为是流,因此我为 DMA 选择了错误的通道(通道 4 而不是通道 0 用于 DMA2 流 4 中的 ADC1)。这就是为什么它不起作用的主要问题。现在它在双缓冲模式下工作正常,除了一件事:当我启用传输完成中断时,程序不再工作。它只是通过 Serial.print 写一个字母,从开头的“s”。不传输任何值。我做了中断,所以它现在应该只禁用 DMA,但由于某种原因,中断似乎根本不起作用。
c++ - Write IMU data to csv file using buffer and overflow buffer?
I have been trying to implement a C++ complementary filter for a LSM9DS1 IMU connected via I2C to an mbed board, but timing issues are preventing me from getting the angular rate integration right. This is because in my code I'm assuming that my sample rate is 100Hz, while this isn't exactly the rate at which data is being sampled due to the printf() statements I am using to display values in real time. This results in my filter outputting angles that drift/don't go back to the original value when the IMU is put back in its original position.
I've been recommended to follow the following steps in order to avoid delays in my code that could disrupt my time sensitive application:
- On each iteration of the program, add the raw IMU data to a buffer
- When the buffer is nearly full, use an interrupt to write all the data from the buffer to a .csv file
- When/if the buffer overflows, add the remaining data to a new "overflow buffer"
- Empty the first buffer and refill it with the data stored in the overflow buffer, and so on
- Handle the filtering calculations separately by manually treating the data from the .csv file once it's all been collected, so as to avoid timing issues, and see if the output is as expected
The whole buffer/overflow buffer back and forth thing really confuses me, could someone please help me clarifying how to technically achieve the above steps? Thanks in advance!
Edit:
in main.cpp:
stm32 - 如何从 TrueStudio 调试和烧写 Nucleo32 板?
我正在尝试通过 TrueStudio 将我的代码闪存到 NUCLEO-L432KC(STM32L432KC)。它失败了。
[
看起来工具无法检测到 ST-Link 探针。我刚刚通过 PC(Windows10)的 USB 电缆连接了它。代码和工程文件由 STM32CubeMX 生成。
缺少什么?我应该怎么办?
我已经确认以下。
- 从 STM32CubeProgrammer GUI,它无法检测到 ST-Link 连接。
- 从 STM32CubeProgrammer CLI,它可以检测 ST-Link 的 S/N。但无法连接。
- 从 STLinkUpgrade 3.3.0 开始,它可以检测设备和 S/N。也可以更新到 V2J33M25。
- 从 IAR Embedded Workbench,它可以构建和闪存代码以及调试。完全没有问题。
- STM32F4 Discovery 套件用于 STM32F429 MCU 的结果看起来相同。
c - 错误 I2C 通信 B-L072Z-LRWAN(Master) 和 Arduino(Slave)
我正在尝试在 B-L072Z-LRWAN(主)和 Arduino(从)之间进行 I2C 通信。
我使用以下代码成功地将数据从我的主人发送到我的奴隶:
B-L072Z-LRWAN 代码:
Arduino代码:
所以我可以向我的奴隶发送数据,然后我尝试从我的奴隶向我的主人发送数据,所以我添加了这一行代码:
B-L072Z-LRWAN 代码:
我想收到 arduino 发送的 i 值的增量,但它也不起作用,我继续从我的主人发送数据,但我不能从我的奴隶发送。
也许我没有出错,可以请帮助我吗?谢谢。
亲切的问候,
c - 使用 Nucleo L053R8 CRC 计算单元计算 3 字节 CRC
我想使用 Nucleo L053R8 的 crc 计算单元计算一个 3 字节的 CRC 值。生成多项式如下: g(X)=x^24 + x^10 + x^9 + x^6 + x^4 + x^3 + x + 1
似乎使用这个 CRC 计算单元我只能生成一个 32 位长度的 CRC,较小的值只是 32 位结果的 LSBS。我也知道CRC32的LSB不等于CRC16。
关于我应该对输入/输出数据执行哪些操作以获得我想要的正确 CRC24 的任何想法?
c - CRC 计算单元总是返回 0
我正在使用 Nucleo L053R8 的 CRC32 计算单元来计算数据流输入以字节为单位的数据缓冲区的校验和。在 ST 提供的示例项目中,他们使用 4 字节长度元素的数据缓冲区,并具有以下 CRC 处理程序配置:
初始化后,以下函数用于计算 CRC:
由于我的输入数据长度为 1 字节,并且我有自己的多项式和初始值,因此我使用了以下配置:
而且我已将输入数据转换为 uint32_t 但是,无论输入数据如何,结果始终为 0。可能是什么问题呢 ?
c - STM32 无法通过 HAL_UART_Recceive_IT 接收数据
我是 STM32 的初学者,我有一个项目,需要从另一个设备(如 arduino)接收数据,现在我尝试从 UART 3 传输数据,并使用 UART 1 接收数据。但我无法获得任何数据。我将 TX uart 3 连接到 RX uart 1,将 TX uart 1 连接到 RX uart 3。
arm - Question to any embedded systems engineers out there using STM32 NUCLEO
I have recently bought an STM32 NUCLEO Dev Kit and wondered if this what an actual Embedded Systems Engineer would use in the industry when developing a product?
I'm using Kiel Uvision 5, STMCubeMX and STM32 ST-LINK Utility to develop certain projects. As I am used to using PIC and using registers like PORTA, OSCCON, TIMER0 etc, I see that Kiel Uvision 5 uses ready made functions like HAL_GPIO_TogglePin(.........) etc. Is this the usual way they do this in industry or work more directly with the registers?
c - 是否有使用 X-NUCLEO_NFC05A1 读取 NFC-A (ISO14443A) 标签的功能?
我正在使用 X-NUCLEO-NFC05A1 和 STM32 NUCLEO-F401RE 板来读取 NFC-A (ISO14443A) 标签。我找不到任何读取标签的功能。谁能帮我?
我尝试了ST 给出的示例,我可以从那里找到写函数。但是我从那里找不到任何阅读功能。