-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blue pills code looping on procedure return #40
Comments
Found the possible source of original radio library from maker.pro: Examples require again add delay on setup serial library. Next step is to migrate to mxCubeIDE code, this platform is unreliable in my point of view. |
Here file adapted from examples to just not crash on BluePills. After some interaction seems the cause of blocking USB subsystem on Linux mint 20. ~$ lsusb |
Just to understand better, are there any problems with the STM32_HID_Bootloader then? |
Hi Kenjutsu, yes I am experiencing trouble with serial
communication, STM32 code hang.
I found workaround of inserting delay but doesn't solve issue.
Attached Salea LogicPro8 to see what happen USB subsystem freezed
up. Removed Salea and all other peripheral, on Linux mint 20 HID
serial communication hang and reboot is required to restore USB
functionality.
As I wrote not an Arduino fan so no idea how to debug code.
Thank you.
Roberto
On Tue, 29 Sep 2020 23:45:12 -0700 KenjutsuGH ***@***.***> wrote:
Just to understand better, are there any problems with the
**STM32_HID_Bootloader** then?
--
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#40 (comment)
rromano, romebay both are alias of same email
|
What options do you have under Tools? |
Hi, s screenshot of tools,
Board generic stm32f103
Blue pill f103c8
usart generic serial
usb cdc generic supersedes
usb low/full speed
optimize smallest -os (default)
runtime newlib nano (default)
HID Bootloader 2.2
Regards
Roberto
On Wed, 30 Sep 2020 02:40:25 -0700 KenjutsuGH ***@***.***> wrote:
What options do you have under **Tools**?
--
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#40 (comment)
rromano, romebay both are alias of same email
|
Hi, I am using macOS 10.13.6 so I can not help you with the Linux stuff. I have the same settings under Tools. I also noticed that as soon as Serial.begin(115200) is executed, it takes about 1.5s before I would see output in the serial monitor. As an example, I modified the classic Blink sketch to output some info to the serial port:
After the upload, I never see the "Serial setup done" message being displayed. Instead of using a delay() statement after Serial.begin() , I use
With the above code, all the info is displayed in the Serial Monitor and the program keeps on running. I can close the Serial Monitor and use a program such as CoolTerm (also available for Linux) to connect to the serial port of the BP and the output continues to be displayed. Unfortunately, I do not have a RDA5807M module to test your program. I do have the same I2C OLED display, and when I upload your program, I see info on the OLED, and the following in the Serial Monitor:
|
Hello, thank for prompt answer, I suppose on MAC it work hassle
free. On Linux too many time it lock out but this is strange, so
inspect code is more difficult. I suspect also some Linux incoerence,
as if some wrong code injected. Maybe M$ is poisoning code?
About RDA module can send you one for free but from your writing
sketch has no issue on mac.
Regards
Roberto
On Wed, 30 Sep 2020 23:07:00 -0700 KenjutsuGH ***@***.***> wrote:
Hi,
I am using macOS 10.13.6 so I can not help you with the Linux stuff.
I have the same settings under **Tools**. I also noticed that as soon
as **Serial.begin(115200)** is executed, it takes about 1.5s before I
would see output in the serial monitor.
As an example, I modified the classic **Blink** sketch to output
some info to the serial port:
```
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
Serial.println("Serial setup done");
}
// the loop function runs over and over again forever
void loop() {
Serial.println("LED_BUILTIN, HIGH");
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the
voltage level)
delay(1000); // wait for a second
Serial.println("LED_BUILTIN, LOW");
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making
the voltage LOW
delay(1000); // wait for a second
}
```
After the upload, I never see the "Serial setup done" message being
displayed. Instead of using a **delay()** statement after
**Serial.begin()** , I use
`while (!Serial);`
With the above code, all the info is displayed in the Serial Monitor
and the program keeps on running. I can close the Serial Monitor and
use a program such as **CoolTerm** (also available for Linux) to
connect to the serial port of the BP and the output continues to be
displayed.
Unfortunately, I do not have a RDA5807M module to test your program.
I do have the same I2C OLED display, and when I upload your program,
I see info on the OLED, and the following in the Serial Monitor:
```
init ok
sensor = 0
Post butt
Millis=2975 Time=2925 Time1=2925 Time2=2925 Time3=2925
Post millisFrecuencia = 210
Post FreqPost Volume>BLOCK_E found.
End Loop
sensor = 0
Post butt
Millis=3147 Time=2925 Time1=2925 Time2=2925 Time3=2925
Pre StatRDReqfrom for Loop after for
```
--
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#40 (comment)
rromano, romebay both are alias of same email
|
Have you tried another upload method such as SWD or Serial? |
Hello, I am not an Arduino user and lack of debugger is a terrific issue.
I loaded a test program from web,
https://maker.pro/arduino/projects/simple-fm-radio-receiver-with-arduino-uno-and-rda5807m
loaded doesn't work as is.
Adapting got some time to isolate where is stuck. Code is quite noobs and seems modified from other sources but issue come from library or bootloader.
Need spread a lot of wait time on setup around serial communication directive before use them.
At final code stuck at wire communication, procedure never return and loop as stack got corrupted, reenter procedure?
No debugger no idea what happen... Arduino IDE is just a time wasting.
changed key selector from analog to digital, added timeout on exit.
stuck on status read where never return back to main loop.
Code run enter exit setup, enter loop but stuck here:
if(( millis()-time2)>50)
{
Serial.print("Pre StatRD"); <<-- execute this
ReadEstado(); <<-- stuck here (stack fault?)
Serial.println("Post StatRD"); <<--- Never execute this line after enter previous line procedure. Procedure continue loop itself
init ok
sensor = 98
Post butt
Millis=2963 Time=2912 Time1=2912 Time2=2912 Time3=2912
Pre StatRDReqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
2 3 second hang, stack overlow?
Reqfrom for Loop after for End proc readST
Reqfrom for Loop after for End proc readST
Reqfrom
rdatest.ino.zip
got similar issue from rf generator test file, this is SPI out only no hardware required for test.
Abandoned migrating to native code with minor issue.
ADF4351.zip
The text was updated successfully, but these errors were encountered: