stm32f3

How to do a adc conversion every 1us with Nucleo-F303K8?

末鹿安然 提交于 2021-01-29 07:49:20
问题 Im using the STM32 Cube IDE. What I tried now is enable MSM in TIM2 and output_compare_no_output on Channel 1 and select "Reset" as the Trigger Event. Then I went to ADC1 and enabled Regular_Conversion_Mode, set Number_Of_Conversions to 1 and the External_Trigger_Conversion_Source to Timer 2 Trigger Out event. After that I set up a DMA in circular mode that pushes half-words to a RAM buffer. For testing I've set the frequency of the timer a lot lower (10Hz) and send some ADC readings from the

How to do a adc conversion every 1us with Nucleo-F303K8?

纵饮孤独 提交于 2021-01-29 07:27:03
问题 Im using the STM32 Cube IDE. What I tried now is enable MSM in TIM2 and output_compare_no_output on Channel 1 and select "Reset" as the Trigger Event. Then I went to ADC1 and enabled Regular_Conversion_Mode, set Number_Of_Conversions to 1 and the External_Trigger_Conversion_Source to Timer 2 Trigger Out event. After that I set up a DMA in circular mode that pushes half-words to a RAM buffer. For testing I've set the frequency of the timer a lot lower (10Hz) and send some ADC readings from the

CubeMX-generated USB HID device sends wrong data when both endpoint and PMA address are changed

可紊 提交于 2020-02-04 03:47:26
问题 I'm debugging a problem with a composite device that I'm creating, and have recreated the issue in freshly-CubeMX-generated HID-only code, to make it easier to resolve. I've added small amount of code to main() to let me send USB HID mouse-clicks, and flash an LED, when the blue-button is pressed. ... uint8_t click_report[CLICK_REPORT_SIZE] = {0}; extern USBD_HandleTypeDef hUsbDeviceFS; ... int main(void) { ... while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ if(HAL_GPIO_ReadPin