芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密

飞芯科技提供芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密逆向服务

单片机解密STM32N647摄像头IMX335资料

  1. 单片机解密static void DMA_Config(void)
  2. {
  3.   /*## -1- Enable DMA1 clock #################################################*/
  4.   __HAL_RCC_DMA1_CLK_ENABLE();

  5.   /*##-2- Select the DMA functional Parameters ###############################*/
  6.   DmaHandle.Init.Direction = DMA_MEMORY_TO_PERIPH ;          /* M2M transfer mode                */
  7.   DmaHandle.Init.PeriphInc = DMA_PINC_DISABLE;               /* Peripheral increment mode Enable */
  8.         //DmaHandle.Init.PeriphInc = DMA_PINC_DISABLE;      
  9.   DmaHandle.Init.MemInc = DMA_MINC_ENABLE;                  /* Memory increment mode Enable     */
  10.         //DmaHandle.Init.MemInc = DMA_MINC_DISABLE;  
  11. //  DmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; /* Peripheral data alignment : Word */
  12. //  DmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;    /* memory data alignment : Word     */
  13. //  DmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD; /* Peripheral data alignment : Word */
  14. //       
  15. //  DmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;    /* memory data alignment : Word     */
  16.         DmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE  ; /* Peripheral data alignment : Word */
  17.   DmaHandle.Init.MemDataAlignment = DMA_PDATAALIGN_BYTE  ;    /* memory data alignment : Word     */
  18.         DmaHandle.Init.Mode = DMA_NORMAL;                         /* Normal DMA mode                  */
  19.   DmaHandle.Init.Priority = DMA_PRIORITY_HIGH;              /* priority level : high            */

  20.   /*##-3- Select the DMA instance to be used for the transfer : DMA1_Channel1 #*/
  21.   DmaHandle.Instance = DMA_INSTANCE;

  22.   /*##-4- Initialize the DMA channel ##########################################*/
  23.   if (HAL_DMA_Init(&DmaHandle) != HAL_OK)
  24.   {
  25.     /* Initialization Error */
  26.     Error_Handler();
  27.   }
  28.   
  29.   /*##-5- Select Callbacks functions called after Transfer complete and Transfer error */
  30.   HAL_DMA_RegisterCallback(&DmaHandle, HAL_DMA_XFER_CPLT_CB_ID, TransferComplete);
  31.   HAL_DMA_RegisterCallback(&DmaHandle, HAL_DMA_XFER_ERROR_CB_ID, TransferError);

  32.   /*##-6- Configure NVIC for DMA transfer complete/error interrupts ##########*/
  33.   /* Set Interrupt Group Priority */
  34.   HAL_NVIC_SetPriority(DMA_INSTANCE_IRQ, 0, 0);

  35.   /* Enable the DMA STREAM global Interrupt */
  36.   HAL_NVIC_EnableIRQ(DMA_INSTANCE_IRQ);

  37.   /*##-7- Start the DMA transfer using the interrupt mode ####################*/
  38.   /* Configure the source, destination and buffer size DMA fields and Start DMA Channel transfer */
  39.   /* Enable All the DMA interrupts */
  40.   if (HAL_DMA_Start_IT(&DmaHandle, (uint32_t)&aSRC_Const_Buffer, (uint32_t)aDST_Buffer, 4) != HAL_OK)
  41.   {
  42.     /* Transfer Error */
  43.     Error_Handler();
  44.   }
  45. }



联系方式

地址:石家庄市新华区民族路77号华强广场D座2009
电话:0311-88816616/87087811
手机:13315190088
传真:0311-67901001
联系人:张工
网址:www.taihedz.cn
邮箱:feixindz@163.com
微信:xinpianjiemi
QQ:527263666/568069805

在线客服
热线电话

企业微信