I'm working on STM32H750VBT and I want to establish simple TCP connection in RMII mode by using LWIP (without FreeRTOS).
I use cubeMX API for peripherals configuration and create project in Keil uVision. But I am having an issue where STM32H7 fails to start on reset. Here is a section of a startup code which fails:
; Reset handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
It gets stuck on the line BX R0 and never goes to main. Did anyone ever had similar issues? It only happens if I am trying to use LWIP.
I read some STM32H7 example code and I followed their instructions, I enable DCach and ICAcH and config MPU, but my problem didn't solve. I established TCP connection on STM32F746Z previously and it worked without any problem. but now I don't understand what is my problem?
Related
I use GSM IoT module for my project. I write a library that connects gsm and send data periodically. But in some time (while sending with no problem) gsm operator disables connection (I think that is IP time to live interval close). How can I control the connection ?
I think AT#SGACT is true for this purpose. What is your advice.
I am controlling the CREG but in this case CREG is not changed (when operator force me to disconnect)
I got the TinyGSM MqttClient.ino example working. But if I added my own code to the void loop() I started to see some really bizarre / weird behavior with this library. Added some functionality which is working just fine with Ethernet Shield + PubSubClient library, but somehow this code interrupts the normal behavior of the TinyGSM library. If the example code is able to normally connect to the mobile network (this code is located in the setup part of the code) then if I add some things into the loop the code is no longer even able to connect to the network (nonetheless connect to the server or publish / subscribe messages). I am just amazed. This seems utterly illogical to me as the Loop part comes after the Setup, meaning that the Setup part of the code should still work. How can this be happening? Also I am getting a punch of: "[255298] ### Unhandled: " messages in the Serial Monitor. What do these mean and where do they come from? And this is weird that they "pop-up" at any given moment. Is there some kind of "threading" simulated in the background or do these messages come from the SIM7000 module? This is the first time in my coding experience that part of the code which otherwise works and code (which should not be reached yet) mess with each other. Could this be a low memory issue?
Here's the output from Arduino compiler:
Sketch uses 27054 bytes (83%) of program storage space. Maximum is 32256 bytes.
Global variables use 1432 bytes (69%) of dynamic memory, leaving 616 bytes for local variables. Maximum is 2048 bytes.
Link to the code that does not work: mqtt_not_working.ino
Link to the (reduced) code that works: mqtt_working.ino
Here's the Serial output of the non-working code:
Turning the modem on...
Module turned on!
Wait...
Initializing modem...
[24290] ### Unhandled:
Modem Info: SIM7000E R1529
Waiting for network... fail
[106752] ### Unhandled:
[107764] ### Unhandled:
Network disconnected
[108773] ### Unhandled:
[109785] ### Unhandled:
[110797] ### Unhandled:
[112056] ### Unhandled:
[113068] ### Unhandled:
etc.
Here's the working code output (the part that makes the code unfunctional is commented out):
Turning the modem on...
Module turned on!
Wait...
Initializing modem...
[22600] ### TinyGSM Version: 0.11.5
[22600] ### TinyGSM Compiled Module: TinyGsmClientSIM7000
[22724] ### Modem: SIMCOM SIM7000E
Modem Info: SIM7000E R1529
Waiting for network... success
Network connected
Connecting to internet.emt.ee[24081] ### Daylight savings time state updated.
[24098] ### Network time and time zone updated.
[40399] ### Daylight savings time state updated.
[40414] ### Network time and time zone updated.
success
GPRS connected
=== MQTT NOT CONNECTED ===
Connecting to pylons-staging.sirrent.by success
Message arrived [mqtt/PylonIn]: {lock:0,booking:0,alarm:0}
lock: 0 booking: 0
[75299] ### Unhandled: +CIPRG0
Message arrived [mqtt/PylonIn]: {lock:0,booking:1,alarm:0}
lock: 0 booking: 1
Message arrived [mqtt/PylonIn]: {lock:0,booking:1,alarm:0}
lock: 0 booking: 1
Message arrived [mqtt/PylonIn]: {lock:0,booking:0,alarm:0}
lock: 0 booking: 0
The code that is named mqtt_not_working.ino is working perfectly on Arduino Mega. On Arduino Mega I am using hardware serial (Serial1). Actually the TinyGSM code is already made this way that it will automatically choose Serial1 on Arduino Mega.
I also tried the same code on another Arduino UNO board and it is still not working - with this test I eliminated the possibility of a faulty UNO board. Also tried a baud rate of 19200 instead of 9600 for software serial communication between Arduino UNO and the SIM7000 module - still no luck and seeing bizarre behavior.
Therefore my best guess is that this issue is related to Arduino UNO limited memory.
I am using ATEasy 7 142g in Windows 7.
I have a ZUP power supply module that I am communicating with RS232.
The weird thing is, that if I open HyperTerminal and send the device commands and try to receive result - all works fine.
BUT when I send the same commands in ATEasy and try to read results (and VERIFICATED it using the "monitor" feature), the zap module starts to send endless jibrish until I restart it (unplug it).
All the channel configurations are the same (baud rate etc...).
The set of commands that work in HyperTerminal but not in ATEasy:
:ADR01;
:RMT1;
:RMT?;
The result in case of HyperTerminal is :RM1;
In case of ATEasy the result is just jibrish until device restart.
What can be the reason?
In the end, the problem was entirly something else:
Noise from a motor cable was injected into the ZUP communication cable.
So everytime the motor was activated - the ZUP module com channel went crazy!
I am having a bit of trouble here.
I get my esp-01 to connect to wifi and webservers, but with one website in particular it disconnects right after establish the connection (after type AT+CIPSTART), so i am not having enough time to write another command or post a request.
AT+CIPSTART="TCP","www.franz95.000webhostapp.com",80
CONNECT
OK
CLOSED
I have also try modifying .htaccess setting keep alive connection..
Is there a way to make the connection duration longer before closing it??
Im using a esp-01
AT version:0.21.0.0
SDK version:0.9.5
SPI Flash Size : 4Mbit
I am working on a project with the UART controls. I am attempting to simulate the sending and receiving of messages through the UART. The UART will be connected to a RS-485 transceiver in the real world but I will be providing the input/output through a test.c file.
Currently, I have to pause the execution of the program in the simulator, manually flip the bit and return the program back to execution again for the UART to send about byte.
My question to the group is can I auto-magically set the TXC bit to simulate a successful transfer of bytes? I am currently reading through Atmel's documentation and deciphering how to setup a stimuli file.
This would help out since I would like to make the communications testing more complicated the deeper I get with development.
Thanks,
Ryan
For me it is quite hard to understand your english...
set the TXC bit to simulate a successful transfer
On the real hardware you can't set TXC manually.
If you are talking about simulation environment, I only use http://www.nongnu.org/simulavr to do this kind of jobs. In this simulator you simply can add a c/c++-testprogram which runs on the host in the native host fashion and connect a simulated uart to the simulator which runs your avr program.