cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to interface a GSM sim7600 module with the STM32F446RE, but i am not getting the response on the UART.

TGhau.2088
Associate II

I have checked the PIN they connected in the correct order and on the correct pins. I have checked the GSM module on hyperterminal and it is functioning as intended. I am using the HAL drivers and Kiel IDE.

I am trying to get the response from the command AT which returns

AT

OK

////////////This is for starting up the GSM module ///////////

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_6);

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);

HAL_Delay(500);

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_6);

///////////command//////////////////////////

uint8_t at_test[]="AT\r\n";

uint8_t at_gpsinfo[]="AT+CGPSINFO\r\n";

uint8_t answer[100]="";

 while (1)

 {

 HAL_UART_Transmit(&huart3,at_test,6,10);

HAL_Delay(500);

HAL_UART_Receive(&huart3,answer,100,100);

HAL_Delay(500);

HAL_UART_Transmit(&huart2,answer,100,100);

HAL_Delay(500);

 }

 both the GSM and STM32F446RE are set to 115200

4 REPLIES 4

Perhap learn to use strlen() so you get the character length correct.

The system doesn't buffer while you ignore it for half a second.

Use a scope, check the signals.

Diagram the actual connectivity, you dismissing it doesn't convince me the voltage levels are compatible, nor if you have the rx/tx​ senses correct, the this compounded by "not working"

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TGhau.2088
Associate II

I do not know if this is correct but removing the delay and adding a for loop to the receive function seems to be working.

TGhau.2088
Associate II

this is the correct image

Thank you, I will look up and use strlen().