Relative Content

Tag Archive for cstm32

Attempt to rewrite a string concatenating function with realloc instead of calloc

I found on the internet a fine string concatenating function and tried to rewrite its else scope with use of realloc as it was written with use of calloc. However, I failed. Most of the time I tried to use my version of this function the STM32 microcontroller reached HardFault_Handler. With the original code that uses calloc I had no problem like this.

I tried to find what was wrong using debugger built int STM32CubeIDE but to no avail. I don’t know if I have some memory leak or if I calculate byte sizes or lengths incorrectly. Every help and suggestion is deeply appreciated. Thank You in advance!

Sending AT commands to GSM via STM32, TX buffer error

I’m developing a system with a GMS module, where AT commands are sent to the module via an STM32.
In this case, I’m having problems with the AT+CSTT command, which was giving me an ERROR. After a lot of thought, I realized that the error was due to the fact that the command was going to the module with the T for AT missing (A+CSTT).