hi
im trying bluepill board
using unit stm32f103fw
{ Converted from STM FWlib
Contributors:
Jeppe Johansen
Bernd Mueller
Valerio Turrini with really small adjustments.....
}
when i use dma channels system hangs
DMA_InitTypeDef.DMA_BufferSize:= 64;
DMA_InitTypeDef.DMA_DIR:= DMA_DIR_PeripheralSRC;
DMA_InitTypeDef.DMA_M2M:= DMA_M2M_Disable;
DMA_InitTypeDef.DMA_MemoryBaseAddr:= @RXbuffer1;
DMA_InitTypeDef.DMA_MemoryDataSize:= DMA_MemoryDataSize_Byte;
DMA_InitTypeDef.DMA_MemoryInc:= DMA_MemoryInc_Enable;
DMA_InitTypeDef.DMA_Mode:= DMA_Mode_Circular;
DMA_InitTypeDef.DMA_PeripheralBaseAddr:= @Usart1.DR;
DMA_InitTypeDef.DMA_PeripheralDataSize:= DMA_PeripheralDataSize_Byte;
DMA_InitTypeDef.DMA_PeripheralInc:= DMA_PeripheralInc_Disable;
DMA_InitTypeDef.DMA_Priority:= DMA_Priority_Medium;
DMA_Init(DMA1.Channel[5], DMA_InitTypeDef); //USART1_RX
DMA_CMD(DMA1.Channel[5], Enabled);
or even hangs if i use only the dma_deinit function
if i comment out the last 2 lines, dont hang, but ovbiously, dont work the dma controller, but all the rest code work fine
in the stm32f10x_md file i found this ¿bug?
TDMARegisters = record
ISR,
IFCR: longword;
//Channel: array[0..7] of TDMAChannel; //wrong!! 8 channels space but have only 7
Channel: array[0..6] of TDMAChannel; //diego bertotti 7/7/2020
end;
thanks in advance for any help/suggestions