cancel
Showing results for 
Search instead for 
Did you mean: 

HRTIM burst DMA

JRyu.1
Associate

Hi,

I am trying to figure out to make HRTIM burst DMA working. I want to update timer period, compare1, compare2, and compare 3 registers by using burst DMA. There is not much information about this. There are two postings in the community posted several years ago, and it gave me some idea. But I need to have more information.

  • I used CubeMx to configure and generate code.
  • I want to trigger the burst DMA by software.
  • Assuming that the DMA source buffer data order matches to the order of number of registers to update, for there is no description stated in the reference manual.
  • Nothing happens when I run. It did not stop at burst DMA completion and DMA error callback function when I set breakpoints.

Below screenshots and code are used for the configuration.

0693W00000HqpNIQAZ.png0693W00000HqpMjQAJ.png 

0693W00000HqpMyQAJ.pngI am not sure that I need to check on the "Increment Address" or not.

InvPerComp[0] = new_per;    // new period
InvPerComp[1] = cmp1;       // new compare 1
InvPerComp[2] = cmp2;       // new compare 2
InvPerComp[3] = cmp3;       // new compare 3
 
// Will this update the registers in order?        
HAL_HRTIM_BurstDMATransfer(hrtim, timer, (uint32_t)&InvPerComp[0], 4)

0693W00000HqpNNQAZ.png

4 REPLIES 4
MTall.3
Associate II

Did you find a solution to this problem? It would be interesting to know as I'm working on a similar problem.

BKain.2
Associate II

Did you find a solution to this problem? I have a similar problem.

Pierre_Paris
ST Employee

Hello @JRyu.1 , @BKain.2 , @MTall.3 ,

Here some support and points that may help you :

  • Can you confirm you use HAL_HRTIM_BurstDMAConfig() to configure HRTIM burst DMA timer x update register (HRTIM_BDTxUPR) ? Please share register values before and after executing this line.

Pierre_P_2-1703003958669.png

  • Which STM32 are you using ?
  • Can you please share the HAL_HRTIM_MspInit() content ? Have you enable synchronization ? 

Best Regards,

Pierre

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

liaifat85
Senior III

Confirm that the source buffer used for DMA holds the correct data in the correct order for updating the timer period, compare1, compare2, and compare3 registers.