stm32h7xx_hal_mdma.c
Go to the documentation of this file.
1 
150 /* Includes ------------------------------------------------------------------*/
151 #include "stm32h7xx_hal.h"
152 
162 #ifdef HAL_MDMA_MODULE_ENABLED
163 
164 /* Private typedef -----------------------------------------------------------*/
165 /* Private constants ---------------------------------------------------------*/
169 #define HAL_TIMEOUT_MDMA_ABORT 5U /* 5 ms */
170 #define HAL_MDMA_CHANNEL_SIZE 0x40U /* an MDMA instance channel size is 64 byte */
171 
174 /* Private macro -------------------------------------------------------------*/
175 /* Private variables ---------------------------------------------------------*/
176 /* Private function prototypes -----------------------------------------------*/
180 static void MDMA_SetConfig(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount);
181 static void MDMA_Init(MDMA_HandleTypeDef *hmdma);
182 
220 {
221  uint32_t tickstart = HAL_GetTick();
222 
223  /* Check the MDMA peripheral handle */
224  if(hmdma == NULL)
225  {
226  return HAL_ERROR;
227  }
228 
229  /* Check the parameters */
245 
246 
247  /* Allocate lock resource */
248  __HAL_UNLOCK(hmdma);
249 
250  /* Change MDMA peripheral state */
251  hmdma->State = HAL_MDMA_STATE_BUSY;
252 
253  /* Disable the MDMA channel */
254  __HAL_MDMA_DISABLE(hmdma);
255 
256  /* Check if the MDMA channel is effectively disabled */
257  while((hmdma->Instance->CCR & MDMA_CCR_EN) != 0U)
258  {
259  /* Check for the Timeout */
260  if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_MDMA_ABORT)
261  {
262  /* Update error code */
264 
265  /* Change the MDMA state */
266  hmdma->State = HAL_MDMA_STATE_ERROR;
267 
268  return HAL_ERROR;
269  }
270  }
271 
272  /* Initialize the MDMA channel registers */
273  MDMA_Init(hmdma);
274 
275  /* Reset the MDMA first/last linkedlist node addresses and node counter */
276  hmdma->FirstLinkedListNodeAddress = 0;
277  hmdma->LastLinkedListNodeAddress = 0;
278  hmdma->LinkedListNodeCounter = 0;
279 
280  /* Initialize the error code */
282 
283  /* Initialize the MDMA state */
284  hmdma->State = HAL_MDMA_STATE_READY;
285 
286  return HAL_OK;
287 }
288 
296 {
297 
298  /* Check the MDMA peripheral handle */
299  if(hmdma == NULL)
300  {
301  return HAL_ERROR;
302  }
303 
304  /* Disable the selected MDMA Channelx */
305  __HAL_MDMA_DISABLE(hmdma);
306 
307  /* Reset MDMA Channel control register */
308  hmdma->Instance->CCR = 0;
309  hmdma->Instance->CTCR = 0;
310  hmdma->Instance->CBNDTR = 0;
311  hmdma->Instance->CSAR = 0;
312  hmdma->Instance->CDAR = 0;
313  hmdma->Instance->CBRUR = 0;
314  hmdma->Instance->CLAR = 0;
315  hmdma->Instance->CTBR = 0;
316  hmdma->Instance->CMAR = 0;
317  hmdma->Instance->CMDR = 0;
318 
319  /* Clear all flags */
321 
322  /* Reset the MDMA first/last linkedlist node addresses and node counter */
323  hmdma->FirstLinkedListNodeAddress = 0;
324  hmdma->LastLinkedListNodeAddress = 0;
325  hmdma->LinkedListNodeCounter = 0;
326 
327  /* Initialize the error code */
329 
330  /* Initialize the MDMA state */
331  hmdma->State = HAL_MDMA_STATE_RESET;
332 
333  /* Release Lock */
334  __HAL_UNLOCK(hmdma);
335 
336  return HAL_OK;
337 }
338 
348 HAL_StatusTypeDef HAL_MDMA_ConfigPostRequestMask(MDMA_HandleTypeDef *hmdma, uint32_t MaskAddress, uint32_t MaskData)
349 {
350  HAL_StatusTypeDef status = HAL_OK;
351 
352  /* Check the MDMA peripheral handle */
353  if(hmdma == NULL)
354  {
355  return HAL_ERROR;
356  }
357 
358  /* Process locked */
359  __HAL_LOCK(hmdma);
360 
361  if(HAL_MDMA_STATE_READY == hmdma->State)
362  {
363  /* if HW request set Post Request MaskAddress and MaskData, */
364  if((hmdma->Instance->CTCR & MDMA_CTCR_SWRM) == 0U)
365  {
366  /* Set the HW request clear Mask and Data */
367  hmdma->Instance->CMAR = MaskAddress;
368  hmdma->Instance->CMDR = MaskData;
369 
370  /*
371  -If the request is done by SW : BWM could be set to 1 or 0.
372  -If the request is done by a peripheral :
373  If mask address not set (0) => BWM must be set to 0
374  If mask address set (different than 0) => BWM could be set to 1 or 0
375  */
376  if(MaskAddress == 0U)
377  {
378  hmdma->Instance->CTCR &= ~MDMA_CTCR_BWM;
379  }
380  else
381  {
382  hmdma->Instance->CTCR |= MDMA_CTCR_BWM;
383  }
384  }
385  else
386  {
387  /* Return error status */
388  status = HAL_ERROR;
389  }
390  }
391  else
392  {
393  /* Return error status */
394  status = HAL_ERROR;
395  }
396  /* Release Lock */
397  __HAL_UNLOCK(hmdma);
398 
399  return status;
400 }
401 
411 {
412  HAL_StatusTypeDef status = HAL_OK;
413 
414  /* Check the MDMA peripheral handle */
415  if(hmdma == NULL)
416  {
417  return HAL_ERROR;
418  }
419 
420  /* Process locked */
421  __HAL_LOCK(hmdma);
422 
423  if(HAL_MDMA_STATE_READY == hmdma->State)
424  {
425  switch (CallbackID)
426  {
428  hmdma->XferCpltCallback = pCallback;
429  break;
430 
432  hmdma->XferBufferCpltCallback = pCallback;
433  break;
434 
436  hmdma->XferBlockCpltCallback = pCallback;
437  break;
438 
440  hmdma->XferRepeatBlockCpltCallback = pCallback;
441  break;
442 
444  hmdma->XferErrorCallback = pCallback;
445  break;
446 
448  hmdma->XferAbortCallback = pCallback;
449  break;
450 
451  default:
452  break;
453  }
454  }
455  else
456  {
457  /* Return error status */
458  status = HAL_ERROR;
459  }
460 
461  /* Release Lock */
462  __HAL_UNLOCK(hmdma);
463 
464  return status;
465 }
466 
476 {
477  HAL_StatusTypeDef status = HAL_OK;
478 
479  /* Check the MDMA peripheral handle */
480  if(hmdma == NULL)
481  {
482  return HAL_ERROR;
483  }
484 
485  /* Process locked */
486  __HAL_LOCK(hmdma);
487 
488  if(HAL_MDMA_STATE_READY == hmdma->State)
489  {
490  switch (CallbackID)
491  {
493  hmdma->XferCpltCallback = NULL;
494  break;
495 
497  hmdma->XferBufferCpltCallback = NULL;
498  break;
499 
501  hmdma->XferBlockCpltCallback = NULL;
502  break;
503 
506  break;
507 
509  hmdma->XferErrorCallback = NULL;
510  break;
511 
513  hmdma->XferAbortCallback = NULL;
514  break;
515 
517  hmdma->XferCpltCallback = NULL;
518  hmdma->XferBufferCpltCallback = NULL;
519  hmdma->XferBlockCpltCallback = NULL;
521  hmdma->XferErrorCallback = NULL;
522  hmdma->XferAbortCallback = NULL;
523  break;
524 
525  default:
526  status = HAL_ERROR;
527  break;
528  }
529  }
530  else
531  {
532  status = HAL_ERROR;
533  }
534 
535  /* Release Lock */
536  __HAL_UNLOCK(hmdma);
537 
538  return status;
539 }
540 
570 {
571  uint32_t addressMask;
572  uint32_t blockoffset;
573 
574  /* Check the MDMA peripheral state */
575  if((pNode == NULL) || (pNodeConfig == NULL))
576  {
577  return HAL_ERROR;
578  }
579 
580  /* Check the parameters */
583  assert_param(IS_MDMA_REQUEST(pNodeConfig->Init.Request));
595 
598 
599 
600  /* Configure next Link node Address Register to zero */
601  pNode->CLAR = 0;
602 
603  /* Configure the Link Node registers*/
604  pNode->CTBR = 0;
605  pNode->CMAR = 0;
606  pNode->CMDR = 0;
607  pNode->Reserved = 0;
608 
609  /* Write new CTCR Register value */
610  pNode->CTCR = pNodeConfig->Init.SourceInc | pNodeConfig->Init.DestinationInc | \
611  pNodeConfig->Init.SourceDataSize | pNodeConfig->Init.DestDataSize | \
612  pNodeConfig->Init.DataAlignment| pNodeConfig->Init.SourceBurst | \
613  pNodeConfig->Init.DestBurst | \
614  ((pNodeConfig->Init.BufferTransferLength - 1U) << MDMA_CTCR_TLEN_Pos) | \
615  pNodeConfig->Init.TransferTriggerMode;
616 
617  /* If SW request set the CTCR register to SW Request Mode*/
618  if(pNodeConfig->Init.Request == MDMA_REQUEST_SW)
619  {
620  pNode->CTCR |= MDMA_CTCR_SWRM;
621  }
622 
623  /*
624  -If the request is done by SW : BWM could be set to 1 or 0.
625  -If the request is done by a peripheral :
626  If mask address not set (0) => BWM must be set to 0
627  If mask address set (different than 0) => BWM could be set to 1 or 0
628  */
629  if((pNodeConfig->Init.Request == MDMA_REQUEST_SW) || (pNodeConfig->PostRequestMaskAddress != 0U))
630  {
631  pNode->CTCR |= MDMA_CTCR_BWM;
632  }
633 
634  /* Set the new CBNDTR Register value */
635  pNode->CBNDTR = ((pNodeConfig->BlockCount - 1U) << MDMA_CBNDTR_BRC_Pos) & MDMA_CBNDTR_BRC;
636 
637  /* if block source address offset is negative set the Block Repeat Source address Update Mode to decrement */
638  if(pNodeConfig->Init.SourceBlockAddressOffset < 0)
639  {
640  pNode->CBNDTR |= MDMA_CBNDTR_BRSUM;
641  /*write new CBRUR Register value : source repeat block offset */
642  blockoffset = (uint32_t)(- pNodeConfig->Init.SourceBlockAddressOffset);
643  pNode->CBRUR = blockoffset & 0x0000FFFFU;
644  }
645  else
646  {
647  /*write new CBRUR Register value : source repeat block offset */
648  pNode->CBRUR = (((uint32_t) pNodeConfig->Init.SourceBlockAddressOffset) & 0x0000FFFFU);
649  }
650 
651  /* if block destination address offset is negative set the Block Repeat destination address Update Mode to decrement */
652  if(pNodeConfig->Init.DestBlockAddressOffset < 0)
653  {
654  pNode->CBNDTR |= MDMA_CBNDTR_BRDUM;
655  /*write new CBRUR Register value : destination repeat block offset */
656  blockoffset = (uint32_t)(- pNodeConfig->Init.DestBlockAddressOffset);
657  pNode->CBRUR |= ((blockoffset & 0x0000FFFFU) << MDMA_CBRUR_DUV_Pos);
658  }
659  else
660  {
661  /*write new CBRUR Register value : destination repeat block offset */
662  pNode->CBRUR |= ((((uint32_t)pNodeConfig->Init.DestBlockAddressOffset) & 0x0000FFFFU) << MDMA_CBRUR_DUV_Pos);
663  }
664 
665  /* Configure MDMA Link Node data length */
666  pNode->CBNDTR |= pNodeConfig->BlockDataLength;
667 
668  /* Configure MDMA Link Node destination address */
669  pNode->CDAR = pNodeConfig->DstAddress;
670 
671  /* Configure MDMA Link Node Source address */
672  pNode->CSAR = pNodeConfig->SrcAddress;
673 
674  /* if HW request set the HW request and the requet CleraMask and ClearData MaskData, */
675  if(pNodeConfig->Init.Request != MDMA_REQUEST_SW)
676  {
677  /* Set the HW request in CTBR register */
678  pNode->CTBR = pNodeConfig->Init.Request & MDMA_CTBR_TSEL;
679  /* Set the HW request clear Mask and Data */
680  pNode->CMAR = pNodeConfig->PostRequestMaskAddress;
681  pNode->CMDR = pNodeConfig->PostRequestMaskData;
682  }
683 
684  addressMask = pNodeConfig->SrcAddress & 0xFF000000U;
685  if((addressMask == 0x20000000U) || (addressMask == 0x00000000U))
686  {
687  /*The AHBSbus is used as source (read operation) on channel x */
688  pNode->CTBR |= MDMA_CTBR_SBUS;
689  }
690 
691  addressMask = pNodeConfig->DstAddress & 0xFF000000U;
692  if((addressMask == 0x20000000U) || (addressMask == 0x00000000U))
693  {
694  /*The AHB bus is used as destination (write operation) on channel x */
695  pNode->CTBR |= MDMA_CTBR_DBUS;
696  }
697 
698  return HAL_OK;
699 }
700 
713 {
714  MDMA_LinkNodeTypeDef *pNode;
715  uint32_t counter = 0, nodeInserted = 0;
716  HAL_StatusTypeDef hal_status = HAL_OK;
717 
718  /* Check the MDMA peripheral handle */
719  if((hmdma == NULL) || (pNewNode == NULL))
720  {
721  return HAL_ERROR;
722  }
723 
724  /* Process locked */
725  __HAL_LOCK(hmdma);
726 
727  if(HAL_MDMA_STATE_READY == hmdma->State)
728  {
729  /* Change MDMA peripheral state */
730  hmdma->State = HAL_MDMA_STATE_BUSY;
731 
732  /* Check if this is the first node (after the Inititlization node) */
733  if((uint32_t)hmdma->FirstLinkedListNodeAddress == 0U)
734  {
735  if(pPrevNode == NULL)
736  {
737  /* if this is the first node after the initialization
738  connect this node to the node 0 by updating
739  the MDMA channel CLAR register to this node address */
740  hmdma->Instance->CLAR = (uint32_t)pNewNode;
741  /* Set the MDMA handle First linked List node*/
742  hmdma->FirstLinkedListNodeAddress = pNewNode;
743 
744  /*reset New node link */
745  pNewNode->CLAR = 0;
746 
747  /* Update the Handle last node address */
748  hmdma->LastLinkedListNodeAddress = pNewNode;
749 
750  hmdma->LinkedListNodeCounter = 1;
751  }
752  else
753  {
754  hal_status = HAL_ERROR;
755  }
756  }
757  else if(hmdma->FirstLinkedListNodeAddress != pNewNode)
758  {
759  /* Check if the node to insert already exists*/
760  pNode = hmdma->FirstLinkedListNodeAddress;
761  while((counter < hmdma->LinkedListNodeCounter) && (hal_status == HAL_OK))
762  {
763  if(pNode->CLAR == (uint32_t)pNewNode)
764  {
765  hal_status = HAL_ERROR; /* error this node already exist in the linked list and it is not first node */
766  }
767  pNode = (MDMA_LinkNodeTypeDef *)pNode->CLAR;
768  counter++;
769  }
770 
771  if(hal_status == HAL_OK)
772  {
773  /* Check if the previous node is the last one in the current list or zero */
774  if((pPrevNode == hmdma->LastLinkedListNodeAddress) || (pPrevNode == NULL))
775  {
776  /* insert the new node at the end of the list */
777  pNewNode->CLAR = hmdma->LastLinkedListNodeAddress->CLAR;
778  hmdma->LastLinkedListNodeAddress->CLAR = (uint32_t)pNewNode;
779  /* Update the Handle last node address */
780  hmdma->LastLinkedListNodeAddress = pNewNode;
781  /* Increment the linked list node counter */
782  hmdma->LinkedListNodeCounter++;
783  }
784  else
785  {
786  /*insert the new node after the pPreviousNode node */
787  pNode = hmdma->FirstLinkedListNodeAddress;
788  counter = 0;
789  while((counter < hmdma->LinkedListNodeCounter) && (nodeInserted == 0U))
790  {
791  counter++;
792  if(pNode == pPrevNode)
793  {
794  /*Insert the new node after the previous one */
795  pNewNode->CLAR = pNode->CLAR;
796  pNode->CLAR = (uint32_t)pNewNode;
797  /* Increment the linked list node counter */
798  hmdma->LinkedListNodeCounter++;
799  nodeInserted = 1;
800  }
801  else
802  {
803  pNode = (MDMA_LinkNodeTypeDef *)pNode->CLAR;
804  }
805  }
806 
807  if(nodeInserted == 0U)
808  {
809  hal_status = HAL_ERROR;
810  }
811  }
812  }
813  }
814  else
815  {
816  hal_status = HAL_ERROR;
817  }
818 
819  /* Process unlocked */
820  __HAL_UNLOCK(hmdma);
821 
822  hmdma->State = HAL_MDMA_STATE_READY;
823 
824  return hal_status;
825  }
826  else
827  {
828  /* Process unlocked */
829  __HAL_UNLOCK(hmdma);
830 
831  /* Return error status */
832  return HAL_BUSY;
833  }
834 }
835 
846 {
847  MDMA_LinkNodeTypeDef *ptmpNode;
848  uint32_t counter = 0, nodeDeleted = 0;
849  HAL_StatusTypeDef hal_status = HAL_OK;
850 
851  /* Check the MDMA peripheral handle */
852  if((hmdma == NULL) || (pNode == NULL))
853  {
854  return HAL_ERROR;
855  }
856 
857  /* Process locked */
858  __HAL_LOCK(hmdma);
859 
860  if(HAL_MDMA_STATE_READY == hmdma->State)
861  {
862  /* Change MDMA peripheral state */
863  hmdma->State = HAL_MDMA_STATE_BUSY;
864 
865  /* If first and last node are null (no nodes in the list) : return error*/
866  if(((uint32_t)hmdma->FirstLinkedListNodeAddress == 0U) || ((uint32_t)hmdma->LastLinkedListNodeAddress == 0U) || (hmdma->LinkedListNodeCounter == 0U))
867  {
868  hal_status = HAL_ERROR;
869  }
870  else if(hmdma->FirstLinkedListNodeAddress == pNode) /* Deleting first node */
871  {
872  /* Delete 1st node */
873  if(hmdma->LastLinkedListNodeAddress == pNode)
874  {
875  /*if the last node is at the same time the first one (1 single node after the init node 0)
876  then update the last node too */
877 
878  hmdma->FirstLinkedListNodeAddress = 0;
879  hmdma->LastLinkedListNodeAddress = 0;
880  hmdma->LinkedListNodeCounter = 0;
881 
882  hmdma->Instance->CLAR = 0;
883  }
884  else
885  {
886  if((uint32_t)hmdma->FirstLinkedListNodeAddress == hmdma->LastLinkedListNodeAddress->CLAR)
887  {
888  /* if last node is looping to first (circular list) one update the last node connection */
889  hmdma->LastLinkedListNodeAddress->CLAR = pNode->CLAR;
890  }
891 
892  /* if deleting the first node after the initialization
893  connect the next node to the node 0 by updating
894  the MDMA channel CLAR register to this node address */
895  hmdma->Instance->CLAR = pNode->CLAR;
897  /* Update the Handle node counter */
898  hmdma->LinkedListNodeCounter--;
899  }
900  }
901  else /* Deleting any other node */
902  {
903  /*Deleted node is not the first one : find it */
904  ptmpNode = hmdma->FirstLinkedListNodeAddress;
905  while((counter < hmdma->LinkedListNodeCounter) && (nodeDeleted == 0U))
906  {
907  counter++;
908  if(ptmpNode->CLAR == ((uint32_t)pNode))
909  {
910  /* if deleting the last node */
911  if(pNode == hmdma->LastLinkedListNodeAddress)
912  {
913  /*Update the linked list last node address in the handle*/
914  hmdma->LastLinkedListNodeAddress = ptmpNode;
915  }
916  /* update the next node link after deleting pMDMA_LinkedListNode */
917  ptmpNode->CLAR = pNode->CLAR;
918  nodeDeleted = 1;
919  /* Update the Handle node counter */
920  hmdma->LinkedListNodeCounter--;
921  }
922  else
923  {
924  ptmpNode = (MDMA_LinkNodeTypeDef *)ptmpNode->CLAR;
925  }
926  }
927 
928  if(nodeDeleted == 0U)
929  {
930  /* last node reashed without finding the node to delete : return error */
931  hal_status = HAL_ERROR;
932  }
933  }
934 
935  /* Process unlocked */
936  __HAL_UNLOCK(hmdma);
937 
938  hmdma->State = HAL_MDMA_STATE_READY;
939 
940  return hal_status;
941  }
942  else
943  {
944  /* Process unlocked */
945  __HAL_UNLOCK(hmdma);
946 
947  /* Return error status */
948  return HAL_BUSY;
949  }
950 }
951 
959 {
960  HAL_StatusTypeDef hal_status = HAL_OK;
961 
962  /* Check the MDMA peripheral handle */
963  if(hmdma == NULL)
964  {
965  return HAL_ERROR;
966  }
967 
968  /* Process locked */
969  __HAL_LOCK(hmdma);
970 
971  if(HAL_MDMA_STATE_READY == hmdma->State)
972  {
973  /* Change MDMA peripheral state */
974  hmdma->State = HAL_MDMA_STATE_BUSY;
975 
976  /* If first and last node are null (no nodes in the list) : return error*/
977  if(((uint32_t)hmdma->FirstLinkedListNodeAddress == 0U) || ((uint32_t)hmdma->LastLinkedListNodeAddress == 0U) || (hmdma->LinkedListNodeCounter == 0U))
978  {
979  hal_status = HAL_ERROR;
980  }
981  else
982  {
983  /* to enable circular mode Last Node should be connected to first node */
984  hmdma->LastLinkedListNodeAddress->CLAR = (uint32_t)hmdma->FirstLinkedListNodeAddress;
985  }
986 
987  }
988  /* Process unlocked */
989  __HAL_UNLOCK(hmdma);
990 
991  hmdma->State = HAL_MDMA_STATE_READY;
992 
993  return hal_status;
994 }
995 
1003 {
1004  HAL_StatusTypeDef hal_status = HAL_OK;
1005 
1006  /* Check the MDMA peripheral handle */
1007  if(hmdma == NULL)
1008  {
1009  return HAL_ERROR;
1010  }
1011 
1012  /* Process locked */
1013  __HAL_LOCK(hmdma);
1014 
1015  if(HAL_MDMA_STATE_READY == hmdma->State)
1016  {
1017  /* Change MDMA peripheral state */
1018  hmdma->State = HAL_MDMA_STATE_BUSY;
1019 
1020  /* If first and last node are null (no nodes in the list) : return error*/
1021  if(((uint32_t)hmdma->FirstLinkedListNodeAddress == 0U) || ((uint32_t)hmdma->LastLinkedListNodeAddress == 0U) || (hmdma->LinkedListNodeCounter == 0U))
1022  {
1023  hal_status = HAL_ERROR;
1024  }
1025  else
1026  {
1027  /* to disable circular mode Last Node should be connected to NULL */
1028  hmdma->LastLinkedListNodeAddress->CLAR = 0;
1029  }
1030 
1031  }
1032  /* Process unlocked */
1033  __HAL_UNLOCK(hmdma);
1034 
1035  hmdma->State = HAL_MDMA_STATE_READY;
1036 
1037  return hal_status;
1038 }
1039 
1073 HAL_StatusTypeDef HAL_MDMA_Start(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount)
1074 {
1075  /* Check the parameters */
1076  assert_param(IS_MDMA_TRANSFER_LENGTH(BlockDataLength));
1077  assert_param(IS_MDMA_BLOCK_COUNT(BlockCount));
1078 
1079  /* Check the MDMA peripheral handle */
1080  if(hmdma == NULL)
1081  {
1082  return HAL_ERROR;
1083  }
1084 
1085  /* Process locked */
1086  __HAL_LOCK(hmdma);
1087 
1088  if(HAL_MDMA_STATE_READY == hmdma->State)
1089  {
1090  /* Change MDMA peripheral state */
1091  hmdma->State = HAL_MDMA_STATE_BUSY;
1092 
1093  /* Initialize the error code */
1094  hmdma->ErrorCode = HAL_MDMA_ERROR_NONE;
1095 
1096  /* Disable the peripheral */
1097  __HAL_MDMA_DISABLE(hmdma);
1098 
1099  /* Configure the source, destination address and the data length */
1100  MDMA_SetConfig(hmdma, SrcAddress, DstAddress, BlockDataLength, BlockCount);
1101 
1102  /* Enable the Peripheral */
1103  __HAL_MDMA_ENABLE(hmdma);
1104 
1105  if(hmdma->Init.Request == MDMA_REQUEST_SW)
1106  {
1107  /* activate If SW request mode*/
1108  hmdma->Instance->CCR |= MDMA_CCR_SWRQ;
1109  }
1110  }
1111  else
1112  {
1113  /* Process unlocked */
1114  __HAL_UNLOCK(hmdma);
1115 
1116  /* Return error status */
1117  return HAL_BUSY;
1118  }
1119 
1120  return HAL_OK;
1121 }
1122 
1133 HAL_StatusTypeDef HAL_MDMA_Start_IT(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount)
1134 {
1135  /* Check the parameters */
1136  assert_param(IS_MDMA_TRANSFER_LENGTH(BlockDataLength));
1137  assert_param(IS_MDMA_BLOCK_COUNT(BlockCount));
1138 
1139  /* Check the MDMA peripheral handle */
1140  if(hmdma == NULL)
1141  {
1142  return HAL_ERROR;
1143  }
1144 
1145  /* Process locked */
1146  __HAL_LOCK(hmdma);
1147 
1148  if(HAL_MDMA_STATE_READY == hmdma->State)
1149  {
1150  /* Change MDMA peripheral state */
1151  hmdma->State = HAL_MDMA_STATE_BUSY;
1152 
1153  /* Initialize the error code */
1154  hmdma->ErrorCode = HAL_MDMA_ERROR_NONE;
1155 
1156  /* Disable the peripheral */
1157  __HAL_MDMA_DISABLE(hmdma);
1158 
1159  /* Configure the source, destination address and the data length */
1160  MDMA_SetConfig(hmdma, SrcAddress, DstAddress, BlockDataLength, BlockCount);
1161 
1162  /* Enable Common interrupts i.e Transfer Error IT and Channel Transfer Complete IT*/
1164 
1165  if(hmdma->XferBlockCpltCallback != NULL)
1166  {
1167  /* if Block transfer complete Callback is set enable the corresponding IT*/
1169  }
1170 
1171  if(hmdma->XferRepeatBlockCpltCallback != NULL)
1172  {
1173  /* if Repeated Block transfer complete Callback is set enable the corresponding IT*/
1175  }
1176 
1177  if(hmdma->XferBufferCpltCallback != NULL)
1178  {
1179  /* if buffer transfer complete Callback is set enable the corresponding IT*/
1181  }
1182 
1183  /* Enable the Peripheral */
1184  __HAL_MDMA_ENABLE(hmdma);
1185 
1186  if(hmdma->Init.Request == MDMA_REQUEST_SW)
1187  {
1188  /* activate If SW request mode*/
1189  hmdma->Instance->CCR |= MDMA_CCR_SWRQ;
1190  }
1191  }
1192  else
1193  {
1194  /* Process unlocked */
1195  __HAL_UNLOCK(hmdma);
1196 
1197  /* Return error status */
1198  return HAL_BUSY;
1199  }
1200 
1201  return HAL_OK;
1202 }
1203 
1217 {
1218  uint32_t tickstart = HAL_GetTick();
1219 
1220  /* Check the MDMA peripheral handle */
1221  if(hmdma == NULL)
1222  {
1223  return HAL_ERROR;
1224  }
1225 
1226  if(HAL_MDMA_STATE_BUSY != hmdma->State)
1227  {
1229 
1230  /* Process Unlocked */
1231  __HAL_UNLOCK(hmdma);
1232 
1233  return HAL_ERROR;
1234  }
1235  else
1236  {
1237  /* Disable all the transfer interrupts */
1239 
1240  /* Disable the channel */
1241  __HAL_MDMA_DISABLE(hmdma);
1242 
1243  /* Check if the MDMA Channel is effectively disabled */
1244  while((hmdma->Instance->CCR & MDMA_CCR_EN) != 0U)
1245  {
1246  /* Check for the Timeout */
1247  if( (HAL_GetTick() - tickstart ) > HAL_TIMEOUT_MDMA_ABORT)
1248  {
1249  /* Update error code */
1251 
1252  /* Process Unlocked */
1253  __HAL_UNLOCK(hmdma);
1254 
1255  /* Change the MDMA state */
1256  hmdma->State = HAL_MDMA_STATE_ERROR;
1257 
1258  return HAL_ERROR;
1259  }
1260  }
1261 
1262  /* Clear all interrupt flags */
1264 
1265  /* Process Unlocked */
1266  __HAL_UNLOCK(hmdma);
1267 
1268  /* Change the MDMA state*/
1269  hmdma->State = HAL_MDMA_STATE_READY;
1270  }
1271 
1272  return HAL_OK;
1273 }
1274 
1282 {
1283  /* Check the MDMA peripheral handle */
1284  if(hmdma == NULL)
1285  {
1286  return HAL_ERROR;
1287  }
1288 
1289  if(HAL_MDMA_STATE_BUSY != hmdma->State)
1290  {
1291  /* No transfer ongoing */
1293 
1294  return HAL_ERROR;
1295  }
1296  else
1297  {
1298  /* Set Abort State */
1299  hmdma->State = HAL_MDMA_STATE_ABORT;
1300 
1301  /* Disable the stream */
1302  __HAL_MDMA_DISABLE(hmdma);
1303  }
1304 
1305  return HAL_OK;
1306 }
1307 
1317 {
1318  uint32_t levelFlag, errorFlag;
1319  uint32_t tickstart;
1320 
1321  /* Check the parameters */
1322  assert_param(IS_MDMA_LEVEL_COMPLETE(CompleteLevel));
1323 
1324  /* Check the MDMA peripheral handle */
1325  if(hmdma == NULL)
1326  {
1327  return HAL_ERROR;
1328  }
1329 
1330  if(HAL_MDMA_STATE_BUSY != hmdma->State)
1331  {
1332  /* No transfer ongoing */
1334 
1335  return HAL_ERROR;
1336  }
1337 
1338  /* Get the level transfer complete flag */
1339  levelFlag = ((CompleteLevel == HAL_MDMA_FULL_TRANSFER) ? MDMA_FLAG_CTC : \
1340  (CompleteLevel == HAL_MDMA_BUFFER_TRANSFER)? MDMA_FLAG_BFTC : \
1341  (CompleteLevel == HAL_MDMA_BLOCK_TRANSFER) ? MDMA_FLAG_BT : \
1342  MDMA_FLAG_BRT);
1343 
1344 
1345  /* Get timeout */
1346  tickstart = HAL_GetTick();
1347 
1348  while(__HAL_MDMA_GET_FLAG(hmdma, levelFlag) == 0U)
1349  {
1350  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_TE) != 0U))
1351  {
1352  /* Get the transfer error source flag */
1353  errorFlag = hmdma->Instance->CESR;
1354 
1355  if((errorFlag & MDMA_CESR_TED) == 0U)
1356  {
1357  /* Update error code : Read Transfer error */
1359  }
1360  else
1361  {
1362  /* Update error code : Write Transfer error */
1364  }
1365 
1366  if((errorFlag & MDMA_CESR_TEMD) != 0U)
1367  {
1368  /* Update error code : Error Mask Data */
1370  }
1371 
1372  if((errorFlag & MDMA_CESR_TELD) != 0U)
1373  {
1374  /* Update error code : Error Linked list */
1376  }
1377 
1378  if((errorFlag & MDMA_CESR_ASE) != 0U)
1379  {
1380  /* Update error code : Address/Size alignment error */
1382  }
1383 
1384  if((errorFlag & MDMA_CESR_BSE) != 0U)
1385  {
1386  /* Update error code : Block Size error */
1388  }
1389 
1390  (void) HAL_MDMA_Abort(hmdma); /* if error then abort the current transfer */
1391 
1392  /*
1393  Note that the Abort function will
1394  - Clear all transfer flags
1395  - Unlock
1396  - Set the State
1397  */
1398 
1399  return HAL_ERROR;
1400 
1401  }
1402 
1403  /* Check for the Timeout */
1404  if(Timeout != HAL_MAX_DELAY)
1405  {
1406  if(((HAL_GetTick() - tickstart ) > Timeout) || (Timeout == 0U))
1407  {
1408  /* Update error code */
1410 
1411  (void) HAL_MDMA_Abort(hmdma); /* if timeout then abort the current transfer */
1412 
1413  /*
1414  Note that the Abort function will
1415  - Clear all transfer flags
1416  - Unlock
1417  - Set the State
1418  */
1419 
1420  return HAL_ERROR;
1421  }
1422  }
1423  }
1424 
1425  /* Clear the transfer level flag */
1426  if(CompleteLevel == HAL_MDMA_BUFFER_TRANSFER)
1427  {
1429 
1430  }
1431  else if(CompleteLevel == HAL_MDMA_BLOCK_TRANSFER)
1432  {
1434 
1435  }
1436  else if(CompleteLevel == HAL_MDMA_REPEAT_BLOCK_TRANSFER)
1437  {
1439  }
1440  else if(CompleteLevel == HAL_MDMA_FULL_TRANSFER)
1441  {
1443 
1444  /* Process unlocked */
1445  __HAL_UNLOCK(hmdma);
1446 
1447  hmdma->State = HAL_MDMA_STATE_READY;
1448  }
1449  else
1450  {
1451  return HAL_ERROR;
1452  }
1453 
1454  return HAL_OK;
1455 }
1456 
1464 {
1465  uint32_t request_mode;
1466 
1467  /* Check the MDMA peripheral handle */
1468  if(hmdma == NULL)
1469  {
1470  return HAL_ERROR;
1471  }
1472 
1473  /* Get the softawre request mode */
1474  request_mode = hmdma->Instance->CTCR & MDMA_CTCR_SWRM;
1475 
1476  if((hmdma->Instance->CCR & MDMA_CCR_EN) == 0U)
1477  {
1478  /* if no Transfer on going (MDMA enable bit not set) return error */
1480 
1481  return HAL_ERROR;
1482  }
1483  else if(((hmdma->Instance->CISR & MDMA_CISR_CRQA) != 0U) || (request_mode == 0U))
1484  {
1485  /* if an MDMA ongoing request has not yet end or if request mode is not SW request return error */
1486  hmdma->ErrorCode = HAL_MDMA_ERROR_BUSY;
1487 
1488  return HAL_ERROR;
1489  }
1490  else
1491  {
1492  /* Set the SW request bit to activate the request on the Channel */
1493  hmdma->Instance->CCR |= MDMA_CCR_SWRQ;
1494 
1495  return HAL_OK;
1496  }
1497 }
1498 
1506 {
1507  __IO uint32_t count = 0;
1508  uint32_t timeout = SystemCoreClock / 9600U;
1509 
1510  uint32_t generalIntFlag, errorFlag;
1511 
1512  /* General Interrupt Flag management ****************************************/
1513  generalIntFlag = 1UL << ((((uint32_t)hmdma->Instance - (uint32_t)(MDMA_Channel0))/HAL_MDMA_CHANNEL_SIZE) & 0x1FU);
1514  if((MDMA->GISR0 & generalIntFlag) == 0U)
1515  {
1516  return; /* the General interrupt flag for the current channel is down , nothing to do */
1517  }
1518 
1519  /* Transfer Error Interrupt management ***************************************/
1520  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_TE) != 0U))
1521  {
1522  if(__HAL_MDMA_GET_IT_SOURCE(hmdma, MDMA_IT_TE) != 0U)
1523  {
1524  /* Disable the transfer error interrupt */
1526 
1527  /* Get the transfer error source flag */
1528  errorFlag = hmdma->Instance->CESR;
1529 
1530  if((errorFlag & MDMA_CESR_TED) == 0U)
1531  {
1532  /* Update error code : Read Transfer error */
1534  }
1535  else
1536  {
1537  /* Update error code : Write Transfer error */
1539  }
1540 
1541  if((errorFlag & MDMA_CESR_TEMD) != 0U)
1542  {
1543  /* Update error code : Error Mask Data */
1545  }
1546 
1547  if((errorFlag & MDMA_CESR_TELD) != 0U)
1548  {
1549  /* Update error code : Error Linked list */
1551  }
1552 
1553  if((errorFlag & MDMA_CESR_ASE) != 0U)
1554  {
1555  /* Update error code : Address/Size alignment error */
1557  }
1558 
1559  if((errorFlag & MDMA_CESR_BSE) != 0U)
1560  {
1561  /* Update error code : Block Size error error */
1563  }
1564 
1565  /* Clear the transfer error flags */
1567  }
1568  }
1569 
1570  /* Buffer Transfer Complete Interrupt management ******************************/
1571  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_BFTC) != 0U))
1572  {
1573  if(__HAL_MDMA_GET_IT_SOURCE(hmdma, MDMA_IT_BFTC) != 0U)
1574  {
1575  /* Clear the buffer transfer complete flag */
1577 
1578  if(hmdma->XferBufferCpltCallback != NULL)
1579  {
1580  /* Buffer transfer callback */
1581  hmdma->XferBufferCpltCallback(hmdma);
1582  }
1583  }
1584  }
1585 
1586  /* Block Transfer Complete Interrupt management ******************************/
1587  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_BT) != 0U))
1588  {
1589  if(__HAL_MDMA_GET_IT_SOURCE(hmdma, MDMA_IT_BT) != 0U)
1590  {
1591  /* Clear the block transfer complete flag */
1593 
1594  if(hmdma->XferBlockCpltCallback != NULL)
1595  {
1596  /* Block transfer callback */
1597  hmdma->XferBlockCpltCallback(hmdma);
1598  }
1599  }
1600  }
1601 
1602  /* Repeated Block Transfer Complete Interrupt management ******************************/
1603  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_BRT) != 0U))
1604  {
1605  if(__HAL_MDMA_GET_IT_SOURCE(hmdma, MDMA_IT_BRT) != 0U)
1606  {
1607  /* Clear the repeat block transfer complete flag */
1609 
1610  if(hmdma->XferRepeatBlockCpltCallback != NULL)
1611  {
1612  /* Repeated Block transfer callback */
1613  hmdma->XferRepeatBlockCpltCallback(hmdma);
1614  }
1615  }
1616  }
1617 
1618  /* Channel Transfer Complete Interrupt management ***********************************/
1619  if((__HAL_MDMA_GET_FLAG(hmdma, MDMA_FLAG_CTC) != 0U))
1620  {
1621  if(__HAL_MDMA_GET_IT_SOURCE(hmdma, MDMA_IT_CTC) != 0U)
1622  {
1623  /* Disable all the transfer interrupts */
1625 
1626  if(HAL_MDMA_STATE_ABORT == hmdma->State)
1627  {
1628  /* Process Unlocked */
1629  __HAL_UNLOCK(hmdma);
1630 
1631  /* Change the DMA state */
1632  hmdma->State = HAL_MDMA_STATE_READY;
1633 
1634  if(hmdma->XferAbortCallback != NULL)
1635  {
1636  hmdma->XferAbortCallback(hmdma);
1637  }
1638  return;
1639  }
1640 
1641  /* Clear the Channel Transfer Complete flag */
1643 
1644  /* Process Unlocked */
1645  __HAL_UNLOCK(hmdma);
1646 
1647  /* Change MDMA peripheral state */
1648  hmdma->State = HAL_MDMA_STATE_READY;
1649 
1650  if(hmdma->XferCpltCallback != NULL)
1651  {
1652  /* Channel Transfer Complete callback */
1653  hmdma->XferCpltCallback(hmdma);
1654  }
1655  }
1656  }
1657 
1658  /* manage error case */
1659  if(hmdma->ErrorCode != HAL_MDMA_ERROR_NONE)
1660  {
1661  hmdma->State = HAL_MDMA_STATE_ABORT;
1662 
1663  /* Disable the channel */
1664  __HAL_MDMA_DISABLE(hmdma);
1665 
1666  do
1667  {
1668  if (++count > timeout)
1669  {
1670  break;
1671  }
1672  }
1673  while((hmdma->Instance->CCR & MDMA_CCR_EN) != 0U);
1674 
1675  /* Process Unlocked */
1676  __HAL_UNLOCK(hmdma);
1677 
1678  if((hmdma->Instance->CCR & MDMA_CCR_EN) != 0U)
1679  {
1680  /* Change the MDMA state to error if MDMA disable fails */
1681  hmdma->State = HAL_MDMA_STATE_ERROR;
1682  }
1683  else
1684  {
1685  /* Change the MDMA state to Ready if MDMA disable success */
1686  hmdma->State = HAL_MDMA_STATE_READY;
1687  }
1688 
1689 
1690  if (hmdma->XferErrorCallback != NULL)
1691  {
1692  /* Transfer error callback */
1693  hmdma->XferErrorCallback(hmdma);
1694  }
1695  }
1696 }
1697 
1724 {
1725  return hmdma->State;
1726 }
1727 
1734 uint32_t HAL_MDMA_GetError(MDMA_HandleTypeDef *hmdma)
1735 {
1736  return hmdma->ErrorCode;
1737 }
1738 
1761 static void MDMA_SetConfig(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount)
1762 {
1763  uint32_t addressMask;
1764 
1765  /* Configure the MDMA Channel data length */
1766  MODIFY_REG(hmdma->Instance->CBNDTR ,MDMA_CBNDTR_BNDT, (BlockDataLength & MDMA_CBNDTR_BNDT));
1767 
1768  /* Configure the MDMA block repeat count */
1769  MODIFY_REG(hmdma->Instance->CBNDTR , MDMA_CBNDTR_BRC , ((BlockCount - 1U) << MDMA_CBNDTR_BRC_Pos) & MDMA_CBNDTR_BRC);
1770 
1771  /* Clear all interrupt flags */
1773 
1774  /* Configure MDMA Channel destination address */
1775  hmdma->Instance->CDAR = DstAddress;
1776 
1777  /* Configure MDMA Channel Source address */
1778  hmdma->Instance->CSAR = SrcAddress;
1779 
1780  addressMask = SrcAddress & 0xFF000000U;
1781  if((addressMask == 0x20000000U) || (addressMask == 0x00000000U))
1782  {
1783  /*The AHBSbus is used as source (read operation) on channel x */
1784  hmdma->Instance->CTBR |= MDMA_CTBR_SBUS;
1785  }
1786  else
1787  {
1788  /*The AXI bus is used as source (read operation) on channel x */
1789  hmdma->Instance->CTBR &= (~MDMA_CTBR_SBUS);
1790  }
1791 
1792  addressMask = DstAddress & 0xFF000000U;
1793  if((addressMask == 0x20000000U) || (addressMask == 0x00000000U))
1794  {
1795  /*The AHB bus is used as destination (write operation) on channel x */
1796  hmdma->Instance->CTBR |= MDMA_CTBR_DBUS;
1797  }
1798  else
1799  {
1800  /*The AXI bus is used as destination (write operation) on channel x */
1801  hmdma->Instance->CTBR &= (~MDMA_CTBR_DBUS);
1802  }
1803 
1804  /* Set the linked list register to the first node of the list */
1805  hmdma->Instance->CLAR = (uint32_t)hmdma->FirstLinkedListNodeAddress;
1806 }
1807 
1815 static void MDMA_Init(MDMA_HandleTypeDef *hmdma)
1816 {
1817  uint32_t blockoffset;
1818 
1819  /* Prepare the MDMA Channel configuration */
1820  hmdma->Instance->CCR = hmdma->Init.Priority | hmdma->Init.Endianness;
1821 
1822  /* Write new CTCR Register value */
1823  hmdma->Instance->CTCR = hmdma->Init.SourceInc | hmdma->Init.DestinationInc | \
1824  hmdma->Init.SourceDataSize | hmdma->Init.DestDataSize | \
1825  hmdma->Init.DataAlignment | hmdma->Init.SourceBurst | \
1826  hmdma->Init.DestBurst | \
1827  ((hmdma->Init.BufferTransferLength - 1U) << MDMA_CTCR_TLEN_Pos) | \
1828  hmdma->Init.TransferTriggerMode;
1829 
1830  /* If SW request set the CTCR register to SW Request Mode */
1831  if(hmdma->Init.Request == MDMA_REQUEST_SW)
1832  {
1833  /*
1834  -If the request is done by SW : BWM could be set to 1 or 0.
1835  -If the request is done by a peripheral :
1836  If mask address not set (0) => BWM must be set to 0
1837  If mask address set (different than 0) => BWM could be set to 1 or 0
1838  */
1839  hmdma->Instance->CTCR |= (MDMA_CTCR_SWRM | MDMA_CTCR_BWM);
1840  }
1841 
1842  /* Reset CBNDTR Register */
1843  hmdma->Instance->CBNDTR = 0;
1844 
1845  /* if block source address offset is negative set the Block Repeat Source address Update Mode to decrement */
1846  if(hmdma->Init.SourceBlockAddressOffset < 0)
1847  {
1848  hmdma->Instance->CBNDTR |= MDMA_CBNDTR_BRSUM;
1849  /* Write new CBRUR Register value : source repeat block offset */
1850  blockoffset = (uint32_t)(- hmdma->Init.SourceBlockAddressOffset);
1851  hmdma->Instance->CBRUR = (blockoffset & 0x0000FFFFU);
1852  }
1853  else
1854  {
1855  /* Write new CBRUR Register value : source repeat block offset */
1856  hmdma->Instance->CBRUR = (((uint32_t)hmdma->Init.SourceBlockAddressOffset) & 0x0000FFFFU);
1857  }
1858 
1859  /* If block destination address offset is negative set the Block Repeat destination address Update Mode to decrement */
1860  if(hmdma->Init.DestBlockAddressOffset < 0)
1861  {
1862  hmdma->Instance->CBNDTR |= MDMA_CBNDTR_BRDUM;
1863  /* Write new CBRUR Register value : destination repeat block offset */
1864  blockoffset = (uint32_t)(- hmdma->Init.DestBlockAddressOffset);
1865  hmdma->Instance->CBRUR |= ((blockoffset & 0x0000FFFFU) << MDMA_CBRUR_DUV_Pos);
1866  }
1867  else
1868  {
1869  /*write new CBRUR Register value : destination repeat block offset */
1870  hmdma->Instance->CBRUR |= ((((uint32_t)hmdma->Init.DestBlockAddressOffset) & 0x0000FFFFU) << MDMA_CBRUR_DUV_Pos);
1871  }
1872 
1873  /* if HW request set the HW request and the requet CleraMask and ClearData MaskData, */
1874  if(hmdma->Init.Request != MDMA_REQUEST_SW)
1875  {
1876  /* Set the HW request in CTRB register */
1877  hmdma->Instance->CTBR = hmdma->Init.Request & MDMA_CTBR_TSEL;
1878  }
1879  else /* SW request : reset the CTBR register */
1880  {
1881  hmdma->Instance->CTBR = 0;
1882  }
1883 
1884  /* Write Link Address Register */
1885  hmdma->Instance->CLAR = 0;
1886 }
1887 
1892 #endif /* HAL_MDMA_MODULE_ENABLED */
1893 
1901 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
__MDMA_HandleTypeDef::LinkedListNodeCounter
uint32_t LinkedListNodeCounter
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:238
assert_param
#define assert_param(expr)
Include module's header file.
Definition: stm32f407/stm32f407g-disc1/Inc/stm32f4xx_hal_conf.h:353
MDMA_CISR_BRTIF
#define MDMA_CISR_BRTIF
Definition: stm32h735xx.h:13920
HAL_MDMA_LinkedList_CreateNode
HAL_StatusTypeDef HAL_MDMA_LinkedList_CreateNode(MDMA_LinkNodeTypeDef *pNode, MDMA_LinkNodeConfTypeDef *pNodeConfig)
MDMA_CTCR_BWM
#define MDMA_CTCR_BWM
Definition: stm32h735xx.h:14069
HAL_MDMA_REPEAT_BLOCK_TRANSFER
@ HAL_MDMA_REPEAT_BLOCK_TRANSFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:180
MDMA_IT_BT
#define MDMA_IT_BT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:496
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
__MDMA_HandleTypeDef::XferAbortCallback
void(* XferAbortCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:225
MDMA_LinkNodeConfTypeDef::DstAddress
uint32_t DstAddress
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:145
HAL_MDMA_IRQHandler
void HAL_MDMA_IRQHandler(MDMA_HandleTypeDef *hmdma)
__HAL_MDMA_ENABLE
#define __HAL_MDMA_ENABLE(__HANDLE__)
Enable the specified MDMA Channel.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:533
__MDMA_HandleTypeDef::XferCpltCallback
void(* XferCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:215
__HAL_MDMA_ENABLE_IT
#define __HAL_MDMA_ENABLE_IT(__HANDLE__, __INTERRUPT__)
Enables the specified MDMA Channel interrupts.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:583
HAL_MDMA_ERROR_BUSY
#define HAL_MDMA_ERROR_BUSY
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:268
MDMA_InitTypeDef::SourceBurst
uint32_t SourceBurst
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:84
MDMA_LinkNodeTypeDef::CBNDTR
__IO uint32_t CBNDTR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:125
HAL_MDMA_XFER_REPBLOCKCPLT_CB_ID
@ HAL_MDMA_XFER_REPBLOCKCPLT_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:192
MDMA_LinkNodeConfTypeDef
HAL MDMA linked list node configuration structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:141
__HAL_MDMA_DISABLE_IT
#define __HAL_MDMA_DISABLE_IT(__HANDLE__, __INTERRUPT__)
Disables the specified MDMA Channel interrupts.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:597
MDMA_CTCR_TLEN_Pos
#define MDMA_CTCR_TLEN_Pos
Definition: stm32h735xx.h:14048
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
MDMA_LinkNodeTypeDef::CMAR
__IO uint32_t CMAR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:132
MDMA_Channel_TypeDef::CMDR
__IO uint32_t CMDR
Definition: stm32h735xx.h:683
MDMA_CBNDTR_BRDUM
#define MDMA_CBNDTR_BRDUM
Definition: stm32h735xx.h:14080
HAL_MDMA_STATE_RESET
@ HAL_MDMA_STATE_RESET
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:164
IS_MDMA_DESTINATION_INC
#define IS_MDMA_DESTINATION_INC(__INC__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:776
IS_MDMA_STREAM_ALL_INSTANCE
#define IS_MDMA_STREAM_ALL_INSTANCE(INSTANCE)
Definition: stm32h735xx.h:23944
MDMA_Channel_TypeDef::CCR
__IO uint32_t CCR
Definition: stm32h735xx.h:673
MDMA_Channel_TypeDef::CESR
__IO uint32_t CESR
Definition: stm32h735xx.h:672
MDMA_LinkNodeTypeDef
HAL MDMA linked list node structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:122
MDMA_CBNDTR_BRC
#define MDMA_CBNDTR_BRC
Definition: stm32h735xx.h:14083
MDMA_LinkNodeTypeDef::CTBR
__IO uint32_t CTBR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:130
IS_MDMA_SOURCE_INC
#define IS_MDMA_SOURCE_INC(__INC__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:766
HAL_MDMA_DeInit
HAL_StatusTypeDef HAL_MDMA_DeInit(MDMA_HandleTypeDef *hmdma)
MDMA_InitTypeDef::Request
uint32_t Request
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:52
__HAL_MDMA_GET_FLAG
#define __HAL_MDMA_GET_FLAG(__HANDLE__, __FLAG__)
Get the MDMA Channel pending flags.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:555
HAL_MDMA_XFER_ERROR_CB_ID
@ HAL_MDMA_XFER_ERROR_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:193
MDMA_CESR_TED
#define MDMA_CESR_TED
Definition: stm32h735xx.h:13954
HAL_MDMA_GenerateSWRequest
HAL_StatusTypeDef HAL_MDMA_GenerateSWRequest(MDMA_HandleTypeDef *hmdma)
HAL_MDMA_LinkedList_EnableCircularMode
HAL_StatusTypeDef HAL_MDMA_LinkedList_EnableCircularMode(MDMA_HandleTypeDef *hmdma)
MDMA_CISR_CRQA
#define MDMA_CISR_CRQA
Definition: stm32h735xx.h:13929
HAL_ERROR
@ HAL_ERROR
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:43
IS_MDMA_BLOCK_COUNT
#define IS_MDMA_BLOCK_COUNT(__COUNT__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:828
HAL_GetTick
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:323
HAL_MDMA_XFER_CPLT_CB_ID
@ HAL_MDMA_XFER_CPLT_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:189
HAL_MDMA_LinkedList_AddNode
HAL_StatusTypeDef HAL_MDMA_LinkedList_AddNode(MDMA_HandleTypeDef *hmdma, MDMA_LinkNodeTypeDef *pNewNode, MDMA_LinkNodeTypeDef *pPrevNode)
MDMA_CBNDTR_BRSUM
#define MDMA_CBNDTR_BRSUM
Definition: stm32h735xx.h:14077
MDMA_Channel0
#define MDMA_Channel0
Definition: stm32h735xx.h:2805
MDMA_LinkNodeConfTypeDef::Init
MDMA_InitTypeDef Init
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:143
MDMA_CESR_BSE
#define MDMA_CESR_BSE
Definition: stm32h735xx.h:13966
IS_MDMA_DATA_ALIGNMENT
#define IS_MDMA_DATA_ALIGNMENT(__ALIGNMENT__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:796
HAL_MDMA_GetError
uint32_t HAL_MDMA_GetError(MDMA_HandleTypeDef *hmdma)
MDMA_LinkNodeTypeDef::CMDR
__IO uint32_t CMDR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:133
HAL_MDMA_BUFFER_TRANSFER
@ HAL_MDMA_BUFFER_TRANSFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:178
HAL_MDMA_STATE_ERROR
@ HAL_MDMA_STATE_ERROR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:167
MDMA_FLAG_TE
#define MDMA_FLAG_TE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:507
MDMA_LinkNodeConfTypeDef::BlockDataLength
uint32_t BlockDataLength
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:146
HAL_MDMA_XFER_ALL_CB_ID
@ HAL_MDMA_XFER_ALL_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:195
__MDMA_HandleTypeDef::XferBufferCpltCallback
void(* XferBufferCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:217
MDMA_LinkNodeConfTypeDef::PostRequestMaskData
uint32_t PostRequestMaskData
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:152
HAL_MDMA_ERROR_WRITE_XFER
#define HAL_MDMA_ERROR_WRITE_XFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:261
MDMA_CESR_TEMD
#define MDMA_CESR_TEMD
Definition: stm32h735xx.h:13960
HAL_OK
@ HAL_OK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:42
MDMA_CTCR_SWRM
#define MDMA_CTCR_SWRM
Definition: stm32h735xx.h:14066
IS_MDMA_PRIORITY
#define IS_MDMA_PRIORITY(__PRIORITY__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:749
HAL_MDMA_CallbackIDTypeDef
HAL_MDMA_CallbackIDTypeDef
HAL MDMA Callbacks IDs structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:187
MDMA_FLAG_BT
#define MDMA_FLAG_BT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:510
IS_MDMA_BLOCK_ADDR_OFFSET
#define IS_MDMA_BLOCK_ADDR_OFFSET(__BLOCK_ADD_OFFSET__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:832
MDMA_Channel_TypeDef::CLAR
__IO uint32_t CLAR
Definition: stm32h735xx.h:679
MDMA_InitTypeDef::DestinationInc
uint32_t DestinationInc
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:68
MDMA_Channel_TypeDef::CMAR
__IO uint32_t CMAR
Definition: stm32h735xx.h:682
HAL_MDMA_ERROR_BLOCK_SIZE
#define HAL_MDMA_ERROR_BLOCK_SIZE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:265
HAL_MDMA_XFER_ABORT_CB_ID
@ HAL_MDMA_XFER_ABORT_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:194
IS_MDMA_TRANSFER_TRIGGER_MODE
#define IS_MDMA_TRANSFER_TRIGGER_MODE(__MODE__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:821
__MDMA_HandleTypeDef::FirstLinkedListNodeAddress
MDMA_LinkNodeTypeDef * FirstLinkedListNodeAddress
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:228
MDMA_LinkNodeConfTypeDef::SrcAddress
uint32_t SrcAddress
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:144
HAL_MDMA_ERROR_READ_XFER
#define HAL_MDMA_ERROR_READ_XFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:260
IS_MDMA_SOURCE_DATASIZE
#define IS_MDMA_SOURCE_DATASIZE(__SIZE__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:786
IS_MDMA_ENDIANNESS_MODE
#define IS_MDMA_ENDIANNESS_MODE(__ENDIANNESS__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:754
HAL_MDMA_Abort_IT
HAL_StatusTypeDef HAL_MDMA_Abort_IT(MDMA_HandleTypeDef *hmdma)
HAL_MDMA_LevelCompleteTypeDef
HAL_MDMA_LevelCompleteTypeDef
HAL MDMA Level Complete structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:175
HAL_MDMA_StateTypeDef
HAL_MDMA_StateTypeDef
HAL MDMA State structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:162
MDMA_Channel_TypeDef::CBRUR
__IO uint32_t CBRUR
Definition: stm32h735xx.h:678
__MDMA_HandleTypeDef::Init
MDMA_InitTypeDef Init
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:207
__HAL_LOCK
#define __HAL_LOCK(__HANDLE__)
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:93
MDMA_CISR_TCIF
#define MDMA_CISR_TCIF
Definition: stm32h735xx.h:13926
HAL_MDMA_Start
HAL_StatusTypeDef HAL_MDMA_Start(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount)
SystemCoreClock
uint32_t SystemCoreClock
Definition: system_MIMXRT1052.c:69
HAL_MDMA_ERROR_ALIGNMENT
#define HAL_MDMA_ERROR_ALIGNMENT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:264
MODIFY_REG
#define MODIFY_REG(REG, CLEARMASK, SETMASK)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:224
MDMA_IT_TE
#define MDMA_IT_TE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:493
MDMA_Channel_TypeDef::CDAR
__IO uint32_t CDAR
Definition: stm32h735xx.h:677
HAL_MDMA_ERROR_LINKED_LIST
#define HAL_MDMA_ERROR_LINKED_LIST
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:263
MDMA_InitTypeDef::SourceDataSize
uint32_t SourceDataSize
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:71
MDMA_InitTypeDef::SourceBlockAddressOffset
int32_t SourceBlockAddressOffset
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:100
MDMA_CISR_BTIF
#define MDMA_CISR_BTIF
Definition: stm32h735xx.h:13923
count
size_t count
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/tests/test_common/ma_test_common.c:31
IS_MDMA_BUFFER_TRANSFER_LENGTH
#define IS_MDMA_BUFFER_TRANSFER_LENGTH(__LENGTH__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:826
HAL_MDMA_UnRegisterCallback
HAL_StatusTypeDef HAL_MDMA_UnRegisterCallback(MDMA_HandleTypeDef *hmdma, HAL_MDMA_CallbackIDTypeDef CallbackID)
HAL_BUSY
@ HAL_BUSY
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:44
HAL_MDMA_XFER_BLOCKCPLT_CB_ID
@ HAL_MDMA_XFER_BLOCKCPLT_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:191
MDMA_Channel_TypeDef::CBNDTR
__IO uint32_t CBNDTR
Definition: stm32h735xx.h:675
MDMA_Channel_TypeDef::CTBR
__IO uint32_t CTBR
Definition: stm32h735xx.h:680
MDMA_CTBR_DBUS
#define MDMA_CTBR_DBUS
Definition: stm32h735xx.h:14117
HAL_MDMA_Abort
HAL_StatusTypeDef HAL_MDMA_Abort(MDMA_HandleTypeDef *hmdma)
MDMA_LinkNodeTypeDef::CBRUR
__IO uint32_t CBRUR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:128
MDMA_CESR_ASE
#define MDMA_CESR_ASE
Definition: stm32h735xx.h:13963
HAL_MDMA_GetState
HAL_MDMA_StateTypeDef HAL_MDMA_GetState(MDMA_HandleTypeDef *hmdma)
MDMA_CTBR_TSEL
#define MDMA_CTBR_TSEL
Definition: stm32h735xx.h:14111
__HAL_UNLOCK
#define __HAL_UNLOCK(__HANDLE__)
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:105
__MDMA_HandleTypeDef
MDMA handle Structure definition.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:203
MDMA_FLAG_BFTC
#define MDMA_FLAG_BFTC
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:511
HAL_MAX_DELAY
#define HAL_MAX_DELAY
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:61
MDMA_IT_BFTC
#define MDMA_IT_BFTC
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:497
HAL_MDMA_Init
HAL_StatusTypeDef HAL_MDMA_Init(MDMA_HandleTypeDef *hmdma)
__MDMA_HandleTypeDef::LastLinkedListNodeAddress
MDMA_LinkNodeTypeDef * LastLinkedListNodeAddress
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:234
__MDMA_HandleTypeDef::XferRepeatBlockCpltCallback
void(* XferRepeatBlockCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:221
HAL_MDMA_LinkedList_DisableCircularMode
HAL_StatusTypeDef HAL_MDMA_LinkedList_DisableCircularMode(MDMA_HandleTypeDef *hmdma)
MDMA_Channel_TypeDef::CSAR
__IO uint32_t CSAR
Definition: stm32h735xx.h:676
HAL_MDMA_FULL_TRANSFER
@ HAL_MDMA_FULL_TRANSFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:177
IS_MDMA_DESTINATION_DATASIZE
#define IS_MDMA_DESTINATION_DATASIZE(__SIZE__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:791
MDMA_InitTypeDef::TransferTriggerMode
uint32_t TransferTriggerMode
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:55
__MDMA_HandleTypeDef::XferErrorCallback
void(* XferErrorCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:223
HAL_MDMA_STATE_READY
@ HAL_MDMA_STATE_READY
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:165
HAL_MDMA_ERROR_TIMEOUT
#define HAL_MDMA_ERROR_TIMEOUT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:266
MDMA_InitTypeDef::DestDataSize
uint32_t DestDataSize
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:74
MDMA_CCR_EN
#define MDMA_CCR_EN
Definition: stm32h735xx.h:13971
MDMA_Channel_TypeDef::CISR
__IO uint32_t CISR
Definition: stm32h735xx.h:670
HAL_MDMA_LinkedList_RemoveNode
HAL_StatusTypeDef HAL_MDMA_LinkedList_RemoveNode(MDMA_HandleTypeDef *hmdma, MDMA_LinkNodeTypeDef *pNode)
__HAL_MDMA_CLEAR_FLAG
#define __HAL_MDMA_CLEAR_FLAG(__HANDLE__, __FLAG__)
Clear the MDMA Stream pending flags.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:569
HAL_MDMA_STATE_BUSY
@ HAL_MDMA_STATE_BUSY
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:166
MDMA_IT_CTC
#define MDMA_IT_CTC
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:494
HAL_MDMA_PollForTransfer
HAL_StatusTypeDef HAL_MDMA_PollForTransfer(MDMA_HandleTypeDef *hmdma, HAL_MDMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout)
HAL_MDMA_STATE_ABORT
@ HAL_MDMA_STATE_ABORT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:168
__HAL_MDMA_GET_IT_SOURCE
#define __HAL_MDMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
Checks whether the specified MDMA Channel interrupt is enabled or not.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:610
MDMA_InitTypeDef::SourceInc
uint32_t SourceInc
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:65
IS_MDMA_TRANSFER_LENGTH
#define IS_MDMA_TRANSFER_LENGTH(SIZE)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:830
MDMA_CCR_SWRQ
#define MDMA_CCR_SWRQ
Definition: stm32h735xx.h:14003
MDMA_LinkNodeConfTypeDef::PostRequestMaskAddress
uint32_t PostRequestMaskAddress
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:149
__MDMA_HandleTypeDef::Instance
MDMA_Channel_TypeDef * Instance
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:205
MDMA_InitTypeDef::DataAlignment
uint32_t DataAlignment
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:78
MDMA_InitTypeDef::DestBlockAddressOffset
int32_t DestBlockAddressOffset
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:107
MDMA_CBNDTR_BRC_Pos
#define MDMA_CBNDTR_BRC_Pos
Definition: stm32h735xx.h:14081
__MDMA_HandleTypeDef::ErrorCode
__IO uint32_t ErrorCode
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:240
MDMA_LinkNodeTypeDef::CSAR
__IO uint32_t CSAR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:126
HAL_MDMA_BLOCK_TRANSFER
@ HAL_MDMA_BLOCK_TRANSFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:179
HAL_MDMA_ERROR_MASK_DATA
#define HAL_MDMA_ERROR_MASK_DATA
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:262
MDMA_Channel_TypeDef::CTCR
__IO uint32_t CTCR
Definition: stm32h735xx.h:674
MDMA_LinkNodeTypeDef::CTCR
__IO uint32_t CTCR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:124
HAL_MDMA_ERROR_NO_XFER
#define HAL_MDMA_ERROR_NO_XFER
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:267
MDMA_LinkNodeTypeDef::CDAR
__IO uint32_t CDAR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:127
HAL_MDMA_ConfigPostRequestMask
HAL_StatusTypeDef HAL_MDMA_ConfigPostRequestMask(MDMA_HandleTypeDef *hmdma, uint32_t MaskAddress, uint32_t MaskData)
MDMA
#define MDMA
Definition: stm32h735xx.h:2804
IS_MDMA_DESTINATION_BURST
#define IS_MDMA_DESTINATION_BURST(__BURST__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:812
IS_MDMA_SOURCE_BURST
#define IS_MDMA_SOURCE_BURST(__BURST__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:802
MDMA_FLAG_BRT
#define MDMA_FLAG_BRT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:509
MDMA_LinkNodeTypeDef::CLAR
__IO uint32_t CLAR
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:129
MDMA_InitTypeDef::Priority
uint32_t Priority
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:59
MDMA_CESR_TELD
#define MDMA_CESR_TELD
Definition: stm32h735xx.h:13957
MDMA_LinkNodeTypeDef::Reserved
__IO uint32_t Reserved
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:131
MDMA_IT_BRT
#define MDMA_IT_BRT
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:495
MDMA_CTBR_SBUS
#define MDMA_CTBR_SBUS
Definition: stm32h735xx.h:14114
IS_MDMA_LEVEL_COMPLETE
#define IS_MDMA_LEVEL_COMPLETE(__LEVEL__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:743
__MDMA_HandleTypeDef::XferBlockCpltCallback
void(* XferBlockCpltCallback)(struct __MDMA_HandleTypeDef *hmdma)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:219
HAL_MDMA_XFER_BUFFERCPLT_CB_ID
@ HAL_MDMA_XFER_BUFFERCPLT_CB_ID
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:190
HAL_MDMA_ERROR_NONE
#define HAL_MDMA_ERROR_NONE
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:259
__HAL_MDMA_DISABLE
#define __HAL_MDMA_DISABLE(__HANDLE__)
Disable the specified MDMA Channel.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:540
__MDMA_HandleTypeDef::State
__IO HAL_MDMA_StateTypeDef State
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:211
HAL_MDMA_RegisterCallback
HAL_StatusTypeDef HAL_MDMA_RegisterCallback(MDMA_HandleTypeDef *hmdma, HAL_MDMA_CallbackIDTypeDef CallbackID, void(*pCallback)(MDMA_HandleTypeDef *_hmdma))
MDMA_InitTypeDef::DestBurst
uint32_t DestBurst
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:92
HAL_MDMA_Start_IT
HAL_StatusTypeDef HAL_MDMA_Start_IT(MDMA_HandleTypeDef *hmdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t BlockDataLength, uint32_t BlockCount)
MDMA_LinkNodeConfTypeDef::BlockCount
uint32_t BlockCount
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:147
MDMA_CBRUR_DUV_Pos
#define MDMA_CBRUR_DUV_Pos
Definition: stm32h735xx.h:14099
IS_MDMA_REQUEST
#define IS_MDMA_REQUEST(__REQUEST__)
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:763
MDMA_InitTypeDef::Endianness
uint32_t Endianness
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:62
MDMA_CBNDTR_BNDT
#define MDMA_CBNDTR_BNDT
Definition: stm32h735xx.h:14074
MDMA_FLAG_CTC
#define MDMA_FLAG_CTC
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:508
MDMA_REQUEST_SW
#define MDMA_REQUEST_SW
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:332
MDMA_InitTypeDef::BufferTransferLength
uint32_t BufferTransferLength
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:81


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:54