问答

汇集网友智慧,解决技术难题

gygp

TA的家园币:3201  

  • GD32F470 SPI DMA接收

    spi2配置没问题,可以正常使用,但是加上dma,发现dma没有开启,有没有大佬告诉我一下,我下面的代码配置哪里有问题,找了好久找不出来,谢谢谢谢!!!uint8_tspi2_tx_buf[6]={0};uint8_tspi2_rx_buf[6]={0};voidDMA0_CH0_Config()//spi——RX{dma_single_data_parameter_structdma_init_spi2_rx;rcu_periph_clock_enable(RCU_DMA0);dma_deinit(DMA0,DMA_CH0);dma_init_spi2_rx.direction=DMA_PERIPH_TO_MEMORY;dma_init_spi2_rx.memory0_addr=(uint32_t)(spi2_rx_buf);//存储器地址dma_init_spi2_rx.memory_inc=DMA_MEMORY_INCREASE_ENABLE;dma_init_spi2_rx.periph_addr=(uint32_t)&SPI_DATA(SPI2);dma_init_spi2_rx.periph_inc=DMA_PERIPH_INCREASE_DISABLE;dma_init_spi2_rx.periph_memory_width=DMA_PERIPH_WIDTH_8BIT;dma_init_spi2_rx.number=sizeof(spi2_rx_buf);dma_init_spi2_rx.priority=DMA_PRIORITY_ULTRA_HIGH;dma_init_spi2_rx.circular_mode=DMA_CIRCULAR_MODE_DISABLE;dma_single_data_mode_init(DMA0,DMA_CH0,&dma_init_spi2_rx);dma_channel_subperipheral_select(DMA0,DMA_CH0,DMA_SUBPERI4);dma_memory_address_config(DMA0,DMA_CH0,DMA_MEMORY_0,(uint32_t)(spi2_rx_buf));//存储器地址dma_transfer_number_config(DMA0,DMA_CH0,sizeof(spi2_rx_buf));dma_channel_enable(DMA0,DMA_CH0);spi_dma_enable(SPI2,SPI_DMA_RECEIVE);}

    2023-11-01 58
  • GD32A503RDT3 ADC+DMA顺序转换问题,没有数据

    voidrcu_config(void){/*enableGPIOclock*/rcu_periph_clock_enable(RCU_GPIOB);rcu_periph_clock_enable(RCU_GPIOE);/*enableADC0clock*/rcu_periph_clock_enable(RCU_ADC0);/*enableDMA0clock*/rcu_periph_clock_enable(RCU_DMA0);}/*!\briefconfiguretheGPIOperipheral\paramnone\param[out]none\retvalnone*/voidgpio_config(void){/*configtheGPIOasanalogmode*/gpio_mode_set(GPIOB,GPIO_MODE_ANALOG,GPIO_PUPD_NONE,GPIO_PIN_1);//GPIOB1,gpio_mode_set(GPIOE,GPIO_MODE_ANALOG,GPIO_PUPD_NONE,GPIO_PIN_13);}/*!\briefconfiguretheDMAperipheral\paramnone\param[out]none\retvalnone*/voiddma_config(void){/*ADC_DMA_channelconfiguration*/dma_parameter_structdma_data_parameter;/*ADCDMA_channelconfiguration*/dma_deinit(DMA0,DMA_CH0);/*initializeDMAsingledatamode*/dma_data_parameter.periph_addr=(uint32_t)(&ADC_RDATA(ADC0));//外设基地址dma_data_parameter.periph_inc=DMA_PERIPH_INCREASE_DISABLE;//内存地址增量模式dma_data_parameter.memory_addr=(uint32_t)adc_value;//数据存放地址dma_data_parameter.memory_inc=DMA_MEMORY_INCREASE_ENABLE;//内存地址增量模式dma_data_parameter.periph_width=DMA_PERIPHERAL_WIDTH_16BIT;//dma外设宽度16位,半字dma_data_parameter.memory_width=DMA_MEMORY_WIDTH_16BIT;dma_data_parameter.direction=DMA_PERIPHERAL_TO_MEMORY;//传输模式,外设到存储(接收)dma_data_parameter.number=2;//长度dma_data_parameter.priority=DMA_PRIORITY_HIGH;//优先级高dma_init(DMA0,DMA_CH0,&dma_data_parameter);dma_circulation_enable(DMA0,DMA_CH0);/*enableDMAchannel*/dma_channel_enable(DMA0,DMA_CH0);}/*!\briefconfiguretheADCperipheral\paramnone\param[out]none\retvalnone*/voidadc_config(void){/*configADCclock*/rcu_adc_clock_config(RCU_

    顺序 2A DMA ADC GD32

    2023-08-28 25
  • ST-link检测不到MCU板芯片

    LKS081开发板上电以后,ST-link检测不到芯片,并且FlashDownload中的ResetandRun勾选上以后,关闭选项卡再打开又回到原先没有勾选的状态,请问这是咋回事啊

    MUC 技术交流 单片机

    2023-07-28 46
  • HK32F030MF4P6无法连接j-link

    j-link无法读取到芯片,显示"CannotconnecttoJ-Link.",HKConfig连不上芯片但是电脑的设备管理器可以显示到已连接的端口重新安装驱动已尝试,更换电脑已尝试,数据线在其他人的板子上可以用还有没有其他的解决方式

    单片机

    2023-05-19 22
  • MA82G5B32 烧录程序不进去

    ICE烧录器,6线连接,目标板已供电,出现如下问题,求大神帮

    MA82G5B32

    2022-11-17 46
  • GD32F450 ADC稳定度问题

    本帖最后由liufreedom2008于2022-8-2409:31编辑请问GD32F450ADC在不采样模式下会跳动几个LSB.输入信号:

    gd32f4xx

    2022-08-23 19
  • 请问哪里可以购买CW32的量产工具CW-Writer,价钱是多少?

    请问哪里可以购买CW32的量产工具CW-Writer,价钱是多少?

    2022-06-06 29
  • AutoChips开发板收到后,使用KEIL5开发,打开例程显示找不到...

    本帖最后由hailang19881003于2021-3-2415:24编辑开发板收到后,使用MDK开发,显示大家有遇到的吗?ErrorinstantiatingRTEcomponentsError#540:'AutoChips.AC781xDevelopmentKit::BoardSupport:AC781xDevelopmentKit:DebugInterface:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips.AC781xDevelopmentKit::BoardSupport:AC781xDevelopmentKit:OLED:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:DMA:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:GPIO:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:I2C:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:ATCDrivers:UART:1.0.0'componentisnotavailablefortarget'GPIODEMO'Error#540:'AutoChips::Device:Startup:1.0.0'componentisnotavailablefortarget'GPIODEMO'

    ps 开发板 keil5 Chip ev TI

    2021-03-24 18