Forum > Embedded - ARM

stm32f103 dma problem [SOLVED]

<< < (2/8) > >>

diego bertotti:
sorry, dont have debugger
wich one?

MiR:
There's a moster long thread here in the forum on debugging.
You can use a 2nd bluepill flashed with either original stlink firmware (google is your friend) or use the very good Black Magic Probe which also fits on a bluepill.

Also found reset code in libopencm3 (which I use sometimes) looks pretty much the same...

Is the peripheral clock for DMA enabled?

void dma_channel_reset(uint32_t dma, uint8_t channel)
{
   /* Disable channel and reset config bits. */
   DMA_CCR(dma, channel) = 0;
   /* Reset data transfer number. */
   DMA_CNDTR(dma, channel) = 0;
   /* Reset peripheral address. */
   DMA_CPAR(dma, channel) = 0;
   /* Reset memory address. */
   DMA_CMAR(dma, channel) = 0;
   /* Reset interrupt flags. */
   DMA_IFCR(dma) |= DMA_IFCR_CIF(channel);
}

diego bertotti:
look this!!!!


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    PDMARegisters : ^LongWord;     PDMARegisters := @DMA1 + $58;   //CCR5  PDMARegisters^:= %000000010100001;  PDMARegisters := @DMA1 + $5C;   //CNDTR5  PDMARegisters^:= 64;     PDMARegisters := @DMA1 + $60;   //CPAR5  PDMARegisters^:= LongWord(@Usart1.DR);  PDMARegisters := @DMA1 + $64;   //CMAR5  PDMARegisters^:= LongWord(@RXBuffer1);  
i still dont know if dma working, but now dont hangs

and dma clock is enabled



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- RCC_AHBPeriphClockCmd( RCC_AHBPeriph_DMA1 or RCC_AHBPeriph_DMA2 or RCC_AHBPeriph_SRAM or RCC_AHBPeriph_FLITF, Enabled); RCC_APB2PeriphClockCmd(RCC_APB2Periph_ALL, Enabled); RCC_APB1PeriphClockCmd(RCC_APB1Periph_ALL, Enabled);  

diego bertotti:

--- Quote from: MiR on July 07, 2020, 10:53:46 pm ---There's a moster long thread here in the forum on debugging.
You can use a 2nd bluepill flashed with either original stlink firmware (google is your friend) or use the very good Black Magic Probe which also fits on a bluepill.

--- End quote ---

ok. but what about debugging software. wich one?

MiR:
You can debug from Lazarus, works quite OK when things are not too complex. Instructions are in the Monster Thread on Debugging...

Good alternatives are:
https://www.gdbgui.com/

and if you have JLink use Ozone:
https://www.segger.com/products/development-tools/ozone-j-link-debugger/
To get a JLink buy a nucleo board for $10 and after a quick conversion you are ready to debug whole STM32 family:
https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
Advantage of Ozone is that it works well with FreeRTOS

I also saw this, but did not try for myself:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/using-debugger.html

seems you can use Eclipse as a standalone debugger, looks interesting, may be worth a try!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version