cancel
Showing results for 
Search instead for 
Did you mean: 

Issue of a Manchester Decoding serial data with DFSDM Serial Transceivers on STM32H723 platform

Youssef Harby
Associate

Hello,

I'm trying to decode Manchester-encoded data by using the DFSDM peripheral on the STM32H7 MCU. I used a SW trigger Regular conversion on continuous mode through Filter0. But it doesn't work, and I didn't find any code examples or clear documentation about that.

The Manchester-encoded data frequency is about 20 kHz and Amplitude of 3.3V for 25usec to High and 0V for 25usec to LOW.

I'm using Nucleo-144 development board with STM32H723ZG MCU, and I configured channel 7 of DFSDM as follows:  

-I tried to make the clock configuration as follows: SYSCLK =4MHz and Output clock predivider = 120, which that is to fit the Equation was mentioned in TRM of STM32H7 

((CKOUTDIV+1 )xTsysclk) < Tmanchester clock < (2xCKOUTDIV x Tsysclk )

- Channel 7 Serial interface type and input clock phase --> Manchester with a rising edge

- The Final data right bit-shift = 8

- Channel offset =0

- Fosr = Iosr =1 to bypass filter and integrator.

and this my main function code:

int main(void)
{
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
  /* Configure the system clock */
  SystemClock_Config();
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DFSDM1_Init();
//start clock absence detection in polling mode
if( HAL_DFSDM_ChannelCkabStart(&hdfsdm1_channel7)!= HAL_OK)
Error_Handler();
 
while (1)
{
 
//poll for the clock absence detection
if( HAL_DFSDM_ChannelPollForCkab(&hdfsdm1_channel7, 2000) != HAL_OK)
Error_Handler();
//Start regular conversion in polling mode.
if(HAL_DFSDM_FilterRegularStart(&hdfsdm1_filter0)!= HAL_OK)
Error_Handler();
 
//Polling for End conversion
if (HAL_DFSDM_FilterPollForRegConversion(&hdfsdm1_filter0,5000) != HAL_OK)
Error_Handler();
//Store the decoded Data into int32 variable
Data =  HAL_DFSDM_FilterGetRegularValue(&hdfsdm1_filter0, (uint32_t *)hdfsdm1_channel7.Instance);
//Stop regular conversion
if(HAL_DFSDM_FilterRegularStop(&hdfsdm1_filter0) != HAL_OK)
Error_Handler();
}
}

 

0 REPLIES 0