I made a device with a stm32f107 and sim800l gsm module . Module is in data mode(PPP) and I'm using LWIP library . My MCU clocks at 72MHz .
My problem is that I get frame error and noise error when gsm module wants to send data. I tried to lower my baud rate step by step. Started from 115200 and at last I used 1200 bps(!!) but problem still exist and even its getting worst.
The funny thing is that I use a uart debug port to monitor my log and at the moment I get frame and noise error I get garbage in my terminal too.
here is my uart configuration
~~~ GSM_UART_Handler.Instance = GSM_USART; GSM_UART_Handler.Init.BaudRate = baudrate; GSM_UART_Handler.Init.Mode = UART_MODE_TX_RX ; GSM_UART_Handler.Init.OverSampling = UART_OVERSAMPLING_16; GSM_UART_Handler.Init.HwFlowCtl = UART_HWCONTROL_NONE; GSM_UART_Handler.Init.Parity = UART_PARITY_NONE; GSM_UART_Handler.Init.StopBits = UART_STOPBITS_1; GSM_UART_Handler.Init.WordLength = UART_WORDLENGTH_8B; HAL_UART_Init(&GSM_UART_Handler); __HAL_UART_ENABLE_IT(&GSM_UART_Handler,UART_IT_IDLE); HAL_UART_Receive_DMA(&GSM_UART_Handler,DMA_Buffer,DMA_BUFFER_SIZE); so here are my questions
How does MCU detect noise error?!
Is it possible my main clock source(crystal 8MHZ) deviate when GSM is in transmit mode? How can I see the deviation?(oscilloscope or Logic analyzer )?
May problem disappear if I lower my overall clock frequency (maybe 36 MHz)?