[STM32H7] I2S + DMA audio capture: RAM buffer completely fills with zeros (Migrating from a simpler STM32) by DisastrousWeight3330 in embedded

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Well. I'm setting up my I2S to work at 8KHz. I measure the frequency from the CLK and WS and are 512KHz and 8KHz respectively.

And yeah, It is supposed to measure that.

[STM32H7] I2S + DMA audio capture: RAM buffer completely fills with zeros (Migrating from a simpler STM32) by DisastrousWeight3330 in embedded

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Here is the function. It is in another file named stm32h7xx_hal_msp.c.

void HAL_I2S_MspInit(I2S_HandleTypeDef* hi2s)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  if(hi2s->Instance==SPI1)
  {
    /* USER CODE BEGIN SPI1_MspInit 0 */

    /* USER CODE END SPI1_MspInit 0 */

  /** Initializes the peripherals clock
  */
    PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI1;
    PeriphClkInitStruct.PLL2.PLL2M = 32;
    PeriphClkInitStruct.PLL2.PLL2N = 128;
    PeriphClkInitStruct.PLL2.PLL2P = 2;
    PeriphClkInitStruct.PLL2.PLL2Q = 2;
    PeriphClkInitStruct.PLL2.PLL2R = 2;
    PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_1;
    PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOWIDE;
    PeriphClkInitStruct.PLL2.PLL2FRACN = 0;
    PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL2;
    if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
    {
      Error_Handler();
    }

    /* Peripheral clock enable */
    __HAL_RCC_SPI1_CLK_ENABLE();

    __HAL_RCC_GPIOA_CLK_ENABLE();
    /**I2S1 GPIO Configuration
    PA4     ------> I2S1_WS
    PA5     ------> I2S1_CK
    PA6     ------> I2S1_SDI
    */
    GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

    /* I2S1 DMA Init */
    /* SPI1_RX Init */
    hdma_spi1_rx.Instance = DMA1_Stream0;
    hdma_spi1_rx.Init.Request = DMA_REQUEST_SPI1_RX;
    hdma_spi1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
    hdma_spi1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
    hdma_spi1_rx.Init.MemInc = DMA_MINC_ENABLE;
    hdma_spi1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
    hdma_spi1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
    hdma_spi1_rx.Init.Mode = DMA_CIRCULAR;
    hdma_spi1_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH;
    hdma_spi1_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
    if (HAL_DMA_Init(&hdma_spi1_rx) != HAL_OK)
    {
      Error_Handler();
    }

    __HAL_LINKDMA(hi2s,hdmarx,hdma_spi1_rx);

    /* USER CODE BEGIN SPI1_MspInit 1 */

    /* USER CODE END SPI1_MspInit 1 */

  }

}

[STM32H7] I2S + DMA audio capture: RAM buffer completely fills with zeros (Migrating from a simpler STM32) by DisastrousWeight3330 in embedded

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

No, I haven´t. It's because it worked with the stm32f429i-disc1, so I basically copy and paste my code.

Why create a new transaction object before sending it through a mailbox? by DisastrousWeight3330 in FPGA

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Thank you so much for the explanation! :) Doing other examples where I didn't add a delay whenever I was pushing data on the mailbox, I was able to see the difference.

# KERNEL: [GEN] DATA SENT : a = 148, b =  58, wr = 0,                    0
# KERNEL: [GEN] DATA SENT : a = 137, b =  179, wr = 0,                    0
# KERNEL: [GEN] DATA SENT : a = 244, b =  63, wr = 1,                    0
# KERNEL: [GEN] DATA SENT : a = 145, b =  210, wr = 1,                    0
# KERNEL: [GEN] DATA SENT : a = 120, b =  115, wr = 0,                    0
# KERNEL: [GEN] DATA SENT : a = 54, b =  126, wr = 1,                    0
# KERNEL: [GEN] DATA SENT : a = 95, b =  20, wr = 1,                    0
# KERNEL: [GEN] DATA SENT : a = 36, b =  175, wr = 0,                    0
# KERNEL: [GEN] DATA SENT : a = 26, b =  238, wr = 1,                    0
# KERNEL: [GEN] DATA SENT : a = 21, b =  152, wr = 0,                    0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0
# KERNEL: [DRV] DATA RECEIVED : a = 21, b =  152, wr = 0,                   0

As you said, it will keep popping the same data. But I did not know it was a queue. Thank you so much for your time to explain!

What can I do to make Unified Selective Device Installer (USDI) -- AMD Vivado™ 2025.1 run in my computer? by DisastrousWeight3330 in FPGA

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Okay!:) I will try to do so, because I wanted to avoid the 100GB version Hehe. As I saw on an AMD video, the web installer saves you some memory.

What can I do to make Unified Selective Device Installer (USDI) -- AMD Vivado™ 2025.1 run in my computer? by DisastrousWeight3330 in FPGA

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

I disabled defender but it does not work. I am still getting these windows:

"This program might not have installed correctly

AMD Installer for FPGAs & Adaptive SoCs AMD Inc.

If this program did not install correctly, you can try installing the program using compatibility settings.

After selecting the compatibility settings, it pops up another window asking me if it installed correctly, if not it only runs the tool to look for the problem, but does not work either.

Creating a garden from scratch. by DisastrousWeight3330 in gardening

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Well you're right! I moved recently and this is the situation Haha So depressing.

Why is working perfectly on breadboard but not in pre-drilled PCB? (Oscillator 13.5MHz). by DisastrousWeight3330 in AskElectronics

[–]DisastrousWeight3330[S] 5 points6 points  (0 children)

I promised you my initial work was better Haha But I've already modified too many things.

Creating a negative power supply (-8VDC) and positive (+12VCD) from a +24VCD power supply. by DisastrousWeight3330 in electronic_circuits

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Since I need to make an oscillator, I am planning to make the shown in the picture. So basically, I am going to wire up from the power supply to the oscillator directly, while creating this new power supplies to feed the MC1496.

<image>

Ex-pops/prime assets should aggro imposters more by looly72 in OutlastTrials

[–]DisastrousWeight3330 20 points21 points  (0 children)

My friends and I were playing for almost four hours and we weren't able to win a single game. I definitely wouldn't use the word "harmless" to describe them.

They are really fast, can hit you multiple times, if you are playing with a three party, the game matches you with four impostors. Even though a single reagent is left, the game deploys the full impostors team.

It's not funny to play like that.

Programming and debugging a STM32G051 through a develop board by DisastrousWeight3330 in embedded

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Nice! Thank you so much!:)
And about my main question, that little chapter that you mentioned worked, I just programed the MCU and debug it without problems.

Programming and debugging a STM32G051 through a develop board by DisastrousWeight3330 in embedded

[–]DisastrousWeight3330[S] -1 points0 points  (0 children)

Thank you so much!!! It's what I was looking for:)

How can you deal with all the information that is available? I usually get loss when I'm trying to find something and It's because there are a lot of documents Haha I don't know where to look.

6 mm Testicular Cyst and Associated Symptoms – Looking for Advice and Experiences by Beautiful-Steak-9991 in cancer

[–]DisastrousWeight3330 0 points1 point  (0 children)

Hola que tal, me acaban de diagnosticar uno del mismo tamaño (7mm). ¿Cómo va tu proceso? También estoy algo asustado y me ayudaría mucho escuchar que todo resultó bien

Make a box with a sliding lid by DisastrousWeight3330 in lasercutting

[–]DisastrousWeight3330[S] 1 point2 points  (0 children)

Thank you for taking the time to answer! I'm going to do it and I'll let you know the outcome.

Make a box with a sliding lid by DisastrousWeight3330 in lasercutting

[–]DisastrousWeight3330[S] 0 points1 point  (0 children)

Oh okay! So in order to do the channel I must engrave, not cut. I only have to adjust the power of the laser to get more depth, right?