-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Feature] Support ESP32-S2 & ESP32-C3 & ESP32-S3 #44
Comments
Examples don't actually compile for ESP-32: In function 'void setup()': SBUS2_Setup(25,26); // For ESP32 set RX and TX Pin Number <<--- this doesn't work |
Tried to modify some code to get it to work with ESP32 C3 but didn't work out. There are some changes with the UART and Timers which makes it difficult. It also has less timers and uarts than the original ESP32 |
yes, But, the UART and Timers are coded on a very Low System Level. And these functions and variables are completly different to C3, S2 and S3.
Before i start to work on C3,S2,S3 i want to check what's the right Api to use I'm happy about any help. |
i managed to solve all UART Problems just the Timer is left |
i also managed to get it compiled for S2 the Reason is pretty Simple: C3 does not have TIMER_1, just TIMER_0 So the we have to Check if we can use: TIMER_0 on TIMER_GROUP_0 and maybe we can switch it for all ESP32 versions. i attached the sources for you for testing but i have no idea if it is working. It's also not tested on ESP32 |
I have solved the timer issues in my code tried to fix the UART issues also although it compiled it didn't work let me check you're code to |
i replaced TIMER_1 with TIMER_0 and did some modifications now i can compile without errors But it's not tested |
did you have the exeption decoder installed? From the output: the watchdog was triggered. i'll try to test it on the esp32 and S3 |
I never looked into the exception decoder will try that. I have the same result with and without sbus cable attached. |
okay call me stupid but the error was due the fact I was using this sample code don't have those pins on my board the underlying code works on my ESP32 C3 |
see still 1 issue when using the last slot of a group its not send so slot 15 isn't visible |
Nice to hear that it is working on the C3 i have to check if the issue also exist in the other versions. could be a logical issue. if you have a oscilloscope or logic analyser, you could toggle a pin in the timer ISR to check that the timer ISR is called 8 times after sbus frame |
Currently I don't have a osciliscope so thats currently out of the capabilities however maybe I can do something with Serial.println Did the following code:
|
Serial.print in an ISR is a no go. i will check it with scope. Maybe i have to get a C3. |
Hi thanks already that you're going to check it really happy with the support for making this work on a ESP32-C3. https://shop.m5stack.com/products/m5stamp-c3u-mate-with-pin-headers |
Did a small test and when changing the following it works
|
Oh, thats great. |
the range to get it to work on my esp32-C3 was between 20ms and 650ms. In this range it seemed to work correctly |
oh just to be sure 20ms is a typing error and you mean 620ms? or really 20ms? This would be very interesting. |
Yeah you would think indeed that it is a typing error but no it really is 20ms so the bandwidth is extremely large have to note only tested it with a R7006SB have to check with other receivers. I will check it somewhere this week with other receivers I have laying around. |
SBUS2 is defined with the following Timings: After SBUS Frame-> wait 2000ms so, if you go down to 20ms i would think that the Slots are send directly one after the other. So maybe the SBUS2 protocol tolerate that |
actual these types cant compile because of missing stuff
The text was updated successfully, but these errors were encountered: